Version Description
Download this release
Release Info
Developer | youknowriad |
Plugin | Gutenberg |
Version | 9.5.0 |
Comparing to | |
See all releases |
Code changes from version 9.4.1 to 9.5.0
- build/a11y/index.asset.php +1 -1
- build/a11y/index.js +1 -1
- build/annotations/index.asset.php +1 -1
- build/annotations/index.js +1 -1
- build/api-fetch/index.asset.php +1 -1
- build/api-fetch/index.js +1 -1
- build/autop/index.asset.php +1 -1
- build/autop/index.js +1 -1
- build/blob/index.asset.php +1 -1
- build/blob/index.js +1 -1
- build/block-directory/index.asset.php +1 -1
- build/block-directory/index.js +16 -16
- build/block-editor/index.asset.php +1 -1
- build/block-editor/index.js +51 -49
build/a11y/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '585d2c3fcc4f79e8987c744989738ebd');
|
build/a11y/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.a11y=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
1 |
+
window.wp=window.wp||{},window.wp.a11y=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=415)}({1:function(e,t){e.exports=window.wp.i18n},251:function(e,t){e.exports=window.wp.domReady},415:function(e,t,n){"use strict";n.r(t),n.d(t,"setup",(function(){return p})),n.d(t,"speak",(function(){return u}));var r=n(251),i=n.n(r),o=n(1);function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite",t=document.createElement("div");t.id="a11y-speak-".concat(e),t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");var n=document,r=n.body;return r&&r.appendChild(t),t}var d="";function p(){var e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===e&&function(){var e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=Object(o.__)("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");var t=document.body;t&&t.appendChild(e)}(),null===t&&a("assertive"),null===n&&a("polite")}function u(e,t){!function(){for(var e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text"),n=0;n<e.length;n++)e[n].textContent="";t&&t.setAttribute("hidden","hidden")}(),e=function(e){return e=e.replace(/<[^<>]+>/g," "),d===e&&(e+=" "),d=e,e}(e);var n=document.getElementById("a11y-speak-intro-text"),r=document.getElementById("a11y-speak-assertive"),i=document.getElementById("a11y-speak-polite");r&&"assertive"===t?r.textContent=e:i&&(i.textContent=e),n&&n.removeAttribute("hidden")}i()(p)}});
|
build/annotations/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '8b0eaad24c5a2c95ffabcf376ffe01b9');
|
build/annotations/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.annotations=function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=428)}({1:function(t,n){t.exports=window.wp.i18n},15:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=e(45);function o(t,n){if(null==t)return{};var e,o,a=Object(r.a)(t,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)e=i[o],n.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(a[e]=t[e])}return a}},151:function(t,n,e){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function a(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}for(var i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,u=function(t){return"string"==typeof t&&i.test(t)},c=[],l=0;l<256;++l)c.push((l+256).toString(16).substr(1));n.a=function(t,n,e){var r=(t=t||{}).random||(t.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,n){e=e||0;for(var o=0;o<16;++o)n[e+o]=r[o];return n}return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=(c[t[n+0]]+c[t[n+1]]+c[t[n+2]]+c[t[n+3]]+"-"+c[t[n+4]]+c[t[n+5]]+"-"+c[t[n+6]]+c[t[n+7]]+"-"+c[t[n+8]]+c[t[n+9]]+"-"+c[t[n+10]]+c[t[n+11]]+c[t[n+12]]+c[t[n+13]]+c[t[n+14]]+c[t[n+15]]).toLowerCase();if(!u(e))throw TypeError("Stringified UUID is invalid");return e}(r)}},16:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var r=e(25),o=e(36),a=e(29);function i(t){return function(t){if(Array.isArray(t))return Object(r.a)(t)}(t)||Object(o.a)(t)||Object(a.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2:function(t,n){t.exports=window.lodash},22:function(t,n){t.exports=window.wp.richText},25:function(t,n,e){"use strict";function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}e.d(n,"a",(function(){return r}))},29:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=e(25);function o(t,n){if(t){if("string"==typeof t)return Object(r.a)(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Object(r.a)(t,n):void 0}}},32:function(t,n){t.exports=window.wp.hooks},36:function(t,n,e){"use strict";function r(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}e.d(n,"a",(function(){return r}))},4:function(t,n){t.exports=window.wp.data},428:function(t,n,e){"use strict";e.r(n);var r={};e.r(r),e.d(r,"__experimentalGetAnnotationsForBlock",(function(){return g})),e.d(r,"__experimentalGetAllAnnotationsForBlock",(function(){return m})),e.d(r,"__experimentalGetAnnotationsForRichText",(function(){return h})),e.d(r,"__experimentalGetAnnotations",(function(){return j}));var o={};e.r(o),e.d(o,"__experimentalAddAnnotation",(function(){return w})),e.d(o,"__experimentalRemoveAnnotation",(function(){return x})),e.d(o,"__experimentalUpdateAnnotationRange",(function(){return _})),e.d(o,"__experimentalRemoveAnnotationsBySource",(function(){return T}));var a=e(4),i=e(16),u=e(6),c=e(2);function l(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function f(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?l(Object(e),!0).forEach((function(n){Object(u.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function s(t,n){var e=t.filter(n);return t.length===e.length?t:e}function d(t){return Object(c.isNumber)(t.start)&&Object(c.isNumber)(t.end)&&t.start<=t.end}var p=e(15),b=e(49);function v(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function O(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?v(Object(e),!0).forEach((function(n){Object(u.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):v(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var y=[],g=Object(b.a)((function(t,n){var e;return(null!==(e=null==t?void 0:t[n])&&void 0!==e?e:[]).filter((function(t){return"block"===t.selector}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:y]}));function m(t,n){var e;return null!==(e=null==t?void 0:t[n])&&void 0!==e?e:y}var h=Object(b.a)((function(t,n,e){var r;return(null!==(r=null==t?void 0:t[n])&&void 0!==r?r:[]).filter((function(t){return"range"===t.selector&&e===t.richTextIdentifier})).map((function(t){var n=t.range,e=Object(p.a)(t,["range"]);return O(O({},n),e)}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:y]}));function j(t){return Object(c.flatMap)(t,(function(t){return t}))}var A=e(151);function w(t){var n=t.blockClientId,e=t.richTextIdentifier,r=void 0===e?null:e,o=t.range,a=void 0===o?null:o,i=t.selector,u=void 0===i?"range":i,c=t.source,l=void 0===c?"default":c,f=t.id,s={type:"ANNOTATION_ADD",id:void 0===f?Object(A.a)():f,blockClientId:n,richTextIdentifier:r,source:l,selector:u};return"range"===u&&(s.range=a),s}function x(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function _(t,n,e){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:n,end:e}}function T(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}Object(a.registerStore)("core/annotations",{reducer:function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ANNOTATION_ADD":var r=e.blockClientId,o={id:e.id,blockClientId:r,richTextIdentifier:e.richTextIdentifier,source:e.source,selector:e.selector,range:e.range};if("range"===o.selector&&!d(o.range))return n;var a=null!==(t=null==n?void 0:n[r])&&void 0!==t?t:[];return f(f({},n),{},Object(u.a)({},r,[].concat(Object(i.a)(a),[o])));case"ANNOTATION_REMOVE":return Object(c.mapValues)(n,(function(t){return s(t,(function(t){return t.id!==e.annotationId}))}));case"ANNOTATION_UPDATE_RANGE":return Object(c.mapValues)(n,(function(t){var n=!1,r=t.map((function(t){return t.id===e.annotationId?(n=!0,f(f({},t),{},{range:{start:e.start,end:e.end}})):t}));return n?r:t}));case"ANNOTATION_REMOVE_SOURCE":return Object(c.mapValues)(n,(function(t){return s(t,(function(t){return t.source!==e.source}))}))}return n},selectors:r,actions:o});var N=e(22),P=e(1),E={name:"core/annotation",title:Object(P.__)("Annotation"),tagName:"mark",className:"annotation-text",attributes:{className:"class",id:"id"},edit:function(){return null},__experimentalGetPropsForEditableTreePreparation:function(t,n){var e=n.richTextIdentifier,r=n.blockClientId;return{annotations:t("core/annotations").__experimentalGetAnnotationsForRichText(r,e)}},__experimentalCreatePrepareEditableTree:function(t){var n=t.annotations;return function(t,e){if(0===n.length)return t;var r={formats:t,text:e};return(r=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.forEach((function(n){var e=n.start,r=n.end;e>t.text.length&&(e=t.text.length),r>t.text.length&&(r=t.text.length);var o="annotation-text-"+n.source,a="annotation-text-"+n.id;t=Object(N.applyFormat)(t,{type:"core/annotation",attributes:{className:o,id:a}},e,r)})),t}(r,n)).formats}},__experimentalGetPropsForEditableTreeChangeHandler:function(t){return{removeAnnotation:t("core/annotations").__experimentalRemoveAnnotation,updateAnnotationRange:t("core/annotations").__experimentalUpdateAnnotationRange}},__experimentalCreateOnChangeEditableValue:function(t){return function(n){var e=function(t){var n={};return t.forEach((function(t,e){(t=(t=t||[]).filter((function(t){return"core/annotation"===t.type}))).forEach((function(t){var r=t.attributes.id;r=r.replace("annotation-text-",""),n.hasOwnProperty(r)||(n[r]={start:e}),n[r].end=e+1}))})),n}(n),r=t.removeAnnotation,o=t.updateAnnotationRange;!function(t,n,e){var r=e.removeAnnotation,o=e.updateAnnotationRange;t.forEach((function(t){var e=n[t.id];if(e){var a=t.start,i=t.end;a===e.start&&i===e.end||o(t.id,e.start,e.end)}else r(t.id)}))}(t.annotations,e,{removeAnnotation:r,updateAnnotationRange:o})}}},I=E.name,R=Object(p.a)(E,["name"]);Object(N.registerFormatType)(I,R);var S=e(32);Object(S.addFilter)("editor.BlockListBlock","core/annotations",(function(t){return Object(a.withSelect)((function(t,n){var e=n.clientId,r=n.className;return{className:t("core/annotations").__experimentalGetAnnotationsForBlock(e).map((function(t){return"is-annotated-by-"+t.source})).concat(r).filter(Boolean).join(" ")}}))(t)}))},45:function(t,n,e){"use strict";function r(t,n){if(null==t)return{};var e,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)e=a[r],n.indexOf(e)>=0||(o[e]=t[e]);return o}e.d(n,"a",(function(){return r}))},49:function(t,n,e){"use strict";var r,o;function a(t){return[t]}function i(){var t={clear:function(){t.head=null}};return t}function u(t,n,e){var r;if(t.length!==n.length)return!1;for(r=e;r<t.length;r++)if(t[r]!==n[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,n.a=function(t,n){var e,c;function l(){e=o?new WeakMap:i()}function f(){var e,r,o,a,i,l=arguments.length;for(a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];for(i=n.apply(null,a),(e=c(i)).isUniqueByDependants||(e.lastDependants&&!u(i,e.lastDependants,0)&&e.clear(),e.lastDependants=i),r=e.head;r;){if(u(r.args,a,1))return r!==e.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=e.head,r.prev=null,e.head.prev=r,e.head=r),r.val;r=r.next}return r={val:t.apply(null,a)},a[0]=null,r.args=a,e.head&&(e.head.prev=r,r.next=e.head),e.head=r,r.val}return n||(n=a),c=o?function(t){var n,o,a,u,c,l=e,f=!0;for(n=0;n<t.length;n++){if(!(c=o=t[n])||"object"!=typeof c){f=!1;break}l.has(o)?l=l.get(o):(a=new WeakMap,l.set(o,a),l=a)}return l.has(r)||((u=i()).isUniqueByDependants=f,l.set(r,u)),l.get(r)}:function(){return e},f.getDependants=n,f.clear=l,l(),f}},6:function(t,n,e){"use strict";function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}e.d(n,"a",(function(){return r}))}});
|
1 |
+
window.wp=window.wp||{},window.wp.annotations=function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=407)}({1:function(t,n){t.exports=window.wp.i18n},149:function(t,n,e){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function a(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}for(var i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,u=function(t){return"string"==typeof t&&i.test(t)},c=[],l=0;l<256;++l)c.push((l+256).toString(16).substr(1));n.a=function(t,n,e){var r=(t=t||{}).random||(t.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,n){e=e||0;for(var o=0;o<16;++o)n[e+o]=r[o];return n}return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=(c[t[n+0]]+c[t[n+1]]+c[t[n+2]]+c[t[n+3]]+"-"+c[t[n+4]]+c[t[n+5]]+"-"+c[t[n+6]]+c[t[n+7]]+"-"+c[t[n+8]]+c[t[n+9]]+"-"+c[t[n+10]]+c[t[n+11]]+c[t[n+12]]+c[t[n+13]]+c[t[n+14]]+c[t[n+15]]).toLowerCase();if(!u(e))throw TypeError("Stringified UUID is invalid");return e}(r)}},15:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=e(46);function o(t,n){if(null==t)return{};var e,o,a=Object(r.a)(t,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)e=i[o],n.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(a[e]=t[e])}return a}},16:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var r=e(25),o=e(36),a=e(29);function i(t){return function(t){if(Array.isArray(t))return Object(r.a)(t)}(t)||Object(o.a)(t)||Object(a.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2:function(t,n){t.exports=window.lodash},22:function(t,n){t.exports=window.wp.richText},25:function(t,n,e){"use strict";function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}e.d(n,"a",(function(){return r}))},29:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=e(25);function o(t,n){if(t){if("string"==typeof t)return Object(r.a)(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Object(r.a)(t,n):void 0}}},32:function(t,n){t.exports=window.wp.hooks},36:function(t,n,e){"use strict";function r(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}e.d(n,"a",(function(){return r}))},4:function(t,n){t.exports=window.wp.data},407:function(t,n,e){"use strict";e.r(n),e.d(n,"store",(function(){return D}));var r={};e.r(r),e.d(r,"__experimentalGetAnnotationsForBlock",(function(){return w})),e.d(r,"__experimentalGetAllAnnotationsForBlock",(function(){return _})),e.d(r,"__experimentalGetAnnotationsForRichText",(function(){return T})),e.d(r,"__experimentalGetAnnotations",(function(){return N}));var o={};e.r(o),e.d(o,"__experimentalAddAnnotation",(function(){return E})),e.d(o,"__experimentalRemoveAnnotation",(function(){return I})),e.d(o,"__experimentalUpdateAnnotationRange",(function(){return R})),e.d(o,"__experimentalRemoveAnnotationsBySource",(function(){return S}));var a=e(15),i=e(22),u=e(1),c={name:"core/annotation",title:Object(u.__)("Annotation"),tagName:"mark",className:"annotation-text",attributes:{className:"class",id:"id"},edit:function(){return null},__experimentalGetPropsForEditableTreePreparation:function(t,n){var e=n.richTextIdentifier,r=n.blockClientId;return{annotations:t("core/annotations").__experimentalGetAnnotationsForRichText(r,e)}},__experimentalCreatePrepareEditableTree:function(t){var n=t.annotations;return function(t,e){if(0===n.length)return t;var r={formats:t,text:e};return(r=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.forEach((function(n){var e=n.start,r=n.end;e>t.text.length&&(e=t.text.length),r>t.text.length&&(r=t.text.length);var o="annotation-text-"+n.source,a="annotation-text-"+n.id;t=Object(i.applyFormat)(t,{type:"core/annotation",attributes:{className:o,id:a}},e,r)})),t}(r,n)).formats}},__experimentalGetPropsForEditableTreeChangeHandler:function(t){return{removeAnnotation:t("core/annotations").__experimentalRemoveAnnotation,updateAnnotationRange:t("core/annotations").__experimentalUpdateAnnotationRange}},__experimentalCreateOnChangeEditableValue:function(t){return function(n){var e=function(t){var n={};return t.forEach((function(t,e){(t=(t=t||[]).filter((function(t){return"core/annotation"===t.type}))).forEach((function(t){var r=t.attributes.id;r=r.replace("annotation-text-",""),n.hasOwnProperty(r)||(n[r]={start:e}),n[r].end=e+1}))})),n}(n),r=t.removeAnnotation,o=t.updateAnnotationRange;!function(t,n,e){var r=e.removeAnnotation,o=e.updateAnnotationRange;t.forEach((function(t){var e=n[t.id];if(e){var a=t.start,i=t.end;a===e.start&&i===e.end||o(t.id,e.start,e.end)}else r(t.id)}))}(t.annotations,e,{removeAnnotation:r,updateAnnotationRange:o})}}},l=c.name,f=Object(a.a)(c,["name"]);Object(i.registerFormatType)(l,f);var s=e(32),d=e(4);Object(s.addFilter)("editor.BlockListBlock","core/annotations",(function(t){return Object(d.withSelect)((function(t,n){var e=n.clientId,r=n.className;return{className:t("core/annotations").__experimentalGetAnnotationsForBlock(e).map((function(t){return"is-annotated-by-"+t.source})).concat(r).filter(Boolean).join(" ")}}))(t)}));var p=e(16),b=e(6),v=e(2);function O(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function y(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?O(Object(e),!0).forEach((function(n){Object(b.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):O(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function g(t,n){var e=t.filter(n);return t.length===e.length?t:e}function m(t){return Object(v.isNumber)(t.start)&&Object(v.isNumber)(t.end)&&t.start<=t.end}var h=e(48);function j(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function x(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?j(Object(e),!0).forEach((function(n){Object(b.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):j(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var A=[],w=Object(h.a)((function(t,n){var e;return(null!==(e=null==t?void 0:t[n])&&void 0!==e?e:[]).filter((function(t){return"block"===t.selector}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:A]}));function _(t,n){var e;return null!==(e=null==t?void 0:t[n])&&void 0!==e?e:A}var T=Object(h.a)((function(t,n,e){var r;return(null!==(r=null==t?void 0:t[n])&&void 0!==r?r:[]).filter((function(t){return"range"===t.selector&&e===t.richTextIdentifier})).map((function(t){var n=t.range,e=Object(a.a)(t,["range"]);return x(x({},n),e)}))}),(function(t,n){var e;return[null!==(e=null==t?void 0:t[n])&&void 0!==e?e:A]}));function N(t){return Object(v.flatMap)(t,(function(t){return t}))}var P=e(149);function E(t){var n=t.blockClientId,e=t.richTextIdentifier,r=void 0===e?null:e,o=t.range,a=void 0===o?null:o,i=t.selector,u=void 0===i?"range":i,c=t.source,l=void 0===c?"default":c,f=t.id,s={type:"ANNOTATION_ADD",id:void 0===f?Object(P.a)():f,blockClientId:n,richTextIdentifier:r,source:l,selector:u};return"range"===u&&(s.range=a),s}function I(t){return{type:"ANNOTATION_REMOVE",annotationId:t}}function R(t,n,e){return{type:"ANNOTATION_UPDATE_RANGE",annotationId:t,start:n,end:e}}function S(t){return{type:"ANNOTATION_REMOVE_SOURCE",source:t}}var D=Object(d.createReduxStore)("core/annotations",{reducer:function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ANNOTATION_ADD":var r=e.blockClientId,o={id:e.id,blockClientId:r,richTextIdentifier:e.richTextIdentifier,source:e.source,selector:e.selector,range:e.range};if("range"===o.selector&&!m(o.range))return n;var a=null!==(t=null==n?void 0:n[r])&&void 0!==t?t:[];return y(y({},n),{},Object(b.a)({},r,[].concat(Object(p.a)(a),[o])));case"ANNOTATION_REMOVE":return Object(v.mapValues)(n,(function(t){return g(t,(function(t){return t.id!==e.annotationId}))}));case"ANNOTATION_UPDATE_RANGE":return Object(v.mapValues)(n,(function(t){var n=!1,r=t.map((function(t){return t.id===e.annotationId?(n=!0,y(y({},t),{},{range:{start:e.start,end:e.end}})):t}));return n?r:t}));case"ANNOTATION_REMOVE_SOURCE":return Object(v.mapValues)(n,(function(t){return g(t,(function(t){return t.source!==e.source}))}))}return n},selectors:r,actions:o});Object(d.register)(D)},46:function(t,n,e){"use strict";function r(t,n){if(null==t)return{};var e,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)e=a[r],n.indexOf(e)>=0||(o[e]=t[e]);return o}e.d(n,"a",(function(){return r}))},48:function(t,n,e){"use strict";var r,o;function a(t){return[t]}function i(){var t={clear:function(){t.head=null}};return t}function u(t,n,e){var r;if(t.length!==n.length)return!1;for(r=e;r<t.length;r++)if(t[r]!==n[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,n.a=function(t,n){var e,c;function l(){e=o?new WeakMap:i()}function f(){var e,r,o,a,i,l=arguments.length;for(a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];for(i=n.apply(null,a),(e=c(i)).isUniqueByDependants||(e.lastDependants&&!u(i,e.lastDependants,0)&&e.clear(),e.lastDependants=i),r=e.head;r;){if(u(r.args,a,1))return r!==e.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=e.head,r.prev=null,e.head.prev=r,e.head=r),r.val;r=r.next}return r={val:t.apply(null,a)},a[0]=null,r.args=a,e.head&&(e.head.prev=r,r.next=e.head),e.head=r,r.val}return n||(n=a),c=o?function(t){var n,o,a,u,c,l=e,f=!0;for(n=0;n<t.length;n++){if(!(c=o=t[n])||"object"!=typeof c){f=!1;break}l.has(o)?l=l.get(o):(a=new WeakMap,l.set(o,a),l=a)}return l.has(r)||((u=i()).isUniqueByDependants=f,l.set(r,u)),l.get(r)}:function(){return e},f.getDependants=n,f.clear=l,l(),f}},6:function(t,n,e){"use strict";function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}e.d(n,"a",(function(){return r}))}});
|
build/api-fetch/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'c479a7e1738706aa7a8865b9a85c4fce');
|
build/api-fetch/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.apiFetch=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=426)}({1:function(e,t){e.exports=window.wp.i18n},15:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(45);function o(e,t){if(null==e)return{};var r,o,c=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},17:function(e,t){e.exports=window.regeneratorRuntime},28:function(e,t){e.exports=window.wp.url},37:function(e,t,r){"use strict";function n(e,t,r,n,o,c,i){try{var u=e[c](i),a=u.value}catch(e){return void r(e)}u.done?t(a):Promise.resolve(a).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,c){var i=e.apply(t,r);function u(e){n(i,o,c,u,a,"next",e)}function a(e){n(i,o,c,u,a,"throw",e)}u(void 0)}))}}r.d(t,"a",(function(){return o}))},426:function(e,t,r){"use strict";r.r(t);var n=r(6),o=r(15),c=r(1);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=function(e,t){var r,n,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),o=(n=e.endpoint.replace(/^\//,""))?r+"/"+n:r),delete e.namespace,delete e.endpoint,t(s(s({},e),{},{path:o}))};function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e){var t=e.split("?"),r=t[1],n=t[0];return r?n+"?"+r.split("&").map((function(e){return e.split("=")})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.join("=")})).join("&"):n}var b=r(17),d=r.n(b),j=r(37),y=r(28);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=function(e){return e.json?e.json():Promise.reject(e)},g=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},P=function(e){var t=e.path&&-1!==e.path.indexOf("per_page=-1"),r=e.url&&-1!==e.url.indexOf("per_page=-1");return t||r},m=function(){var e=Object(j.a)(d.a.mark((function e(t,r){var n,c,i,u,a,s;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",r(t));case 2:if(P(t)){e.next=4;break}return e.abrupt("return",r(t));case 4:return e.next=6,I(v(v({},(f={per_page:100},void 0,void 0,l=(p=t).path,O=p.url,v(v({},Object(o.a)(p,["path","url"])),{},{url:O&&Object(y.addQueryArgs)(O,f),path:l&&Object(y.addQueryArgs)(l,f)}))),{},{parse:!1}));case 6:return n=e.sent,e.next=9,w(n);case 9:if(c=e.sent,Array.isArray(c)){e.next=12;break}return e.abrupt("return",c);case 12:if(i=g(n)){e.next=15;break}return e.abrupt("return",c);case 15:u=[].concat(c);case 16:if(!i){e.next=27;break}return e.next=19,I(v(v({},t),{},{path:void 0,url:i,parse:!1}));case 19:return a=e.sent,e.next=22,w(a);case 22:s=e.sent,u=u.concat(s),i=g(a),e.next=16;break;case 27:return e.abrupt("return",u);case 28:case"end":return e.stop()}var p,f,l,O}),e)})));return function(t,r){return e.apply(this,arguments)}}();function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var S=new Set(["PATCH","PUT","DELETE"]),_=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},E=function(e){var t={code:"invalid_json",message:Object(c.__)("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},k=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(_(e,t)).catch((function(e){return T(e,t)}))};function T(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return E(e).then((function(e){var t={code:"unknown_error",message:Object(c.__)("An unknown error occurred.")};throw e||t}))}function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Q={Accept:"application/json, */*;q=0.1"},R={credentials:"include"},L=[function(e,t){return"string"!=typeof e.url||Object(y.hasQueryArg)(e.url,"_locale")||(e.url=Object(y.addQueryArgs)(e.url,{_locale:"user"})),"string"!=typeof e.path||Object(y.hasQueryArg)(e.path,"_locale")||(e.path=Object(y.addQueryArgs)(e.path,{_locale:"user"})),t(e)},p,function(e,t){var r=e.method,n=void 0===r?"GET":r;return S.has(n.toUpperCase())&&(e=D(D({},e),{},{headers:D(D({},e.headers),{},{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),t(e)},m],U=function(e){if(e.status>=200&&e.status<300)return e;throw e},G=function(e){var t=e.url,r=e.path,n=e.data,i=e.parse,u=void 0===i||i,a=Object(o.a)(e,["url","path","data","parse"]),s=e.body,p=e.headers;return p=N(N({},Q),p),n&&(s=JSON.stringify(n),p["Content-Type"]="application/json"),window.fetch(t||r,N(N(N({},R),a),{},{body:s,headers:p})).then((function(e){return Promise.resolve(e).then(U).catch((function(e){return T(e,u)})).then((function(e){return k(e,u)}))}),(function(){throw{code:"fetch_error",message:Object(c.__)("You are probably offline.")}}))};function H(e){return L.reduceRight((function(e,t){return function(r){return t(r,e)}}),G)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(H.nonceEndpoint).then(U).then((function(e){return e.text()})).then((function(t){return H.nonceMiddleware.nonce=t,H(e)}))}))}H.use=function(e){L.unshift(e)},H.setFetchHandler=function(e){G=e},H.createNonceMiddleware=function(e){function t(e,r){var n=e.headers,o=void 0===n?{}:n;for(var c in o)if("x-wp-nonce"===c.toLowerCase()&&o[c]===t.nonce)return r(e);return r(u(u({},e),{},{headers:u(u({},o),{},{"X-WP-Nonce":t.nonce})}))}return t.nonce=e,t},H.createPreloadingMiddleware=function(e){var t=Object.keys(e).reduce((function(t,r){return t[O(r)]=e[r],t}),{});return function(e,r){var n=e.parse,o=void 0===n||n;if("string"==typeof e.path){var c=e.method||"GET",i=O(e.path);if("GET"===c&&t[i]){var u=t[i];return delete t[i],Promise.resolve(o?u.body:new window.Response(JSON.stringify(u.body),{status:200,statusText:"OK",headers:u.headers}))}if("OPTIONS"===c&&t[c]&&t[c][i])return Promise.resolve(t[c][i])}return r(e)}},H.createRootURLMiddleware=function(e){return function(t,r){return p(t,(function(t){var n,o=t.url,c=t.path;return"string"==typeof c&&(n=e,-1!==e.indexOf("?")&&(c=c.replace("?","&")),c=c.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(c=c.replace("?","&")),o=n+c),r(l(l({},t),{},{url:o}))}))}},H.fetchAllMiddleware=m,H.mediaUploadMiddleware=function(e,t){if(!(e.path&&-1!==e.path.indexOf("/wp/v2/media")||e.url&&-1!==e.url.indexOf("/wp/v2/media")))return t(e,t);var r=0;return t(M(M({},e),{},{parse:!1})).catch((function(n){var o=n.headers.get("x-wp-upload-attachment-id");return n.status>=500&&n.status<600&&o?function e(n){return r++,t({path:"/wp/v2/media/".concat(n,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return r<5?e(n):(t({path:"/wp/v2/media/".concat(n,"?force=true"),method:"DELETE"}),Promise.reject())}))}(o).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:Object(c.__)("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(n)})):T(n,e.parse)})).then((function(t){return k(t,e.parse)}))};var I=t.default=H},45:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}r.d(t,"a",(function(){return n}))},6:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))}}).default;
|
1 |
+
window.wp=window.wp||{},window.wp.apiFetch=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=405)}({1:function(e,t){e.exports=window.wp.i18n},15:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(46);function o(e,t){if(null==e)return{};var r,o,c=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},17:function(e,t){e.exports=window.regeneratorRuntime},28:function(e,t){e.exports=window.wp.url},39:function(e,t,r){"use strict";function n(e,t,r,n,o,c,i){try{var u=e[c](i),a=u.value}catch(e){return void r(e)}u.done?t(a):Promise.resolve(a).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,c){var i=e.apply(t,r);function u(e){n(i,o,c,u,a,"next",e)}function a(e){n(i,o,c,u,a,"throw",e)}u(void 0)}))}}r.d(t,"a",(function(){return o}))},405:function(e,t,r){"use strict";r.r(t);var n=r(6),o=r(15),c=r(1);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=function(e,t){var r,n,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),o=(n=e.endpoint.replace(/^\//,""))?r+"/"+n:r),delete e.namespace,delete e.endpoint,t(s(s({},e),{},{path:o}))};function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e){var t=e.split("?"),r=t[1],n=t[0];return r?n+"?"+r.split("&").map((function(e){return e.split("=")})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.join("=")})).join("&"):n}var b=r(17),d=r.n(b),j=r(39),y=r(28);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=function(e){return e.json?e.json():Promise.reject(e)},g=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},P=function(e){var t=e.path&&-1!==e.path.indexOf("per_page=-1"),r=e.url&&-1!==e.url.indexOf("per_page=-1");return t||r},m=function(){var e=Object(j.a)(d.a.mark((function e(t,r){var n,c,i,u,a,s;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",r(t));case 2:if(P(t)){e.next=4;break}return e.abrupt("return",r(t));case 4:return e.next=6,I(v(v({},(f={per_page:100},void 0,void 0,l=(p=t).path,O=p.url,v(v({},Object(o.a)(p,["path","url"])),{},{url:O&&Object(y.addQueryArgs)(O,f),path:l&&Object(y.addQueryArgs)(l,f)}))),{},{parse:!1}));case 6:return n=e.sent,e.next=9,w(n);case 9:if(c=e.sent,Array.isArray(c)){e.next=12;break}return e.abrupt("return",c);case 12:if(i=g(n)){e.next=15;break}return e.abrupt("return",c);case 15:u=[].concat(c);case 16:if(!i){e.next=27;break}return e.next=19,I(v(v({},t),{},{path:void 0,url:i,parse:!1}));case 19:return a=e.sent,e.next=22,w(a);case 22:s=e.sent,u=u.concat(s),i=g(a),e.next=16;break;case 27:return e.abrupt("return",u);case 28:case"end":return e.stop()}var p,f,l,O}),e)})));return function(t,r){return e.apply(this,arguments)}}();function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var S=new Set(["PATCH","PUT","DELETE"]),_=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},E=function(e){var t={code:"invalid_json",message:Object(c.__)("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},k=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(_(e,t)).catch((function(e){return T(e,t)}))};function T(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return E(e).then((function(e){var t={code:"unknown_error",message:Object(c.__)("An unknown error occurred.")};throw e||t}))}function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Q={Accept:"application/json, */*;q=0.1"},R={credentials:"include"},L=[function(e,t){return"string"!=typeof e.url||Object(y.hasQueryArg)(e.url,"_locale")||(e.url=Object(y.addQueryArgs)(e.url,{_locale:"user"})),"string"!=typeof e.path||Object(y.hasQueryArg)(e.path,"_locale")||(e.path=Object(y.addQueryArgs)(e.path,{_locale:"user"})),t(e)},p,function(e,t){var r=e.method,n=void 0===r?"GET":r;return S.has(n.toUpperCase())&&(e=D(D({},e),{},{headers:D(D({},e.headers),{},{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),t(e)},m],U=function(e){if(e.status>=200&&e.status<300)return e;throw e},G=function(e){var t=e.url,r=e.path,n=e.data,i=e.parse,u=void 0===i||i,a=Object(o.a)(e,["url","path","data","parse"]),s=e.body,p=e.headers;return p=N(N({},Q),p),n&&(s=JSON.stringify(n),p["Content-Type"]="application/json"),window.fetch(t||r,N(N(N({},R),a),{},{body:s,headers:p})).then((function(e){return Promise.resolve(e).then(U).catch((function(e){return T(e,u)})).then((function(e){return k(e,u)}))}),(function(){throw{code:"fetch_error",message:Object(c.__)("You are probably offline.")}}))};function H(e){return L.reduceRight((function(e,t){return function(r){return t(r,e)}}),G)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(H.nonceEndpoint).then(U).then((function(e){return e.text()})).then((function(t){return H.nonceMiddleware.nonce=t,H(e)}))}))}H.use=function(e){L.unshift(e)},H.setFetchHandler=function(e){G=e},H.createNonceMiddleware=function(e){function t(e,r){var n=e.headers,o=void 0===n?{}:n;for(var c in o)if("x-wp-nonce"===c.toLowerCase()&&o[c]===t.nonce)return r(e);return r(u(u({},e),{},{headers:u(u({},o),{},{"X-WP-Nonce":t.nonce})}))}return t.nonce=e,t},H.createPreloadingMiddleware=function(e){var t=Object.keys(e).reduce((function(t,r){return t[O(r)]=e[r],t}),{});return function(e,r){var n=e.parse,o=void 0===n||n;if("string"==typeof e.path){var c=e.method||"GET",i=O(e.path);if("GET"===c&&t[i]){var u=t[i];return delete t[i],Promise.resolve(o?u.body:new window.Response(JSON.stringify(u.body),{status:200,statusText:"OK",headers:u.headers}))}if("OPTIONS"===c&&t[c]&&t[c][i])return Promise.resolve(t[c][i])}return r(e)}},H.createRootURLMiddleware=function(e){return function(t,r){return p(t,(function(t){var n,o=t.url,c=t.path;return"string"==typeof c&&(n=e,-1!==e.indexOf("?")&&(c=c.replace("?","&")),c=c.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(c=c.replace("?","&")),o=n+c),r(l(l({},t),{},{url:o}))}))}},H.fetchAllMiddleware=m,H.mediaUploadMiddleware=function(e,t){if(!(e.path&&-1!==e.path.indexOf("/wp/v2/media")||e.url&&-1!==e.url.indexOf("/wp/v2/media")))return t(e,t);var r=0;return t(M(M({},e),{},{parse:!1})).catch((function(n){var o=n.headers.get("x-wp-upload-attachment-id");return n.status>=500&&n.status<600&&o?function e(n){return r++,t({path:"/wp/v2/media/".concat(n,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return r<5?e(n):(t({path:"/wp/v2/media/".concat(n,"?force=true"),method:"DELETE"}),Promise.reject())}))}(o).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:Object(c.__)("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(n)})):T(n,e.parse)})).then((function(t){return k(t,e.parse)}))};var I=t.default=H},46:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}r.d(t,"a",(function(){return n}))},6:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))}}).default;
|
build/autop/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => 'ef8954f69b8115f331f7ee4aa09c7184');
|
build/autop/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.autop=function(e){var r={};function n(t){if(r[t])return r[t].exports;var p=r[t]={i:t,l:!1,exports:{}};return e[t].call(p.exports,p,p.exports,n),p.l=!0,p.exports}return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var p in e)n.d(t,p,function(r){return e[r]}.bind(null,p));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=
|
1 |
+
window.wp=window.wp||{},window.wp.autop=function(e){var r={};function n(t){if(r[t])return r[t].exports;var p=r[t]={i:t,l:!1,exports:{}};return e[t].call(p.exports,p,p.exports,n),p.l=!0,p.exports}return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var p in e)n.d(t,p,function(r){return e[r]}.bind(null,p));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=275)}({25:function(e,r,n){"use strict";function t(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}n.d(r,"a",(function(){return t}))},275:function(e,r,n){"use strict";n.r(r),n.d(r,"autop",(function(){return a})),n.d(r,"removep",(function(){return o}));var t=n(9),p=new RegExp("(<((?=!--|!\\[CDATA\\[)((?=!-)!(?:-(?!->)[^\\-]*)*(?:--\x3e)?|!\\[CDATA\\[[^\\]]*(?:](?!]>)[^\\]]*)*?(?:]]>)?)|[^>]*>?))");function c(e,r){for(var n=function(e){for(var r,n=[],t=e;r=t.match(p);){var c=r.index;n.push(t.slice(0,c)),n.push(r[0]),t=t.slice(c+r[0].length)}return t.length&&n.push(t),n}(e),t=!1,c=Object.keys(r),a=1;a<n.length;a+=2)for(var o=0;o<c.length;o++){var i=c[o];if(-1!==n[a].indexOf(i)){n[a]=n[a].replace(new RegExp(i,"g"),r[i]),t=!0;break}}return t&&(e=n.join("")),e}function a(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];if(""===e.trim())return"";if(-1!==(e+="\n").indexOf("<pre")){var p=e.split("</pre>"),a=p.pop();e="";for(var o=0;o<p.length;o++){var i=p[o],l=i.indexOf("<pre");if(-1!==l){var u="<pre wp-pre-tag-"+o+"></pre>";n.push([u,i.substr(l)+"</pre>"]),e+=i.substr(0,l)+u}else e+=i}e+=a}var s="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";-1!==(e=c(e=(e=(e=(e=e.replace(/<br\s*\/?>\s*<br\s*\/?>/g,"\n\n")).replace(new RegExp("(<"+s+"[\\s/>])","g"),"\n\n$1")).replace(new RegExp("(</"+s+">)","g"),"$1\n\n")).replace(/\r\n|\r/g,"\n"),{"\n":" \x3c!-- wpnl --\x3e "})).indexOf("<option")&&(e=(e=e.replace(/\s*<option/g,"<option")).replace(/<\/option>\s*/g,"</option>")),-1!==e.indexOf("</object>")&&(e=(e=(e=e.replace(/(<object[^>]*>)\s*/g,"$1")).replace(/\s*<\/object>/g,"</object>")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),-1===e.indexOf("<source")&&-1===e.indexOf("<track")||(e=(e=(e=e.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/g,"$1")).replace(/\s*([<\[]\/(?:audio|video)[>\]])/g,"$1")).replace(/\s*(<(?:source|track)[^>]*>)\s*/g,"$1")),-1!==e.indexOf("<figcaption")&&(e=(e=e.replace(/\s*(<figcaption[^>]*>)/,"$1")).replace(/<\/figcaption>\s*/,"</figcaption>"));var f=(e=e.replace(/\n\n+/g,"\n\n")).split(/\n\s*\n/).filter(Boolean);return e="",f.forEach((function(r){e+="<p>"+r.replace(/^\n*|\n*$/g,"")+"</p>\n"})),e=(e=(e=(e=(e=(e=(e=(e=e.replace(/<p>\s*<\/p>/g,"")).replace(/<p>([^<]+)<\/(div|address|form)>/g,"<p>$1</p></$2>")).replace(new RegExp("<p>\\s*(</?"+s+"[^>]*>)\\s*</p>","g"),"$1")).replace(/<p>(<li.+?)<\/p>/g,"$1")).replace(/<p><blockquote([^>]*)>/gi,"<blockquote$1><p>")).replace(/<\/blockquote><\/p>/g,"</p></blockquote>")).replace(new RegExp("<p>\\s*(</?"+s+"[^>]*>)","g"),"$1")).replace(new RegExp("(</?"+s+"[^>]*>)\\s*</p>","g"),"$1"),r&&(e=(e=(e=(e=e.replace(/<(script|style).*?<\/\\1>/g,(function(e){return e[0].replace(/\n/g,"<WPPreserveNewline />")}))).replace(/<br>|<br\/>/g,"<br />")).replace(/(<br \/>)?\s*\n/g,(function(e,r){return r?e:"<br />\n"}))).replace(/<WPPreserveNewline \/>/g,"\n")),e=(e=(e=e.replace(new RegExp("(</?"+s+"[^>]*>)\\s*<br />","g"),"$1")).replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1")).replace(/\n<\/p>$/g,"</p>"),n.forEach((function(r){var n=Object(t.a)(r,2),p=n[0],c=n[1];e=e.replace(p,c)})),-1!==e.indexOf("\x3c!-- wpnl --\x3e")&&(e=e.replace(/\s?<!-- wpnl -->\s?/g,"\n")),e}function o(e){var r="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure",n=r+"|div|p",t=r+"|pre",p=[],c=!1,a=!1;return e?(-1===e.indexOf("<script")&&-1===e.indexOf("<style")||(e=e.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g,(function(e){return p.push(e),"<wp-preserve>"}))),-1!==e.indexOf("<pre")&&(c=!0,e=e.replace(/<pre[^>]*>[\s\S]+?<\/pre>/g,(function(e){return(e=(e=e.replace(/<br ?\/?>(\r\n|\n)?/g,"<wp-line-break>")).replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"<wp-line-break>")).replace(/\r?\n/g,"<wp-line-break>")}))),-1!==e.indexOf("[caption")&&(a=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,(function(e){return e.replace(/<br([^>]*)>/g,"<wp-temp-br$1>").replace(/[\r\n\t]+/,"")}))),-1!==(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("\\s*</("+n+")>\\s*","g"),"</$1>\n")).replace(new RegExp("\\s*<((?:"+n+")(?: [^>]*)?)>","g"),"\n<$1>")).replace(/(<p [^>]+>[\s\S]*?)<\/p>/g,"$1</p#>")).replace(/<div( [^>]*)?>\s*<p>/gi,"<div$1>\n\n")).replace(/\s*<p>/gi,"")).replace(/\s*<\/p>\s*/gi,"\n\n")).replace(/\n[\s\u00a0]+\n/g,"\n\n")).replace(/(\s*)<br ?\/?>\s*/gi,(function(e,r){return r&&-1!==r.indexOf("\n")?"\n\n":"\n"}))).replace(/\s*<div/g,"\n<div")).replace(/<\/div>\s*/g,"</div>\n")).replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n")).replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption")).replace(new RegExp("\\s*<((?:"+t+")(?: [^>]*)?)\\s*>","g"),"\n<$1>")).replace(new RegExp("\\s*</("+t+")>\\s*","g"),"</$1>\n")).replace(/<((li|dt|dd)[^>]*)>/g," \t<$1>")).indexOf("<option")&&(e=(e=e.replace(/\s*<option/g,"\n<option")).replace(/\s*<\/select>/g,"\n</select>")),-1!==e.indexOf("<hr")&&(e=e.replace(/\s*<hr( [^>]*)?>\s*/g,"\n\n<hr$1>\n\n")),-1!==e.indexOf("<object")&&(e=e.replace(/<object[\s\S]+?<\/object>/g,(function(e){return e.replace(/[\r\n]+/g,"")}))),e=(e=(e=(e=e.replace(/<\/p#>/g,"</p>\n")).replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g,"\n$1")).replace(/^\s+/,"")).replace(/[\s\u00a0]+$/,""),c&&(e=e.replace(/<wp-line-break>/g,"\n")),a&&(e=e.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),p.length&&(e=e.replace(/<wp-preserve>/g,(function(){return p.shift()}))),e):""}},29:function(e,r,n){"use strict";n.d(r,"a",(function(){return p}));var t=n(25);function p(e,r){if(e){if("string"==typeof e)return Object(t.a)(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(t.a)(e,r):void 0}}},37:function(e,r,n){"use strict";function t(e){if(Array.isArray(e))return e}n.d(r,"a",(function(){return t}))},38:function(e,r,n){"use strict";function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(r,"a",(function(){return t}))},9:function(e,r,n){"use strict";n.d(r,"a",(function(){return a}));var t=n(37),p=n(29),c=n(38);function a(e,r){return Object(t.a)(e)||function(e,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],t=!0,p=!1,c=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done)&&(n.push(a.value),!r||n.length!==r);t=!0);}catch(e){p=!0,c=e}finally{try{t||null==o.return||o.return()}finally{if(p)throw c}}return n}}(e,r)||Object(p.a)(e,r)||Object(c.a)()}}});
|
build/blob/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => 'dff7c3ba71c01ce5bb3147a0300b33f2');
|
build/blob/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.blob=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=
|
1 |
+
window.wp=window.wp||{},window.wp.blob=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=276)}({276:function(e,n,t){"use strict";t.r(n),t.d(n,"createBlobURL",(function(){return f})),t.d(n,"getBlobByURL",(function(){return c})),t.d(n,"getBlobTypeByURL",(function(){return l})),t.d(n,"revokeBlobURL",(function(){return d})),t.d(n,"isBlobURL",(function(){return a}));var r=window.URL,o=r.createObjectURL,u=r.revokeObjectURL,i={};function f(e){var n=o(e);return i[n]=e,n}function c(e){return i[e]}function l(e){var n;return null===(n=c(e))||void 0===n?void 0:n.type.split("/")[0]}function d(e){i[e]&&u(e),delete i[e]}function a(e){return!(!e||!e.indexOf)&&0===e.indexOf("blob:")}}});
|
build/block-directory/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => 'e537dbe83eb65afae9db3ae30b6900ef');
|
build/block-directory/index.js
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.blockDirectory=function(e){var t={};function n(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,n),c.l=!0,c.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(r,c,function(t){return e[t]}.bind(null,c));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=417)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},11:function(e,t){e.exports=window.wp.blocks},13:function(e,t){e.exports=window.wp.compose},133:function(e,t,n){"use strict";var r=n(6),c=n(15),o=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,i=void 0===n?24:n,l=Object(c.a)(e,["icon","size"]);return Object(o.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:i,height:i},l))}},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(45);function c(e,t){if(null==e)return{};var n,c,o=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(c=0;c<a.length;c++)n=a[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},16:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(25),c=n(36),o=n(29);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(c.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},162:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.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"}));t.a=o},17:function(e,t){e.exports=window.regeneratorRuntime},183:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));t.a=o},184:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}));t.a=o},2:function(e,t){e.exports=window.lodash},25:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},264:function(e,t){e.exports=window.wp.editPost},289:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(c.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.a=o},29:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(25);function c(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},3:function(e,t){e.exports=window.wp.components},32:function(e,t){e.exports=window.wp.hooks},36:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},37:function(e,t,n){"use strict";function r(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(c,o){var a=e.apply(t,n);function i(e){r(a,c,o,i,l,"next",e)}function l(e){r(a,c,o,i,l,"throw",e)}i(void 0)}))}}n.d(t,"a",(function(){return c}))},38:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},39:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},4:function(e,t){e.exports=window.wp.data},41:function(e,t){e.exports=window.wp.apiFetch},417:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"isRequestingDownloadableBlocks",(function(){return O})),n.d(r,"getDownloadableBlocks",(function(){return p})),n.d(r,"getInstalledBlockTypes",(function(){return m})),n.d(r,"getNewBlockTypes",(function(){return j})),n.d(r,"getUnusedBlockTypes",(function(){return k})),n.d(r,"isInstalling",(function(){return y})),n.d(r,"getErrorNotices",(function(){return w})),n.d(r,"getErrorNoticeForBlock",(function(){return h}));var c={};n.r(c),n.d(c,"fetchDownloadableBlocks",(function(){return A})),n.d(c,"receiveDownloadableBlocks",(function(){return R})),n.d(c,"installBlockType",(function(){return M})),n.d(c,"uninstallBlockType",(function(){return F})),n.d(c,"addInstalledBlockType",(function(){return V})),n.d(c,"removeInstalledBlockType",(function(){return z})),n.d(c,"setIsInstalling",(function(){return H})),n.d(c,"setErrorNotice",(function(){return K})),n.d(c,"clearErrorNotice",(function(){return U})),n(84);var o=n(6),a=n(4),i=n(58),l=n(16),s=n(2);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){Object(o.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=Object(a.combineReducers)({downloadableBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_DOWNLOADABLE_BLOCKS":return b(b({},e),{},Object(o.a)({},t.filterValue,{isRequesting:!0}));case"RECEIVE_DOWNLOADABLE_BLOCKS":return b(b({},e),{},Object(o.a)({},t.filterValue,{results:t.downloadableBlocks,isRequesting:!1}))}return e},blockManagement:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{installedBlockTypes:[],isInstalling:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_INSTALLED_BLOCK_TYPE":return b(b({},e),{},{installedBlockTypes:[].concat(Object(l.a)(e.installedBlockTypes),[t.item])});case"REMOVE_INSTALLED_BLOCK_TYPE":return b(b({},e),{},{installedBlockTypes:e.installedBlockTypes.filter((function(e){return e.name!==t.item.name}))});case"SET_INSTALLING_BLOCK":return b(b({},e),{},{isInstalling:b(b({},e.isInstalling),{},Object(o.a)({},t.blockId,t.isInstalling))})}return e},errorNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ERROR_NOTICE":return b(b({},e),{},Object(o.a)({},t.blockId,{message:t.message,isFatal:t.isFatal}));case"CLEAR_ERROR_NOTICE":return Object(s.omit)(e,t.blockId)}return e}});function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t.length)return!1;if(t.some((function(t){return t.name===e.name})))return!0;for(var n=0;n<t.length;n++)if(f(e,t[n].innerBlocks))return!0;return!1}function O(e,t){return!(!e.downloadableBlocks[t]||!e.downloadableBlocks[t].isRequesting)&&e.downloadableBlocks[t].isRequesting}function p(e,t){return e.downloadableBlocks[t]&&e.downloadableBlocks[t].results?e.downloadableBlocks[t].results:[]}function m(e){return e.blockManagement.installedBlockTypes}var j=Object(a.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return m(t).filter((function(e){return f(e,n)}))}})),k=Object(a.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return m(t).filter((function(e){return!f(e,n)}))}}));function y(e,t){return e.blockManagement.isInstalling[t]||!1}function w(e){return e.errorNotices}function h(e,t){return e.errorNotices[t]}var g=n(17),v=n.n(g),_=n(1),E=n(37),B=n(41),x=n.n(B),S=function(e){return new Promise((function(t,n){var r=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach((function(t){e[t]&&(r[t]=e[t])})),e.innerHTML&&r.appendChild(document.createTextNode(e.innerHTML)),r.onload=function(){return t(!0)},r.onerror=function(){return n(new Error("Error loading asset."))},document.body.appendChild(r),("link"===r.nodeName.toLowerCase()||"script"===r.nodeName.toLowerCase()&&!r.src)&&t()}))};function P(e){return{type:"LOAD_ASSETS",assets:e}}var N={LOAD_ASSETS:function(){return x()({url:document.location.href,parse:!1}).then((function(e){return e.text()})).then((function(e){var t=(new window.DOMParser).parseFromString(e,"text/html"),n=Array.from(t.querySelectorAll('link[rel="stylesheet"],script')).filter((function(e){return e.id&&!document.getElementById(e.id)}));return new Promise(function(){var e=Object(E.a)(v.a.mark((function e(t,r){var c;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=v.a.keys(n);case 1:if((e.t1=e.t0()).done){e.next=13;break}return c=e.t1.value,e.prev=3,e.next=6,S(n[c]);case 6:e.next=11;break;case 8:e.prev=8,e.t2=e.catch(3),r(e.t2);case 11:e.next=1;break;case 13:t();case 14:case"end":return e.stop()}}),e,null,[[3,8]])})));return function(t,n){return e.apply(this,arguments)}}())}))}};function T(e){if(!e)return!1;var t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}var I=v.a.mark(M),L=v.a.mark(F);function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){Object(o.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function R(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}function M(e){var t,n,r,c,o,l,s,u,b;return v.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return t=e.id,n=e.assets,r=!1,d.next=4,U(t);case 4:return d.prev=4,d.next=7,H(e.id,!0);case 7:if(c=T(e),o={},!c){d.next=14;break}return d.next=12,Object(i.apiFetch)({url:c,data:{status:"active"},method:"PUT"});case 12:d.next=18;break;case 14:return d.next=16,Object(i.apiFetch)({path:"wp/v2/plugins",data:{slug:e.id,status:"active"},method:"POST"});case 16:l=d.sent,o=l._links;case 18:return d.next=20,V(C(C({},e),{},{links:C(C({},e.links),o)}));case 20:return d.next=22,P(n);case 22:return d.next=24,a.controls.select("core/blocks","getBlockTypes");case 24:if(d.sent.some((function(t){return t.name===e.name}))){d.next=27;break}throw new Error(Object(_.__)("Error registering block. Try reloading the page."));case 27:r=!0,d.next=38;break;case 30:return d.prev=30,d.t0=d.catch(4),s=d.t0.message||Object(_.__)("An error occurred."),u=d.t0 instanceof Error,(b={folder_exists:Object(_.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:Object(_.__)("Error installing block. You can reload the page and try again.")})[d.t0.code]&&(u=!0,s=b[d.t0.code]),d.next=38,K(t,s,u);case 38:return d.next=40,H(e.id,!1);case 40:return d.abrupt("return",r);case 41:case"end":return d.stop()}}),I,null,[[4,30]])}function F(e){return v.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(i.apiFetch)({url:T(e),data:{status:"inactive"},method:"PUT"});case 3:return t.next=5,Object(i.apiFetch)({url:T(e),method:"DELETE"});case 5:return t.next=7,z(e);case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(0),t.next=13,a.controls.dispatch("core/notices","createErrorNotice",t.t0.message||Object(_.__)("An error occurred."));case 13:case"end":return t.stop()}}),L,null,[[0,9]])}function V(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function z(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function H(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:n}}function U(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var W={getDownloadableBlocks:v.a.mark((function e(t){var n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,A(t);case 5:return e.next=7,Object(i.apiFetch)({path:"wp/v2/block-directory/search?term=".concat(t)});case 7:return n=e.sent,r=n.map((function(e){return Object(s.mapKeys)(e,(function(e,t){return Object(s.camelCase)(t)}))})),e.next=11,R(r,t);case 11:e.next=15;break;case 13:e.prev=13,e.t0=e.catch(2);case 15:case"end":return e.stop()}}),e,null,[[2,13]])}))};function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){Object(o.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $={reducer:d,selectors:r,actions:c,controls:G(G({},i.controls),N),resolvers:W},q=(Object(a.registerStore)("core/block-directory",$),n(0)),J=n(68),Q=n(32),X=n(11);function Z(){var e=Object(a.useDispatch)("core/block-directory").uninstallBlockType,t=Object(a.useSelect)((function(e){var t=e("core/editor"),n=t.isAutosavingPost;return(0,t.isSavingPost)()&&!n()}),[]),n=Object(a.useSelect)((function(e){return e("core/block-directory").getUnusedBlockTypes()}),[]);return Object(q.useEffect)((function(){t&&n.length&&n.forEach((function(t){e(t),Object(X.unregisterBlockType)(t.name)}))}),[t]),null}var ee=n(9),te=n(5),ne=n(13),re=n(3),ce=n(51),oe=function(e){var t=e.author,n=e.authorBlockCount,r=e.authorBlockRating;return Object(q.createElement)(q.Fragment,null,Object(q.createElement)("span",{className:"block-directory-downloadable-block-author-info__content-author"},Object(_.sprintf)(
|
2 |
/* translators: %s: author name. */
|
3 |
-
Object(
|
4 |
/* translators: 1: number of blocks. 2: average rating. */
|
5 |
-
Object(
|
6 |
/* translators: 1: number of blocks. */
|
7 |
-
Object(
|
8 |
/* translators: %s: number of stars. */
|
9 |
-
Object(
|
10 |
-
Object(
|
11 |
-
Object(
|
12 |
/* translators: %d: number of active installations. */
|
13 |
-
Object(
|
14 |
/* translators: %d: number of active installations. */
|
15 |
-
Object(
|
16 |
-
Object(
|
17 |
/* translators: %s: number of available blocks. */
|
18 |
-
Object(
|
19 |
/* translators: %s: Name of the block author. */
|
20 |
-
Object(
|
21 |
-
Object(
|
22 |
/* translators: %s: block name */
|
23 |
-
Object(
|
24 |
/* translators: %s: block name */
|
25 |
-
Object(
|
26 |
/* translators: %s: block name */
|
27 |
-
Object(
|
1 |
+
window.wp=window.wp||{},window.wp.blockDirectory=function(e){var t={};function n(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,n),c.l=!0,c.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(r,c,function(t){return e[t]}.bind(null,c));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=397)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){e.exports=window.wp.blocks},13:function(e,t){e.exports=window.wp.compose},130:function(e,t,n){"use strict";var r=n(6),c=n(15),o=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,i=void 0===n?24:n,l=Object(c.a)(e,["icon","size"]);return Object(o.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:i,height:i},l))}},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(46);function c(e,t){if(null==e)return{};var n,c,o=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(c=0;c<a.length;c++)n=a[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},158:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.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"}));t.a=o},16:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(25),c=n(36),o=n(29);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(c.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},17:function(e,t){e.exports=window.regeneratorRuntime},177:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));t.a=o},178:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}));t.a=o},2:function(e,t){e.exports=window.lodash},25:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},252:function(e,t){e.exports=window.wp.editPost},277:function(e,t,n){"use strict";var r=n(0),c=n(7),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(c.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.a=o},29:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(25);function c(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},3:function(e,t){e.exports=window.wp.components},32:function(e,t){e.exports=window.wp.hooks},36:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},37:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},38:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},39:function(e,t,n){"use strict";function r(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(c,o){var a=e.apply(t,n);function i(e){r(a,c,o,i,l,"next",e)}function l(e){r(a,c,o,i,l,"throw",e)}i(void 0)}))}}n.d(t,"a",(function(){return c}))},397:function(e,t,n){"use strict";n.r(t),n.d(t,"store",(function(){return Z}));var r={};n.r(r),n.d(r,"isRequestingDownloadableBlocks",(function(){return k})),n.d(r,"getDownloadableBlocks",(function(){return y})),n.d(r,"getInstalledBlockTypes",(function(){return w})),n.d(r,"getNewBlockTypes",(function(){return h})),n.d(r,"getUnusedBlockTypes",(function(){return g})),n.d(r,"isInstalling",(function(){return v})),n.d(r,"getErrorNotices",(function(){return _})),n.d(r,"getErrorNoticeForBlock",(function(){return E}));var c={};n.r(c),n.d(c,"fetchDownloadableBlocks",(function(){return V})),n.d(c,"receiveDownloadableBlocks",(function(){return z})),n.d(c,"installBlockType",(function(){return H})),n.d(c,"uninstallBlockType",(function(){return K})),n.d(c,"addInstalledBlockType",(function(){return U})),n.d(c,"removeInstalledBlockType",(function(){return W})),n.d(c,"setIsInstalling",(function(){return Y})),n.d(c,"setErrorNotice",(function(){return G})),n.d(c,"clearErrorNotice",(function(){return $})),n(84);var o=n(0),a=n(68),i=n(32),l=n(10),s=n(4),u=n(6),b=n(56),d=n(16),f=n(2);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=Object(s.combineReducers)({downloadableBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_DOWNLOADABLE_BLOCKS":return p(p({},e),{},Object(u.a)({},t.filterValue,{isRequesting:!0}));case"RECEIVE_DOWNLOADABLE_BLOCKS":return p(p({},e),{},Object(u.a)({},t.filterValue,{results:t.downloadableBlocks,isRequesting:!1}))}return e},blockManagement:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{installedBlockTypes:[],isInstalling:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_INSTALLED_BLOCK_TYPE":return p(p({},e),{},{installedBlockTypes:[].concat(Object(d.a)(e.installedBlockTypes),[t.item])});case"REMOVE_INSTALLED_BLOCK_TYPE":return p(p({},e),{},{installedBlockTypes:e.installedBlockTypes.filter((function(e){return e.name!==t.item.name}))});case"SET_INSTALLING_BLOCK":return p(p({},e),{},{isInstalling:p(p({},e.isInstalling),{},Object(u.a)({},t.blockId,t.isInstalling))})}return e},errorNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ERROR_NOTICE":return p(p({},e),{},Object(u.a)({},t.blockId,{message:t.message,isFatal:t.isFatal}));case"CLEAR_ERROR_NOTICE":return Object(f.omit)(e,t.blockId)}return e}});function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t.length)return!1;if(t.some((function(t){return t.name===e.name})))return!0;for(var n=0;n<t.length;n++)if(j(e,t[n].innerBlocks))return!0;return!1}function k(e,t){return!(!e.downloadableBlocks[t]||!e.downloadableBlocks[t].isRequesting)&&e.downloadableBlocks[t].isRequesting}function y(e,t){return e.downloadableBlocks[t]&&e.downloadableBlocks[t].results?e.downloadableBlocks[t].results:[]}function w(e){return e.blockManagement.installedBlockTypes}var h=Object(s.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return w(t).filter((function(e){return j(e,n)}))}})),g=Object(s.createRegistrySelector)((function(e){return function(t){var n=e("core/block-editor").getBlocks();return w(t).filter((function(e){return!j(e,n)}))}}));function v(e,t){return e.blockManagement.isInstalling[t]||!1}function _(e){return e.errorNotices}function E(e,t){return e.errorNotices[t]}var B=n(17),x=n.n(B),S=n(1),P=n(39),N=n(43),T=n.n(N),I=function(e){return new Promise((function(t,n){var r=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach((function(t){e[t]&&(r[t]=e[t])})),e.innerHTML&&r.appendChild(document.createTextNode(e.innerHTML)),r.onload=function(){return t(!0)},r.onerror=function(){return n(new Error("Error loading asset."))},document.body.appendChild(r),("link"===r.nodeName.toLowerCase()||"script"===r.nodeName.toLowerCase()&&!r.src)&&t()}))};function L(e){return{type:"LOAD_ASSETS",assets:e}}var D={LOAD_ASSETS:function(){return T()({url:document.location.href,parse:!1}).then((function(e){return e.text()})).then((function(e){var t=(new window.DOMParser).parseFromString(e,"text/html"),n=Array.from(t.querySelectorAll('link[rel="stylesheet"],script')).filter((function(e){return e.id&&!document.getElementById(e.id)}));return new Promise(function(){var e=Object(P.a)(x.a.mark((function e(t,r){var c;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=x.a.keys(n);case 1:if((e.t1=e.t0()).done){e.next=13;break}return c=e.t1.value,e.prev=3,e.next=6,I(n[c]);case 6:e.next=11;break;case 8:e.prev=8,e.t2=e.catch(3),r(e.t2);case 11:e.next=1;break;case 13:t();case 14:case"end":return e.stop()}}),e,null,[[3,8]])})));return function(t,n){return e.apply(this,arguments)}}())}))}};function C(e){if(!e)return!1;var t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}var A=x.a.mark(H),R=x.a.mark(K);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function z(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}function H(e){var t,n,r,c,o,a,i,u,d;return x.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return t=e.id,n=e.assets,r=!1,f.next=4,$(t);case 4:return f.prev=4,f.next=7,Y(e.id,!0);case 7:if(c=C(e),o={},!c){f.next=14;break}return f.next=12,Object(b.apiFetch)({url:c,data:{status:"active"},method:"PUT"});case 12:f.next=18;break;case 14:return f.next=16,Object(b.apiFetch)({path:"wp/v2/plugins",data:{slug:e.id,status:"active"},method:"POST"});case 16:a=f.sent,o=a._links;case 18:return f.next=20,U(F(F({},e),{},{links:F(F({},e.links),o)}));case 20:return f.next=22,L(n);case 22:return f.next=24,s.controls.select(l.store.name,"getBlockTypes");case 24:if(f.sent.some((function(t){return t.name===e.name}))){f.next=27;break}throw new Error(Object(S.__)("Error registering block. Try reloading the page."));case 27:r=!0,f.next=38;break;case 30:return f.prev=30,f.t0=f.catch(4),i=f.t0.message||Object(S.__)("An error occurred."),u=f.t0 instanceof Error,(d={folder_exists:Object(S.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:Object(S.__)("Error installing block. You can reload the page and try again.")})[f.t0.code]&&(u=!0,i=d[f.t0.code]),f.next=38,G(t,i,u);case 38:return f.next=40,Y(e.id,!1);case 40:return f.abrupt("return",r);case 41:case"end":return f.stop()}}),A,null,[[4,30]])}function K(e){return x.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(b.apiFetch)({url:C(e),data:{status:"inactive"},method:"PUT"});case 3:return t.next=5,Object(b.apiFetch)({url:C(e),method:"DELETE"});case 5:return t.next=7,W(e);case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(0),t.next=13,s.controls.dispatch("core/notices","createErrorNotice",t.t0.message||Object(S.__)("An error occurred."));case 13:case"end":return t.stop()}}),R,null,[[0,9]])}function U(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function W(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function Y(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function G(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:n}}function $(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var q={getDownloadableBlocks:x.a.mark((function e(t){var n,r;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,V(t);case 5:return e.next=7,Object(b.apiFetch)({path:"wp/v2/block-directory/search?term=".concat(t)});case 7:return n=e.sent,r=n.map((function(e){return Object(f.mapKeys)(e,(function(e,t){return Object(f.camelCase)(t)}))})),e.next=11,z(r,t);case 11:e.next=15;break;case 13:e.prev=13,e.t0=e.catch(2);case 15:case"end":return e.stop()}}),e,null,[[2,13]])}))};function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var X={reducer:m,selectors:r,actions:c,controls:Q(Q({},b.controls),D),resolvers:q},Z=Object(s.createReduxStore)("core/block-directory",X);function ee(){var e=Object(s.useDispatch)(Z).uninstallBlockType,t=Object(s.useSelect)((function(e){var t=e("core/editor"),n=t.isAutosavingPost;return(0,t.isSavingPost)()&&!n()}),[]),n=Object(s.useSelect)((function(e){return e(Z).getUnusedBlockTypes()}),[]);return Object(o.useEffect)((function(){t&&n.length&&n.forEach((function(t){e(t),Object(l.unregisterBlockType)(t.name)}))}),[t]),null}Object(s.register)(Z);var te=n(9),ne=n(5),re=n(13),ce=n(3),oe=n(52),ae=function(e){var t=e.author,n=e.authorBlockCount,r=e.authorBlockRating;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"block-directory-downloadable-block-author-info__content-author"},Object(S.sprintf)(
|
2 |
/* translators: %s: author name. */
|
3 |
+
Object(S.__)("Authored by %s"),t)),Object(o.createElement)("span",{className:"block-directory-downloadable-block-author-info__content"},r>0?Object(S.sprintf)(
|
4 |
/* translators: 1: number of blocks. 2: average rating. */
|
5 |
+
Object(S._n)("This author has %1$d block, with an average rating of %2$.1f.","This author has %1$d blocks, with an average rating of %2$.1f.",n),n,r):Object(S.sprintf)(
|
6 |
/* translators: 1: number of blocks. */
|
7 |
+
Object(S._n)("This author has %1$d block.","This author has %1$d blocks.",n),n)))},ie=n(76),le=n(130),se=n(177),ue=n(7),be=Object(o.createElement)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(ue.Path,{d:"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"})),de=n(178),fe=function(e){var t=e.rating,n=.5*Math.round(t/.5),r=Math.floor(t),c=Math.ceil(t-r),a=5-(r+c);return Object(o.createElement)("div",{"aria-label":Object(S.sprintf)(
|
8 |
/* translators: %s: number of stars. */
|
9 |
+
Object(S.__)("%s out of 5 stars"),n)},Object(f.times)(r,(function(e){return Object(o.createElement)(le.a,{key:"full_stars_".concat(e),icon:se.a,size:16})})),Object(f.times)(c,(function(e){return Object(o.createElement)(le.a,{key:"half_stars_".concat(e),icon:be,size:16})})),Object(f.times)(a,(function(e){return Object(o.createElement)(le.a,{key:"empty_stars_".concat(e),icon:de.a,size:16})})))},Oe=function(e){var t=e.rating,n=e.ratingCount;return Object(o.createElement)("div",{className:"block-directory-block-ratings"},Object(o.createElement)(fe,{rating:t}),Object(o.createElement)("span",{className:"block-directory-block-ratings__rating-count","aria-label":Object(S.sprintf)(// translators: %d: number of ratings (number).
|
10 |
+
Object(S._n)("%d total rating","%d total ratings",n),n)},"(",n,")"))},pe=function(e){var t=e.icon,n=e.title;return Object(o.createElement)("div",{className:"block-directory-downloadable-block-icon"},null!==t.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?Object(o.createElement)("img",{src:t,alt:Object(S.sprintf)(// translators: %s: Name of the plugin e.g: "Akismet".
|
11 |
+
Object(S.__)("%s block icon"),n)}):Object(o.createElement)(ne.BlockIcon,{icon:t,showColors:!0}))},me=function(e){var t=e.icon,n=e.title,r=e.rating,c=e.ratingCount,a=e.isLoading,i=void 0!==a&&a,l=e.isInstallable,s=void 0===l||l,u=e.onClick;return Object(o.createElement)("div",{className:"block-directory-downloadable-block-header__row"},Object(o.createElement)(pe,{icon:t,title:n}),Object(o.createElement)("div",{className:"block-directory-downloadable-block-header__column"},Object(o.createElement)("h2",{className:"block-directory-downloadable-block-header__title"},Object(ie.decodeEntities)(n)),Object(o.createElement)(Oe,{rating:r,ratingCount:c})),Object(o.createElement)(ce.Button,{isSecondary:!0,isBusy:i,disabled:i||!s,onClick:function(e){e.preventDefault(),!i&&s&&u()}},i?Object(S.__)("Adding…"):Object(S.__)("Add block")))},je=Object(o.createElement)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(o.createElement)(ue.Path,{d:"M18 3.5c0 .62-.38 1.16-.92 1.38v13.11H1.99l4.22-6.73c-.13-.23-.21-.48-.21-.76C6 9.67 6.67 9 7.5 9S9 9.67 9 10.5c0 .13-.02.25-.05.37l1.44.63c.27-.3.67-.5 1.11-.5.18 0 .35.04.51.09l3.58-6.41c-.36-.27-.59-.7-.59-1.18 0-.83.67-1.5 1.5-1.5.19 0 .36.04.53.1l.05-.09v.11c.54.22.92.76.92 1.38zm-1.92 13.49V5.85l-3.29 5.89c.13.23.21.48.21.76 0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5l.01-.07-1.63-.72c-.25.18-.55.29-.88.29-.18 0-.35-.04-.51-.1l-3.2 5.09h12.29z"})),ke=n(277),ye=function(e){var t,n=e.activeInstalls,r=e.description,c=e.humanizedUpdated;return t=n>1e6?Object(S.sprintf)(
|
12 |
/* translators: %d: number of active installations. */
|
13 |
+
Object(S.__)("%d+ Million active installations"),Math.floor(n/1e6)):0===n?Object(S.__)("Less than 10 active installations"):Object(S.sprintf)(
|
14 |
/* translators: %d: number of active installations. */
|
15 |
+
Object(S.__)("%d+ active installations"),n),Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",{className:"block-directory-downloadable-block-info__content"},Object(ie.decodeEntities)(r)),Object(o.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(o.createElement)(le.a,{className:"block-directory-downloadable-block-info__icon",icon:je}),t),Object(o.createElement)("div",{className:"block-directory-downloadable-block-info__meta"},Object(o.createElement)(le.a,{className:"block-directory-downloadable-block-info__icon",icon:ke.a}),// translators: %s: Humanized date of last update e.g: "2 months ago".
|
16 |
+
Object(S.sprintf)(Object(S.__)("Updated %s"),c)))},we=function(e){var t=e.block,n=e.onClick,r=Object(s.useSelect)((function(e){return e(Z).getErrorNoticeForBlock(t.id)}),[t]);return r?Object(o.createElement)(ce.Notice,{status:"error",isDismissible:!1,className:"block-directory-downloadable-block-notice"},Object(o.createElement)("div",{className:"block-directory-downloadable-block-notice__content"},r.message),Object(o.createElement)(ce.Button,{isSmall:!0,isPrimary:!0,onClick:function(){if(r.isFatal)return window.location.reload(),!1;n(t)}},r.isFatal?Object(S.__)("Reload"):Object(S.__)("Retry"))):null};function he(e){var t=e.item,n=e.onClick,r=Object(s.useSelect)((function(e){var n=e(Z),r=n.isInstalling,c=(0,n.getErrorNoticeForBlock)(t.id),o=c&&c.isFatal;return{isLoading:r(t.id),isInstallable:!o}}),[t]),c=r.isLoading,a=r.isInstallable,i=t.icon,l=t.title,u=t.description,b=t.rating,d=t.activeInstalls,f=t.ratingCount,O=t.author,p=t.humanizedUpdated,m=t.authorBlockCount,j=t.authorBlockRating;return Object(o.createElement)("li",{className:"block-directory-downloadable-block-list-item"},Object(o.createElement)("article",{className:"block-directory-downloadable-block-list-item__panel"},Object(o.createElement)("header",{className:"block-directory-downloadable-block-list-item__header"},Object(o.createElement)(me,{icon:i,onClick:n,title:l,rating:b,ratingCount:f,isLoading:c,isInstallable:a})),Object(o.createElement)("section",{className:"block-directory-downloadable-block-list-item__body"},Object(o.createElement)(we,{onClick:n,block:t}),Object(o.createElement)(ye,{activeInstalls:d,description:u,humanizedUpdated:p})),Object(o.createElement)("footer",{className:"block-directory-downloadable-block-list-item__footer"},Object(o.createElement)(ae,{author:O,authorBlockCount:m,authorBlockRating:j}))))}var ge=function(e){var t=e.items,n=e.onHover,r=void 0===n?f.noop:n,c=e.onSelect,a=Object(s.useDispatch)(Z).installBlockType,i=Object(s.useDispatch)("core/edit-post").setIsInserterOpened;return t.length?Object(o.createElement)("ul",{role:"list",className:"block-directory-downloadable-blocks-list"},t.map((function(e){return Object(o.createElement)(he,{key:e.id,onClick:function(){a(e).then((function(t){t&&(c(e),i(!1))})),r(null)},item:e})}))):null},ve=Object(re.compose)([Object(s.withSelect)((function(e,t){var n=t.filterValue,r=e(Z),c=r.getDownloadableBlocks,o=r.isRequestingDownloadableBlocks,a=e("core").canUser("read","block-directory/search");return{downloadableItems:a?c(n):[],hasPermission:a,isLoading:o(n)}}))])((function(e){var t=e.downloadableItems,n=e.onSelect,r=e.onHover,c=e.hasPermission,a=e.isLoading,i=e.isWaiting,l=Object(re.useDebounce)(oe.speak,500);return!1===c?(l(Object(S.__)("No blocks found in your library.")),Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(S.__)("No blocks found in your library."))):void 0===c||a||i?Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(o.createElement)(ce.Spinner,null)):t.length?(l(Object(S.sprintf)(
|
17 |
/* translators: %s: number of available blocks. */
|
18 |
+
Object(S._n)("No blocks found in your library. We did find %d block available for download.","No blocks found in your library. We did find %d blocks available for download.",t.length),t.length)),Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description"},Object(S.__)("No blocks found in your library. These blocks can be downloaded and installed:")),Object(o.createElement)(ge,{items:t,onSelect:n,onHover:r}))):Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description has-no-results"},Object(S.__)("No blocks found in your library."))})),_e=function(){var e=Object(o.useState)(""),t=Object(te.a)(e,2),n=t[0],r=t[1],c=Object(f.debounce)(r,400);return Object(o.createElement)(ne.__experimentalInserterMenuExtension,null,(function(e){var t=e.onSelect,r=e.onHover,a=e.filterValue;return e.hasItems||!a?null:(n!==a&&c(a),Object(o.createElement)(ve,{onSelect:t,onHover:r,filterValue:n,isWaiting:a!==n}))}))},Ee=n(252),Be=n(158);function xe(e){var t=e.items;return t.length?Object(o.createElement)("ul",{className:"block-directory-compact-list"},t.map((function(e){var t=e.icon,n=e.id,r=e.title,c=e.author;return Object(o.createElement)("li",{key:n,className:"block-directory-compact-list__item"},Object(o.createElement)(pe,{icon:t,title:r}),Object(o.createElement)("div",{className:"block-directory-compact-list__item-details"},Object(o.createElement)("div",{className:"block-directory-compact-list__item-title"},r),Object(o.createElement)("div",{className:"block-directory-compact-list__item-author"},Object(S.sprintf)(
|
19 |
/* translators: %s: Name of the block author. */
|
20 |
+
Object(S.__)("By %s"),c))))}))):null}function Se(){var e=Object(s.useSelect)((function(e){return e(Z).getNewBlockTypes()}),[]);return e.length?Object(o.createElement)(Ee.PluginPrePublishPanel,{icon:Be.a,title:Object(S.sprintf)(// translators: %d: number of blocks (number).
|
21 |
+
Object(S._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0},Object(o.createElement)("p",{className:"installed-blocks-pre-publish-panel__copy"},Object(S._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),Object(o.createElement)(xe,{items:e})):null}function Pe(e){var t=e.attributes,n=e.block,r=e.clientId,c=Object(s.useSelect)((function(e){return e(Z).isInstalling(n.id)})),a=Object(s.useDispatch)(Z).installBlockType,i=Object(s.useDispatch)("core/block-editor").replaceBlock;return Object(o.createElement)(ce.Button,{onClick:function(){return a(n).then((function(e){if(e){var c=Object(l.getBlockType)(n.name),o=Object(l.parse)(t.originalContent),a=Object(te.a)(o,1)[0];a&&i(r,Object(l.createBlock)(c.name,a.attributes,a.innerBlocks))}}))},disabled:c,isBusy:c,isPrimary:!0},Object(S.sprintf)(
|
22 |
/* translators: %s: block name */
|
23 |
+
Object(S.__)("Install %s"),n.title))}Object(a.registerPlugin)("block-directory",{render:function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(ee,null),Object(o.createElement)(_e,null),Object(o.createElement)(Se,null))}}),Object(i.addFilter)("blocks.registerBlockType","block-directory/fallback",(function(e,t){return"core/missing"!==t||(e.edit=(n=e.edit,function(e){var t=e.attributes,r=t.originalName,c=t.originalUndelimitedContent,a=Object(s.useSelect)((function(e){var t=(0,e(Z).getDownloadableBlocks)("block:"+r).filter((function(e){var t=e.name;return r===t}));return{hasPermission:e("core").canUser("read","block-directory/search"),block:t.length&&t[0]}}),[r]),i=a.block,u=a.hasPermission,b=Object(s.useDispatch)("core/block-editor").replaceBlock;if(!u||!i)return Object(o.createElement)(n,e);var d=!!c,f=Object(l.getBlockType)("core/html"),O=Object(S.sprintf)(
|
24 |
/* translators: %s: block name */
|
25 |
+
Object(S.__)("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely."),i.title||r),p=[Object(o.createElement)(Pe,{key:"install",block:i,attributes:e.attributes,clientId:e.clientId})];return d&&f&&(O=Object(S.sprintf)(
|
26 |
/* translators: %s: block name */
|
27 |
+
Object(S.__)("Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),i.title||r),p.push(Object(o.createElement)(ce.Button,{key:"convert",onClick:function(){b(e.clientId,Object(l.createBlock)("core/html",{content:c}))},isLink:!0},Object(S.__)("Keep as HTML")))),Object(o.createElement)(o.Fragment,null,Object(o.createElement)(ne.Warning,{actions:p},O),Object(o.createElement)(o.RawHTML,null,c))})),e;var n}))},4:function(e,t){e.exports=window.wp.data},43:function(e,t){e.exports=window.wp.apiFetch},46:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,c={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}n.d(t,"a",(function(){return r}))},5:function(e,t){e.exports=window.wp.blockEditor},52:function(e,t){e.exports=window.wp.a11y},56:function(e,t){e.exports=window.wp.dataControls},6:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},68:function(e,t){e.exports=window.wp.plugins},7:function(e,t){e.exports=window.wp.primitives},76:function(e,t){e.exports=window.wp.htmlEntities},84:function(e,t){e.exports=window.wp.notices},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(37),c=n(29),o=n(38);function a(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,c=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}}(e,t)||Object(c.a)(e,t)||Object(o.a)()}}});
|
build/block-editor/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-wordcount'), 'version' => '91467f96f050275b3b0759a49f3d2732');
|
build/block-editor/index.js
CHANGED
@@ -1,79 +1,81 @@
|
|
1 |
-
window.wp=window.wp||{},window.wp.blockEditor=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=408)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.lodash},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.wp.data},,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.primitives},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(38),o=n(29),c=n(39);function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(e,t)||Object(o.a)(e,t)||Object(c.a)()}},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r))e.push(o.apply(null,r));else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.wp.blocks},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.compose},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(45);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(25),o=n(36),c=n(29);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(c.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t){e.exports=window.regeneratorRuntime},function(e,t){e.exports=window.wp.keycodes},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},,function(e,t){e.exports=window.wp.richText},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(40),o=n(19);function c(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},function(e,t){e.exports=window.wp.url},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(25);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t){e.exports=window.wp.dom},function(e,t,n){e.exports=n(146)()},function(e,t){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.deprecated},,function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n,r,o,c,i){try{var a=e[c](i),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,c){var i=e.apply(t,n);function a(e){r(i,o,c,a,l,"next",e)}function l(e){r(i,o,c,a,l,"throw",e)}a(void 0)}))}}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},,,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(12),o=n(56);function c(e){var t=Object(r.useRef)(e);return Object(o.a)((function(){t.current=e})),t}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.blob},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(12),o=n(62);function c(e,t){Object(r.useDebugValue)(e);var n=Object(r.useContext)(o.a);return null!=n[e]?n[e]:t}var i=n(43),a=n(52);function l(e){var t,n,o,l=(o=e.compose,Array.isArray(o)?o:void 0!==o?[o]:[]),s=function(t,n){if(e.useOptions&&(t=e.useOptions(t,n)),e.name&&(t=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var o="use"+e+"Options";Object(r.useDebugValue)(o);var a=c(o);return a?Object(i.a)(Object(i.a)({},t),a(t,n)):t}(e.name,t,n)),e.compose)for(var o,a=Object(i.c)(l);!(o=a()).done;)t=o.value.__useOptions(t,n);return t},u=function(t,n,o){if(void 0===t&&(t={}),void 0===n&&(n={}),void 0===o&&(o=!1),o||(t=s(t,n)),e.useProps&&(n=e.useProps(t,n)),e.name&&(n=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var o="use"+e+"Props";Object(r.useDebugValue)(o);var i=c(o);return i?i(t,n):n}(e.name,t,n)),e.compose)if(e.useComposeOptions&&(t=e.useComposeOptions(t,n)),e.useComposeProps)n=e.useComposeProps(t,n);else for(var a,u=Object(i.c)(l);!(a=u()).done;)n=(0,a.value)(t,n,!0);var d={},b=n||{};for(var f in b)void 0!==b[f]&&(d[f]=b[f]);return d};u.__useOptions=s;var d=l.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return u.__keys=[].concat(d,(null===(t=e.useState)||void 0===t?void 0:t.__keys)||[],e.keys||[]),u.unstable_propsAreEqual=e.propsAreEqual||(null===(n=l[0])||void 0===n?void 0:n.unstable_propsAreEqual)||a.a,u}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(12),o=n(43),c=n(77);function i(e,t){for(var n={},r={},o=0,c=Object.keys(e);o<c.length;o++){var i=c[o];t.indexOf(i)>=0?n[i]=e[i]:r[i]=e[i]}return[n,r]}var a=n(52);function l(e){var t,n=e.as,l=e.useHook,s=e.memo,u=e.propsAreEqual,d=void 0===u?null==l?void 0:l.unstable_propsAreEqual:u,b=e.keys,f=void 0===b?(null==l?void 0:l.__keys)||[]:b,p=e.useCreateElement,m=void 0===p?c.a:p,v=function(e,t){var r=e.as,c=void 0===r?n:r,a=Object(o.b)(e,["as"]);if(l){var s,u=i(a,f),d=u[0],b=u[1],p=l(d,Object(o.a)({ref:t},b)),v=p.wrapElement,O=Object(o.b)(p,["wrapElement"]),g=(null===(s=c.render)||void 0===s?void 0:s.__keys)||c.__keys,h=g&&i(a,g)[0],j=h?Object(o.a)(Object(o.a)({},O),h):O,y=m(c,j);return v?v(y):y}return m(c,Object(o.a)({ref:t},a))};return t=v,v=Object(r.forwardRef)(t),s&&(v=function(e,t){return Object(r.memo)(e,t)}(v,d)),v.__keys=f,v.unstable_propsAreEqual=d||a.a,v}},function(e,t,n){"use strict";var r,o;function c(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,t.a=function(e,t){var n,l;function s(){n=o?new WeakMap:i()}function u(){var n,r,o,c,i,s=arguments.length;for(c=new Array(s),o=0;o<s;o++)c[o]=arguments[o];for(i=t.apply(null,c),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!a(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(a(r.args,c,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,c)},c[0]=null,r.args=c,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=c),l=o?function(e){var t,o,c,a,l,s=n,u=!0;for(t=0;t<e.length;t++){if(!(l=o=e[t])||"object"!=typeof l){u=!1;break}s.has(o)?s=s.get(o):(c=new WeakMap,s.set(o,c),s=c)}return s.has(r)||((a=i()).isUniqueByDependants=u,s.set(r,a)),s.get(r)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},function(e,t,n){"use strict";function r(e){return e?e.ownerDocument||e:window.document}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.a11y},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var c=0,i=n;c<i.length;c++){var a=i[c];if(e[a]!==t[a])return!1}return!0}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return e.target===e.currentTarget}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return O})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return s})),n.d(t,"g",(function(){return S}));var r=n(14),o=n(12),c=n(56),i=n(59),a=n(61),l=n(63);function s(e){return e.slice().reverse()}function u(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function d(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&u(t.ref.current,e.ref.current)}))}function b(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function f(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}function p(e){for(var t,n=[[]],o=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},c=Object(r.c)(e);!(t=c()).done;)o();return n}function m(e){for(var t,n=0,o=Object(r.c)(e);!(t=o()).done;){var c=t.value.length;c>n&&(n=c)}return n}function v(e){for(var t=p(e),n=m(t),o=[],c=0;c<n;c+=1)for(var i,a=Object(r.c)(t);!(i=a()).done;){var l=i.value;l[c]&&o.push(Object(r.b)(Object(r.b)({},l[c]),{},{groupId:l[c].groupId?""+c:void 0}))}return o}function O(e){for(var t,n=[],o=Object(r.c)(e);!(t=o()).done;){var c=t.value;n.push.apply(n,c)}return n}function g(e){for(var t,n=m(e),o=Object(r.c)(e);!(t=o()).done;){var c=t.value;if(c.length<n)for(var i=0;i<n;i+=1)c[i]||(c[i]={id:"__EMPTY_ITEM__",disabled:!0,ref:{current:null},groupId:c[i-1].groupId})}return e}function h(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=b(e.items||[]))||void 0===n?void 0:n.id}var j={id:null,ref:{current:null}};function y(e,t){return e.filter((function(e){return e.groupId===t}))}var k={horizontal:"vertical",vertical:"horizontal"};function _(e,t,n){return n in e?[].concat(e.slice(0,n),[t],e.slice(n)):[].concat(e,[t])}function E(e){var t=e.slice(),n=!1;return t.sort((function(e,t){var r=e.ref.current,o=t.ref.current;return r&&o&&u(r,o)?(n=!0,-1):0})),n?t:e}function w(e,t){var n=e.unstable_virtual,o=e.rtl,c=e.orientation,i=e.items,l=e.groups,u=e.currentId,m=e.loop,C=e.wrap,S=e.pastIds,I=e.unstable_moves,x=e.initialVirtual,B=e.initialRTL,P=e.initialOrientation,T=e.initialCurrentId,N=e.initialLoop,D=e.initialWrap,R=e.hasSetCurrentId;switch(t.type){case"registerGroup":var A=t.group;if(0===l.length)return Object(r.b)(Object(r.b)({},e),{},{groups:[A]});var M=d(l,A);return Object(r.b)(Object(r.b)({},e),{},{groups:_(l,A,M)});case"unregisterGroup":var L=t.id,F=l.filter((function(e){return e.id!==L}));return F.length===l.length?e:Object(r.b)(Object(r.b)({},e),{},{groups:F});case"registerItem":var V,H=t.item,z=l.find((function(e){var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(H.ref.current)})),U=Object(r.b)({groupId:null==z?void 0:z.id},H),G=d(i,U),W=Object(r.b)(Object(r.b)({},e),{},{items:_(i,U,G)});return R||I||void 0!==T?W:Object(r.b)(Object(r.b)({},W),{},{currentId:null===(V=b(W.items))||void 0===V?void 0:V.id});case"unregisterItem":var K=t.id,q=i.filter((function(e){return e.id!==K}));if(q.length===i.length)return e;var $=S.filter((function(e){return e!==K})),Y=Object(r.b)(Object(r.b)({},e),{},{pastIds:$,items:q});if(u&&u===K){var X=h(Object(r.b)(Object(r.b)({},Y),{},{currentId:$[0]}));return Object(r.b)(Object(r.b)({},Y),{},{currentId:X})}return Y;case"move":var Q=t.id;if(void 0===Q)return e;var Z=S.filter((function(e){return e!==u&&e!==Q})),J=u?[u].concat(Z):Z,ee=Object(r.b)(Object(r.b)({},e),{},{pastIds:J});if(null===Q)return Object(r.b)(Object(r.b)({},ee),{},{unstable_moves:I+1,currentId:h(ee,Q)});var te=f(i,Q);return Object(r.b)(Object(r.b)({},ee),{},{unstable_moves:te?I+1:I,currentId:h(ee,null==te?void 0:te.id)});case"next":if(null==u)return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"first"}));var ne=o&&"vertical"!==c,re=ne?s(i):i,oe=re.find((function(e){return e.id===u}));if(!oe)return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"first"}));var ce=!!oe.groupId,ie=re.indexOf(oe),ae=re.slice(ie+1),le=y(ae,oe.groupId);if(t.allTheWay){var se=b(ne?y(re,oe.groupId):s(le));return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==se?void 0:se.id}))}var ue=function(e){return e&&k[e]}(ce?c||"horizontal":c),de=m&&m!==ue,be=ce&&C&&C!==ue,fe=t.hasNullItem||!ce&&de&&null===T;if(de){var pe=b(function(e,t,n){var r=e.findIndex((function(e){return e.id===t}));return[].concat(e.slice(r+1),n?[j]:[],e.slice(0,r))}(be&&!fe?re:y(re,oe.groupId),u,fe),u);return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==pe?void 0:pe.id}))}if(be){var me=b(fe?le:ae,u),ve=fe?(null==me?void 0:me.id)||null:null==me?void 0:me.id;return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:ve}))}var Oe=b(le,u);return w(e,!Oe&&fe?Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null}):Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==Oe?void 0:Oe.id}));case"previous":var ge=!l.length&&null===T,he=w(Object(r.b)(Object(r.b)({},e),{},{items:s(i)}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:ge}));return Object(r.b)(Object(r.b)({},he),{},{items:i});case"down":var je=v(O(g(p(i)))),ye=m&&"horizontal"!==m&&null===T,ke=w(Object(r.b)(Object(r.b)({},e),{},{orientation:"vertical",items:je}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:ye}));return Object(r.b)(Object(r.b)({},ke),{},{orientation:c,items:i});case"up":var _e=v(s(O(g(p(i))))),Ee=null===T,we=w(Object(r.b)(Object(r.b)({},e),{},{orientation:"vertical",items:_e}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:Ee}));return Object(r.b)(Object(r.b)({},we),{},{orientation:c,items:i});case"first":var Ce=b(i);return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==Ce?void 0:Ce.id}));case"last":var Se=w(Object(r.b)(Object(r.b)({},e),{},{items:s(i)}),Object(r.b)(Object(r.b)({},t),{},{type:"first"}));return Object(r.b)(Object(r.b)({},Se),{},{items:i});case"sort":return Object(r.b)(Object(r.b)({},e),{},{items:E(i),groups:E(l)});case"setVirtual":return Object(r.b)(Object(r.b)({},e),{},{unstable_virtual:Object(a.a)(t.virtual,n)});case"setRTL":return Object(r.b)(Object(r.b)({},e),{},{rtl:Object(a.a)(t.rtl,o)});case"setOrientation":return Object(r.b)(Object(r.b)({},e),{},{orientation:Object(a.a)(t.orientation,c)});case"setCurrentId":var Ie=h(Object(r.b)(Object(r.b)({},e),{},{currentId:Object(a.a)(t.currentId,u)}));return Object(r.b)(Object(r.b)({},e),{},{currentId:Ie,hasSetCurrentId:!0});case"setLoop":return Object(r.b)(Object(r.b)({},e),{},{loop:Object(a.a)(t.loop,m)});case"setWrap":return Object(r.b)(Object(r.b)({},e),{},{wrap:Object(a.a)(t.wrap,C)});case"reset":return Object(r.b)(Object(r.b)({},e),{},{unstable_virtual:x,rtl:B,orientation:P,currentId:h(Object(r.b)(Object(r.b)({},e),{},{currentId:T})),loop:N,wrap:D,unstable_moves:0,pastIds:[]});default:throw new Error}}function C(e){return Object(o.useCallback)(e,[])}function S(e){void 0===e&&(e={});var t=Object(i.a)(e),n=t.unstable_virtual,a=void 0!==n&&n,s=t.rtl,u=void 0!==s&&s,d=t.orientation,b=t.currentId,f=t.loop,p=void 0!==f&&f,m=t.wrap,v=void 0!==m&&m,O=Object(r.a)(t,["unstable_virtual","rtl","orientation","currentId","loop","wrap"]),g=Object(o.useReducer)(w,{unstable_virtual:a,rtl:u,orientation:d,items:[],groups:[],currentId:b,loop:p,wrap:v,unstable_moves:0,pastIds:[],initialVirtual:a,initialRTL:u,initialOrientation:d,initialCurrentId:b,initialLoop:p,initialWrap:v}),h=g[0],j=(h.pastIds,h.initialVirtual,h.initialRTL,h.initialOrientation,h.initialCurrentId,h.initialLoop,h.initialWrap,h.hasSetCurrentId,Object(r.a)(h,["pastIds","initialVirtual","initialRTL","initialOrientation","initialCurrentId","initialLoop","initialWrap","hasSetCurrentId"])),y=g[1],k=Object(o.useState)(!1),_=k[0],E=k[1],S=Object(l.a)(O),I=function(){var e=Object(o.useRef)(!1);return Object(c.a)((function(){return function(){e.current=!0}}),[]),e}();return Object(r.b)(Object(r.b)(Object(r.b)({},S),j),{},{unstable_hasActiveWidget:_,unstable_setHasActiveWidget:E,registerItem:C((function(e){I.current||y({type:"registerItem",item:e})})),unregisterItem:C((function(e){I.current||y({type:"unregisterItem",id:e})})),registerGroup:C((function(e){I.current||y({type:"registerGroup",group:e})})),unregisterGroup:C((function(e){I.current||y({type:"unregisterGroup",id:e})})),move:C((function(e){return y({type:"move",id:e})})),next:C((function(e){return y({type:"next",allTheWay:e})})),previous:C((function(e){return y({type:"previous",allTheWay:e})})),up:C((function(e){return y({type:"up",allTheWay:e})})),down:C((function(e){return y({type:"down",allTheWay:e})})),first:C((function(){return y({type:"first"})})),last:C((function(){return y({type:"last"})})),unstable_sort:C((function(){return y({type:"sort"})})),unstable_setVirtual:C((function(e){return y({type:"setVirtual",virtual:e})})),setRTL:C((function(e){return y({type:"setRTL",rtl:e})})),setOrientation:C((function(e){return y({type:"setOrientation",orientation:e})})),setCurrentId:C((function(e){return y({type:"setCurrentId",currentId:e})})),setLoop:C((function(e){return y({type:"setLoop",loop:e})})),setWrap:C((function(e){return y({type:"setWrap",wrap:e})})),reset:C((function(){return y({type:"reset"})}))})}var I=[].concat(l.a.__keys,["unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","unstable_moves","unstable_hasActiveWidget","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","unstable_sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","reset","unstable_setHasActiveWidget"]);S.__keys=I},function(e,t){e.exports=window.wp.keyboardShortcuts},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12),o="undefined"==typeof window?r.useEffect:r.useLayoutEffect},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50);function o(e){return Object(r.a)(e).activeElement}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12);function o(e){return Object(r.useState)(e)[0]}},,function(e,t,n){"use strict";function r(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12),o=Object(r.createContext)({})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(12),o=n(59),c=n(64);function i(e){void 0===e&&(e={});var t=Object(o.a)(e).baseId,n=Object(r.useContext)(c.a),i=Object(r.useRef)(0),a=Object(r.useState)((function(){return t||n()}));return{baseId:a[0],unstable_setBaseId:a[1],unstable_idCountRef:i}}i.__keys=["baseId","unstable_setBaseId","unstable_idCountRef"]},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12),o=Object(r.createContext)((function(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(14),o=n(48),c=n(47),i=n(52),a=Object(c.a)({name:"Box",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,o=Object(r.a)(e,["unstable_system"]),c=t.unstable_system,a=Object(r.a)(t,["unstable_system"]);return!(n!==c&&!Object(i.a)(n,c))&&Object(i.a)(o,a)}});Object(o.a)({as:"div",useHook:a})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(12);function o(e,t){void 0===t&&(t=null),e&&("function"==typeof e?e(t):e.current=t)}function c(e,t){return Object(r.useMemo)((function(){return null==e&&null==t?null:function(n){o(e,n),o(t,n)}}),[e,t])}},,,function(e,t,n){e.exports=function(e,t){var n,r,o=0;function c(){var c,i,a=n,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(i=0;i<l;i++)if(a.args[i]!==arguments[i]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(c=new Array(l),i=0;i<l;i++)c[i]=arguments[i];return a={args:c,val:e.apply(null,c)},n?(n.prev=a,a.next=n):r=a,o===t.maxSize?(r=r.prev).next=null:o++,n=a,a.val}return t=t||{},c.clear=function(){n=null,r=null,o=0},c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(57);function o(e){var t=Object(r.a)(e);if(!t)return!1;if(e.contains(t))return!0;var n=t.getAttribute("aria-activedescendant");return!(!n||n!==e.id&&!e.querySelector("#"+n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=["button","color","file","image","reset","submit"];function o(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e;return-1!==r.indexOf(t.type)}return!1}},function(e,t,n){"use strict";function r(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}function o(e,t){if("closest"in e)return e.closest(t);do{if(r(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var c=n(57),i="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function a(e){return r(e,i)&&function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}(e)}function l(e){for(;e&&!a(e);)e=o(e,i);return e}function s(e){return Object(c.a)(e)===e}function u(e,t){var n=void 0===t?{}:t,r=n.isActive,o=void 0===r?s:r,c=n.preventScroll;return o(e)?-1:(e.focus({preventScroll:c}),o(e)?-1:requestAnimationFrame((function(){e.focus({preventScroll:c})})))}},function(e,t,n){"use strict";function r(e){return!((t=e.currentTarget)===(n=e.target)||t.contains(n));var t,n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(14),o=n(48),c=n(47),i=n(66),a=n(12),l=n(67),s=n(72),u=(n(81),n(44)),d=n(56),b=n(71),f=n(74),p=n(57),m=n(73);function v(e){return"undefined"!=typeof window&&-1!==window.navigator.userAgent.indexOf(e)}var O=v("Mac")&&!v("Chrome")&&(v("Safari")||v("Firefox"));function g(e){Object(b.a)(e)||e.focus()}var h=Object(c.a)({name:"Tabbable",compose:i.a,keys:["disabled","focusable"],useOptions:function(e,t){var n=t.disabled;return Object(r.b)({disabled:n},e)},useProps:function(e,t){var n=t.ref,o=t.tabIndex,c=t.onClick,i=t.onMouseDown,b=t.style,v=Object(r.a)(t,["ref","tabIndex","onClick","onMouseDown","style"]),h=Object(a.useRef)(null),j=Object(u.a)(c),y=Object(u.a)(i),k=e.disabled&&!e.focusable,_=Object(a.useState)(!0),E=_[0],w=_[1],C=E?o:o||0,S=e.disabled?Object(r.b)({pointerEvents:"none"},b):b,I=function(){if(O){var e=Object(a.useState)(null),t=e[0],n=e[1];return Object(a.useEffect)((function(){t&&(g(t),n(null))}),[t]),Object(a.useCallback)((function(e){var t=e.currentTarget;if(!Object(f.a)(e)&&Object(s.a)(t)){var r=Object(p.a)(t);if(r){var o="BODY"===r.tagName,c=Object(m.b)(t.parentElement);r===c||o&&!c?n(t):c?c.addEventListener("focusin",(function(){return n(t)}),{once:!0}):r.addEventListener("blur",(function(){return g(t)}),{once:!0})}}}),[])}}();Object(d.a)((function(){var e,t=h.current;t&&"BUTTON"!==(e=t).tagName&&"INPUT"!==e.tagName&&"SELECT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"A"!==e.tagName&&"AUDIO"!==e.tagName&&"VIDEO"!==e.tagName&&w(!1)}),[]);var x=Object(a.useCallback)((function(t){var n;if(e.disabled)return t.stopPropagation(),void t.preventDefault();null===(n=j.current)||void 0===n||n.call(j,t)}),[e.disabled]),B=Object(a.useCallback)((function(t){var n;if(e.disabled)return t.stopPropagation(),void t.preventDefault();null===(n=y.current)||void 0===n||n.call(y,t),t.defaultPrevented||null==I||I(t)}),[e.disabled,I]);return Object(r.b)({ref:Object(l.a)(h,n),style:S,tabIndex:k?void 0:C,disabled:!(!k||!E)||void 0,"aria-disabled":!!e.disabled||void 0,onClick:x,onMouseDown:B},v)}});Object(o.a)({as:"div",useHook:h})},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(12),o=n(62),c=n(43),i=function(e,t,n){void 0===n&&(n=t.children);var i=Object(r.useContext)(o.a);return i.useCreateElement?i.useCreateElement(e,t,n):"string"==typeof e&&function(e){return"function"==typeof e}(n)?(t.children,n(Object(c.b)(t,["children"]))):Object(r.createElement)(e,t,n)}},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t,n){var r;!function(o){var c=/^\s+/,i=/\s+$/,a=0,l=o.round,s=o.min,u=o.max,d=o.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t,n,r,a={r:0,g:0,b:0},l=1,d=null,b=null,f=null,p=!1,m=!1;return"string"==typeof e&&(e=function(e){e=e.replace(c,"").replace(i,"").toLowerCase();var t,n=!1;if(B[e])e=B[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=U.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=U.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=U.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=U.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=U.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=U.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=U.hex8.exec(e))?{r:R(t[1]),g:R(t[2]),b:R(t[3]),a:F(t[4]),format:n?"name":"hex8"}:(t=U.hex6.exec(e))?{r:R(t[1]),g:R(t[2]),b:R(t[3]),format:n?"name":"hex"}:(t=U.hex4.exec(e))?{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=U.hex3.exec(e))&&{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(G(e.r)&&G(e.g)&&G(e.b)?(t=e.r,n=e.g,r=e.b,a={r:255*N(t,255),g:255*N(n,255),b:255*N(r,255)},p=!0,m="%"===String(e.r).substr(-1)?"prgb":"rgb"):G(e.h)&&G(e.s)&&G(e.v)?(d=M(e.s),b=M(e.v),a=function(e,t,n){e=6*N(e,360),t=N(t,100),n=N(n,100);var r=o.floor(e),c=e-r,i=n*(1-t),a=n*(1-c*t),l=n*(1-(1-c)*t),s=r%6;return{r:255*[n,a,i,i,l,n][s],g:255*[l,n,n,a,i,i][s],b:255*[i,i,l,n,n,a][s]}}(e.h,d,b),p=!0,m="hsv"):G(e.h)&&G(e.s)&&G(e.l)&&(d=M(e.s),f=M(e.l),a=function(e,t,n){var r,o,c;function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=N(e,360),t=N(t,100),n=N(n,100),0===t)r=o=c=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),c=i(l,a,e-1/3)}return{r:255*r,g:255*o,b:255*c}}(e.h,d,f),p=!0,m="hsl"),e.hasOwnProperty("a")&&(l=e.a)),l=T(l),{ok:p,format:e.format||m,r:s(255,u(a.r,0)),g:s(255,u(a.g,0)),b:s(255,u(a.b,0)),a:l}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),a=(c+i)/2;if(c==i)r=o=0;else{var l=c-i;switch(o=a>.5?l/(2-c-i):l/(c+i),c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,l:a}}function p(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),a=c,l=c-i;if(o=0===c?0:l/c,c==i)r=0;else{switch(c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,v:a}}function m(e,t,n,r){var o=[A(l(e).toString(16)),A(l(t).toString(16)),A(l(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function v(e,t,n,r){return[A(L(r)),A(l(e).toString(16)),A(l(t).toString(16)),A(l(n).toString(16))].join("")}function O(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=D(n.s),b(n)}function g(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s+=t/100,n.s=D(n.s),b(n)}function h(e){return b(e).desaturate(100)}function j(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l+=t/100,n.l=D(n.l),b(n)}function y(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=u(0,s(255,n.r-l(-t/100*255))),n.g=u(0,s(255,n.g-l(-t/100*255))),n.b=u(0,s(255,n.b-l(-t/100*255))),b(n)}function k(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l-=t/100,n.l=D(n.l),b(n)}function _(e,t){var n=b(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,b(n)}function E(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function C(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function S(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function I(e,t,n){t=t||6,n=n||30;var r=b(e).toHsl(),o=360/n,c=[b(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,c.push(b(r));return c}function x(e,t){t=t||6;for(var n=b(e).toHsv(),r=n.h,o=n.s,c=n.v,i=[],a=1/t;t--;)i.push(b({h:r,s:o,v:c})),c=(c+a)%1;return i}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var c=[A(l(e).toString(16)),A(l(t).toString(16)),A(l(n).toString(16)),A(L(r))];return o&&c[0].charAt(0)==c[0].charAt(1)&&c[1].charAt(0)==c[1].charAt(1)&&c[2].charAt(0)==c[2].charAt(1)&&c[3].charAt(0)==c[3].charAt(1)?c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0):c.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=b(e);n="#"+v(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return b(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(j,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(k,arguments)},desaturate:function(){return this._applyModification(O,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(h,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(x,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:M(e[r]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var r=b(e).toRgb(),o=b(t).toRgb(),c=n/100;return b({r:(o.r-r.r)*c+r.r,g:(o.g-r.g)*c+r.g,b:(o.b-r.b)*c+r.b,a:(o.a-r.a)*c+r.a})},b.readability=function(e,t){var n=b(e),r=b(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},b.isReadable=function(e,t,n){var r,o,c,i,a,l=b.readability(e,t);switch(o=!1,(c=n,"AA"!==(i=((c=c||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(a=(c.size||"small").toLowerCase())&&"large"!==a&&(a="small"),r={level:i,size:a}).level+r.size){case"AAsmall":case"AAAlarge":o=l>=4.5;break;case"AAlarge":o=l>=3;break;case"AAAsmall":o=l>=7}return o},b.mostReadable=function(e,t,n){var r,o,c,i,a=null,l=0;o=(n=n||{}).includeFallbackColors,c=n.level,i=n.size;for(var s=0;s<t.length;s++)(r=b.readability(e,t[s]))>l&&(l=r,a=b(t[s]));return b.isReadable(e,a,{level:c,size:i})||!o?a:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var B=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(B);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function D(e){return s(1,u(0,e))}function R(e){return parseInt(e,16)}function A(e){return 1==e.length?"0"+e:""+e}function M(e){return e<=1&&(e=100*e+"%"),e}function L(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return R(e)/255}var V,H,z,U=(H="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",z="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function G(e){return!!U.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r)}(Math)},,function(e,t,n){"use strict";n(97),n(12)},function(e,t,n){"use strict";function r(e){var t=void 0===e?{}:e,n=t.keyMap,r=t.onKey,o=t.stopPropagation,c=t.onKeyDown,i=t.shouldKeyDown,a=void 0===i?function(){return!0}:i,l=t.preventDefault,s=void 0===l||l;return function(e){if(n){var t,i="function"==typeof n?n(e):n,l="function"==typeof s?s(e):s,u="function"==typeof o?o(e):o;if(e.key in i){var d=i[e.key];if("function"==typeof d&&a(e))return l&&e.preventDefault(),u&&e.stopPropagation(),r&&r(e),void d(e)}c&&"current"in c?null===(t=c.current)||void 0===t||t.call(c,e):null==c||c(e)}}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(14),o=n(48),c=n(47),i=n(12),a=n(72),l=(n(81),n(44)),s=n(53),u=n(75),d=Object(c.a)({name:"Clickable",compose:u.a,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,o=e.unstable_clickOnSpace,c=void 0===o||o,i=Object(r.a)(e,["unstable_clickOnEnter","unstable_clickOnSpace"]);return Object(r.b)({unstable_clickOnEnter:n,unstable_clickOnSpace:c},i)},useProps:function(e,t){var n=t.onKeyDown,o=t.onKeyUp,c=Object(r.a)(t,["onKeyDown","onKeyUp"]),u=Object(i.useState)(!1),d=u[0],b=u[1],f=Object(l.a)(n),p=Object(l.a)(o),m=Object(i.useCallback)((function(t){var n;if(null===(n=f.current)||void 0===n||n.call(f,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Object(s.a)(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(Object(a.a)(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&b(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),v=Object(i.useCallback)((function(t){var n;if(null===(n=p.current)||void 0===n||n.call(p,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;d&&r&&(b(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,d]);return Object(r.b)({"data-active":d||void 0,onKeyDown:m,onKeyUp:v},c)}});Object(o.a)({as:"button",memo:!0,useHook:d})},function(e,t){e.exports=window.wp.notices},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(106);function o(e,t,n){return e.dispatchEvent(Object(r.a)(e,t,n))}},function(e,t,n){"use strict";function r(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){e.value=t}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(2),o=n(0),c=Object(o.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:r.noop,clientId:null}),i=c.Provider;function a(){return Object(o.useContext)(c)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(14),o=n(48),c=n(47),i=n(12),a=n(64),l=n(63),s=Object(c.a)({useState:l.a,keys:["id"],useOptions:function(e,t){var n=Object(i.useContext)(a.a),o=Object(i.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],c=Object(i.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),l=t.id||e.id||""+c+o;return Object(r.b)(Object(r.b)({},e),{},{id:l})},useProps:function(e,t){return Object(r.b)({id:e.id},t)}});Object(o.a)({as:"div",useHook:s})},,,,function(e,t,n){},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50);function o(e,t,n){return e.dispatchEvent(function(e,t,n){if(void 0===n&&(n={}),"function"==typeof KeyboardEvent)return new KeyboardEvent(t,n);var o=Object(r.a)(e).createEvent("KeyboardEvent");return o.initKeyboardEvent(t,n.bubbles,n.cancelable,function(e){return Object(r.a)(e).defaultView||window}(e),n.key,n.location,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),o}(e,t,n))}},function(e,t){e.exports=window.wp.warning},,,function(e,t,n){"use strict";t.__esModule=!0;var r=n(188);t.default=r.TextareaAutosize},,function(e,t){e.exports=window.wp.viewport},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50);function o(e,t,n){var o,c;if(void 0===n&&(n={}),"function"==typeof Event)return new Event(t,n);var i=Object(r.a)(e).createEvent("Event");return i.initEvent(t,null===(o=n)||void 0===o?void 0:o.bubbles,null===(c=n)||void 0===c?void 0:c.cancelable),i}},function(e,t){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var l,s=[],u=!1,d=-1;function b(){u&&l&&(u=!1,l.length?s=l.concat(s):d=-1,s.length&&f())}function f(){if(!u){var e=a(b);u=!0;for(var t=s.length;t;){for(l=s,s=[];++d<t;)l&&l[d].run();d=-1,t=s.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new p(e,t)),1!==s.length||u||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},,,,,,function(e,t){e.exports=window.ReactDOM},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return _}));var r=n(14),o=n(48),c=n(47),i=n(66),a=n(12),l=n(67),s=(n(81),n(44)),u=n(53),d=n(57),b=n(75),f=n(77),p=n(82),m=n(50),v=n(87),O=n(99),g=n(54),h="undefined"!=typeof window&&"msCrypto"in window,j="undefined"!=typeof window&&"msCrypto"in window;function y(e,t,n){var r=Object(s.a)(n);return Object(a.useCallback)((function(n){var o;if(e&&function(e){return!!Object(u.a)(e)&&!e.metaKey&&"Tab"!==e.key}(n)){var c=null==t?void 0:t.ref.current;if(c&&(Object(O.a)(c,n.type,n),n.currentTarget.contains(c)))return n.stopPropagation(),void n.preventDefault()}null===(o=r.current)||void 0===o||o.call(r,n)}),[e,t])}function k(e,t){return null==e?void 0:e.some((function(e){return!!t&&e.ref.current===t}))}var _=Object(c.a)({name:"Composite",compose:[b.a],useState:g.g,useOptions:function(e){return Object(r.b)(Object(r.b)({},e),{},{currentId:Object(g.e)(e)})},useProps:function(e,t){var n=t.ref,o=t.onFocus,c=t.onBlur,i=t.onKeyDown,b=t.onKeyUp,f=Object(r.a)(t,["ref","onFocus","onBlur","onKeyDown","onKeyUp"]),O=Object(a.useRef)(null),_=Object(g.d)(e.items,e.currentId),E=Object(a.useRef)(void 0),w=Object(s.a)(o),C=Object(s.a)(c),S=j?function(e){var t=Object(a.useRef)(null);return Object(a.useEffect)((function(){var n=Object(m.a)(e.current),r=function(e){var n=e.target;t.current=n};return n.addEventListener("focus",r,!0),function(){n.removeEventListener("focus",r,!0)}}),[]),t}(O):void 0;Object(a.useEffect)((function(){var t=O.current;t&&e.unstable_moves&&!_&&t.focus()}),[e.unstable_moves,_]);var I=y(e.unstable_virtual,_,i),x=y(e.unstable_virtual,_,b),B=Object(a.useCallback)((function(t){var n;if(e.unstable_virtual){var r,o,c=(null==S?void 0:S.current)||t.relatedTarget,i=k(e.items,c);if(Object(u.a)(t)&&!i)return null===(r=w.current)||void 0===r||r.call(w,t),void(null==_||null===(o=_.ref.current)||void 0===o||o.focus());if(i)return void t.stopPropagation()}else if(Object(u.a)(t)){var a;null===(a=e.setCurrentId)||void 0===a||a.call(e,null)}null===(n=w.current)||void 0===n||n.call(w,t)}),[e.unstable_virtual,e.items,_,e.setCurrentId]),P=Object(a.useCallback)((function(t){var n;if(e.unstable_virtual){var r,o=k(e.items,t.target),c=function(e){return h?Object(d.a)(e.target):e.relatedTarget}(t),i=k(e.items,c);if(Object(u.a)(t)&&i)return(null===(r=E.current)||void 0===r?void 0:r.ref.current)&&Object(v.a)(E.current.ref.current,"blur",t),E.current=_,void t.stopPropagation();o?E.current=_:((null==_?void 0:_.ref.current)&&Object(v.a)(_.ref.current,"blur",t),E.current=void 0)}null===(n=C.current)||void 0===n||n.call(C,t)}),[e.unstable_virtual,e.items,_]),T=Object(a.useMemo)((function(){return Object(p.a)({onKeyDown:I,stopPropagation:!0,shouldKeyDown:function(t){return Object(u.a)(t)&&null===e.currentId},keyMap:function(){var t,n="horizontal"!==e.orientation,r="vertical"!==e.orientation,o=!!(null===(t=e.groups)||void 0===t?void 0:t.length),c=e.first&&function(){return e.first()},i=e.last&&function(){return e.last()};return{ArrowUp:(o||n)&&function(){if(o){var t,n=(c=e.items,Object(g.a)(Object(g.b)(Object(g.f)(Object(g.c)(c)))));(null==n?void 0:n.id)&&(null===(t=e.move)||void 0===t||t.call(e,n.id))}else{var r;null===(r=e.last)||void 0===r||r.call(e)}var c},ArrowRight:(o||r)&&c,ArrowDown:(o||n)&&c,ArrowLeft:(o||r)&&i,Home:c,End:i,PageUp:c,PageDown:i}}})}),[I,e.currentId,e.orientation,e.groups,e.items,e.move,e.last,e.first]);return Object(r.b)({ref:Object(l.a)(O,n),id:e.baseId,onFocus:B,onBlur:P,onKeyDown:T,onKeyUp:x,"aria-activedescendant":e.unstable_virtual&&(null==_?void 0:_.id)||void 0},f)},useComposeProps:function(e,t){t=Object(i.a)(e,t,!0);var n=Object(b.a)(e,t,!0);return e.unstable_virtual||null===e.currentId?n:Object(r.b)(Object(r.b)({},t),{},{ref:n.ref})}}),E=Object(o.a)({as:"div",useHook:_,useCreateElement:function(e,t,n){return Object(f.a)(e,t,n)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return y}));var r=n(14),o=n(48),c=n(47),i=n(12),a=n(67),l=(n(81),n(44)),s=n(53),u=n(71),d=n(74),b=n(73),f=n(83),p=n(82),m=n(50),v=n(54),O=n(93),g=n(88),h=n(89);function j(e){return e.querySelector("[data-composite-item-widget]")}var y=Object(c.a)({name:"CompositeItem",compose:[f.a,O.a],useState:v.g,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return f.a.unstable_propsAreEqual(e,t);var n=e.currentId,o=e.unstable_moves,c=Object(r.a)(e,["currentId","unstable_moves"]),i=t.currentId,a=t.unstable_moves,l=Object(r.a)(t,["currentId","unstable_moves"]);if(i!==n){if(t.id===i||t.id===n)return!1}else if(o!==a)return!1;return f.a.unstable_propsAreEqual(c,l)},useOptions:function(e){return Object(r.b)(Object(r.b)({},e),{},{id:e.id,currentId:Object(v.e)(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,o=t.ref,c=t.tabIndex,f=void 0===c?0:c,v=t.onFocus,O=t.onBlur,y=t.onKeyDown,k=t.onClick,_=Object(r.a)(t,["ref","tabIndex","onFocus","onBlur","onKeyDown","onClick"]),E=Object(i.useRef)(null),w=e.id,C=e.disabled&&!e.focusable,S=e.currentId===w,I=Object(l.a)(S),x=Object(i.useRef)(!1),B=function(e){return Object(i.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),P=Object(l.a)(v),T=Object(l.a)(O),N=Object(l.a)(y),D=Object(l.a)(k),R=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&S||!(null===(n=e.items)||void 0===n?void 0:n.length);Object(i.useEffect)((function(){var t;if(w)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:w,ref:E,disabled:!!C}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,w)}}),[w,C,e.registerItem,e.unregisterItem]),Object(i.useEffect)((function(){var t=E.current;t&&e.unstable_moves&&I.current&&t.focus()}),[e.unstable_moves]);var A=Object(i.useCallback)((function(t){var n,o;if(null===(n=P.current)||void 0===n||n.call(P,t),!t.defaultPrevented&&!Object(d.a)(t)&&w&&!function(e,t){if(Object(s.a)(e))return!1;for(var n,o=Object(r.c)(t);!(n=o()).done;)if(n.value.ref.current===e.target)return!0;return!1}(t,e.items)&&(null===(o=e.setCurrentId)||void 0===o||o.call(e,w),e.unstable_virtual&&e.baseId&&Object(s.a)(t))){var c=t.target,i=Object(m.a)(c).getElementById(e.baseId);i&&(x.current=!0,Object(b.a)(i))}}),[w,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),M=Object(i.useCallback)((function(t){var n;if(e.unstable_virtual&&x.current)return x.current=!1,t.preventDefault(),void t.stopPropagation();null===(n=T.current)||void 0===n||n.call(T,t)}),[e.unstable_virtual]),L=Object(i.useCallback)((function(e){var t;if(null===(t=N.current)||void 0===t||t.call(N,e),Object(s.a)(e)&&1===e.key.length&&" "!==e.key){var n=j(e.currentTarget);if(n&&Object(g.a)(n)){n.focus();var r=e.key;window.requestAnimationFrame((function(){Object(h.a)(n,r)}))}}}),[]),F=Object(i.useMemo)((function(){return Object(p.a)({onKeyDown:L,stopPropagation:!0,shouldKeyDown:s.a,keyMap:function(){var t="horizontal"!==e.orientation,n="vertical"!==e.orientation,r=!!(null==B?void 0:B.groupId),o=function(e){var t=j(e.currentTarget);t&&Object(g.a)(t)&&Object(h.a)(t,"")},c=e.up&&function(){return e.up()},i=e.next&&function(){return e.next()},a=e.down&&function(){return e.down()},l=e.previous&&function(){return e.previous()};return{Delete:o,Backspace:o,ArrowUp:(r||t)&&c,ArrowRight:(r||n)&&i,ArrowDown:(r||t)&&a,ArrowLeft:(r||n)&&l,Home:function(t){var n,o;!r||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(o=e.previous)||void 0===o||o.call(e,!0)},End:function(t){var n,o;!r||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(o=e.next)||void 0===o||o.call(e,!0)},PageUp:function(){var t,n;r?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;r?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}}})}),[L,e.orientation,B,e.up,e.next,e.down,e.previous,e.first,e.last]),V=Object(i.useCallback)((function(e){var t;if(null===(t=D.current)||void 0===t||t.call(D,e),!e.defaultPrevented){var n=j(e.currentTarget);n&&!Object(u.a)(n)&&n.focus()}}),[]);return Object(r.b)({ref:Object(a.a)(E,o),id:w,tabIndex:R?f:-1,"aria-selected":!(!e.unstable_virtual||!S)||void 0,onFocus:A,onBlur:M,onKeyDown:F,onClick:V},_)}}),k=Object(o.a)({as:"button",memo:!0,useHook:y})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(38),o=n(36),c=n(29),i=n(39);function a(e){return Object(r.a)(e)||Object(o.a)(e)||Object(c.a)(e)||Object(i.a)()}},,,function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(185)),c=r(n(186)),i=n(12),a=r(i),l=r(n(152)),s=r(n(187)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function b(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.fun(e)?e.apply(void 0,n):e}function m(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return u.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var v,O,g=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(s(t))}))},t}return l(t,e),t}(g),j=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.removeChild(s(t))}))},t}l(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof g)&&(t[n]=r instanceof g?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(g);function y(e,t){v={fn:e,transform:t}}function k(e){O=e}var _,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function C(e){_=e}var S,I=function(){return Date.now()};function x(e){S=e}var B,P,T=function(e){return e.current};function N(e){B=e}var D=Object.freeze({get applyAnimatedValues(){return v},injectApplyAnimatedValues:y,get colorNames(){return O},injectColorNames:k,get requestFrame(){return E},get cancelFrame(){return w},injectFrame:function(e,t){E=e,w=t},get interpolation(){return _},injectStringInterpolator:C,get now(){return I},injectNow:function(e){I=e},get defaultElement(){return S},injectDefaultElement:x,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return B},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),R=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:B(t.style)}):t,r.update=n,r.attach(),r}return l(t,e),t}(j),A=!1,M=new Set,L=function e(){if(!A)return!1;var t=I(),n=M,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,l=0;l<i.configs.length;l++){for(var s=i.configs[l],u=void 0,d=void 0,b=0;b<s.animatedValues.length;b++){var f=s.animatedValues[b];if(!f.done){var p=s.fromValues[b],m=s.toValues[b],v=f.lastPosition,O=m instanceof g,h=Array.isArray(s.initialVelocity)?s.initialVelocity[b]:s.initialVelocity;if(O&&(m=m.getValue()),s.immediate)f.setValue(m),f.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==s.duration)v=p+s.easing((t-f.startTime)/s.duration)*(m-p),u=t>=f.startTime+s.duration;else if(s.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-v)<.1)&&(m=v);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:s.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),y=0;y<j;++y)v+=1*(h+=(-s.tension*(v-m)+-s.friction*h)/s.mass*1/1e3)/1e3;var k=!(!s.clamp||0===s.tension)&&(p<m?v>m:v<m),_=Math.abs(h)<=s.precision,w=0===s.tension||Math.abs(m-v)<=s.precision;u=k||_&&w,f.lastVelocity=h,f.lastTime=t}O&&!s.toValues[b].done&&(u=!1),u?(f.value!==m&&(v=m),f.done=!0):a=!0,f.setValue(v),f.lastPosition=v}else f.setValue(m),f.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(M.delete(i),i.stop(!0))}return M.size?P?P():E(e):A=!1,A};function F(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return F({range:e,output:t,extrapolate:n});if(_&&"string"==typeof e.output[0])return _(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,a,l){var s=l?l(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t),s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r,s)}(e,c[t],c[t+1],o[t],o[t+1],l,i,a,r.map)}}var V=function(e){function t(n,r,o){var c;return(c=e.call(this)||this).calc=void 0,c.payload=n instanceof h&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],c.calc=F(r,o),c}l(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t){this.calc=F(e,t)},n.interpolate=function(e,n){return new t(this,e,n)},t}(h),H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}l(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t){return new V(this,e,t)},t}(g),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}l(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(h),U=0,G=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=U++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,a=c(t,["delay","to"]);if(u.arr(i)||u.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var l={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:p(r,n)},a),s=l[i.delay]&&l[i.delay].to;l[i.delay]=o({},l[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(l)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,r=void 0===n?{}:n,c=e.to,i=void 0===c?{}:c;u.obj(r)&&(t.merged=o({},r,t.merged)),u.obj(i)&&(t.merged=o({},t.merged,i))}));var n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((function(o,i){var a=o.delay,l=c(o,["delay"]),s=function(o){i===r.length-1&&n===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(l.to)||u.fun(l.to);a?setTimeout((function(){n===t.guid&&(d?t.runAsync(l,s):t.diff(l).start(s))}),a):d?t.runAsync(l,s):t.diff(l).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,M.has(this)||M.add(this),A||(A=!0,E(P||L));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,M.has(this)&&M.delete(this)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(u.arr(r.to))for(var l=function(e){var t=e,c=o({},r,m(r.to[t]));u.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)l(s);else if(u.fun(r.to)){var d,b=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(u.arr(t.config)&&(t.config=t.config[b]),b++,i===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,a=void 0===i?{}:i,l=n.config,s=void 0===l?{}:l,d=n.reverse,m=n.attach,v=n.reset,g=n.immediate;if(d){var h=[a,c];c=h[0],a=h[1]}this.merged=o({},c,this.merged,a),this.hasChanged=!1;var j=m&&m(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],a=e[r]||{},l=u.num(i),d=u.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!O[i],m=u.arr(i),h=!l&&!m&&!d,y=u.und(c[r])?i:c[r],k=l||m||d?i:1,E=p(s,r);j&&(k=j.animations[r].parent);var w,C=a.parent,S=a.interpolation,x=f(j?k.getPayload():k),B=i;h&&(B=_({range:[0,1],output:[i,i]})(1));var P,T=S&&S.getValue(),N=!u.und(C)&&a.animatedValues.some((function(e){return!e.done})),D=!u.equ(B,T),R=!u.equ(B,a.previous),A=!u.equ(E,a.config);if(v||R&&D||A){var M;if(l||d)C=S=a.parent||new H(y);else if(m)C=S=a.parent||new z(y);else if(h){var L=a.interpolation&&a.interpolation.calc(a.parent.value);L=void 0===L||v?y:L,a.parent?(C=a.parent).setValue(0,!1):C=new H(0);var F={output:[L,i]};a.interpolation?(S=a.interpolation,a.interpolation.updateConfig(F)):S=C.interpolate(F)}return x=f(j?k.getPayload():k),w=f(C.getPayload()),v&&!h&&C.setValue(y,!1),t.hasChanged=!0,w.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=I(),e.done=!1,e.animatedStyles.clear()})),p(g,r)&&C.setValue(h?k:i,!1),o({},e,((M={})[r]=o({},a,{name:r,parent:C,interpolation:S,animatedValues:w,toValues:x,previous:B,config:E,fromValues:f(C.getValue()),immediate:p(g,r),initialVelocity:b(E.velocity,0),clamp:b(E.clamp,!1),precision:b(E.precision,.01),tension:b(E.tension,170),friction:b(E.friction,26),mass:b(E.mass,1),duration:E.duration,easing:b(E.easing,(function(e){return e})),decay:E.decay}),M))}return D?e:(h&&(C.setValue(1,!1),S.updateConfig({output:[B,B]})),C.done=!0,t.hasChanged=!0,o({},e,((P={})[r]=o({},e[r],{previous:B}),P)))}),this.animations),this.hasChanged)for(var y in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[y]=this.animations[y].interpolation,this.values[y]=this.animations[y].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),W=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=u.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new G,i=o?p(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],l=c[1];r.current=a,i.useImperativeHandle(l,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?p(e,n,t):e[n]),l||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):l||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var d=r.current.map((function(e){return e.getValues()}));return o?[d,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},K=0,q=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},$=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:q(t,r)},i)};function Y(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,a=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof g||(t=v.transform(t)),n.payload=t,n}return l(t,e),t}(j),Q={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+J(Z,Z,Z)),te=new RegExp("rgba"+J(Z,Z,Z,Z)),ne=new RegExp("hsl"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function le(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=le(o,r,e+1/3),i=le(o,r,e),a=le(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|be(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ae.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(se(de(n[1]),fe(n[2]),fe(n[3]))|be(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ve=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Oe=new RegExp("("+Object.keys(Q).join("|")+")","g"),ge={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","Ms","Moz","O"];function je(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).reduce((function(e,t){return he.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ge);var ye={};N((function(e){return new X(e)})),x("div"),C((function(e){var t=e.output.map((function(e){return e.replace(ve,pe)})).map((function(e){return e.replace(Oe,pe)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return F(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),k(Q),y((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),l="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var u=0===s.indexOf("--"),d=je(s,n[s],u);"float"===s&&(s="cssFloat"),u?e.style.setProperty(s,d):e.style[s]=d}for(var b in a){var f=l?b:ye[b]||(ye[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,a[b])}}),(function(e){return e}));var ke,_e,Ee=(ke=function(e){return i.forwardRef((function(t,n){var r=d(),l=i.useRef(!0),s=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=s.current;s.current=new R(e,(function(){b.current&&!1===v.fn(b.current,s.current.getAnimatedValue())&&r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){l.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,l,r)})),f(t);var p=s.current.getValue(),m=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return a.createElement(e,o({},m,{ref:function(e){return b.current=(t=e,(r=n)&&(u.fun(r)?r(t):u.obj(r)&&(r.current=t)),t);var t,r}}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=ke(n),e}),ke)}),we=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=L,t.animated=we,t.a=we,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=u.fun(e),n=W(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=u.fun(t),c=p(t),a=i.useRef(),l=W(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:p(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),s=l[0],d=l[1],b=l[2],f=i.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.current[r];return o({},e,{config:p(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&f(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,f,b]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=$(r),l=a.lazy,s=void 0!==l&&l,u=(a.unique,a.reset),b=void 0!==u&&u,f=(a.enter,a.leave,a.update,a.onDestroyed),m=(a.keys,a.items,a.onFrame),v=a.onRest,O=a.onStart,g=a.ref,h=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),j=d(),y=i.useRef(!1),k=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!y.current&&new Map,forceUpdate:j});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(k.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(k.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(k.current.instances).map((function(e){return e[1]}))}}})),k.current=function(e,t){for(var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=$(t),l=a.items,s=a.keys,u=a.initial,d=a.from,b=a.enter,f=a.leave,m=a.update,v=a.trail,O=void 0===v?0:v,g=a.unique,h=a.config,j=a.order,y=void 0===j?["enter","leave","update"]:j,k=$(r),_=k.keys,E=k.items,w=o({},i.current),C=[].concat(i.deleted),S=Object.keys(w),I=new Set(S),x=new Set(s),B=s.filter((function(e){return!I.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!x.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return I.has(e)})),N=-O;y.length;)switch(y.shift()){case"enter":B.forEach((function(e,t){g&&C.find((function(t){return t.originalKey===e}))&&(C=C.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=l[r],c=n&&void 0!==u?"initial":"enter";w[e]={slot:c,originalKey:e,key:g?String(e):K++,item:o,trail:N+=O,config:p(h,o,c),from:p(n&&void 0!==u?u||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];C.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=O,config:p(h,n,"leave"),to:p(f,n)})),delete w[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=l[t];w[e]=o({},w[e],{item:n,slot:"update",trail:N+=O,config:p(h,n,"update"),to:p(m,n)})}))}var D=s.map((function(e){return w[e]}));return C.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=D.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),D=[].concat(D.slice(0,t),[r],D.slice(t))})),o({},i,{changed:B.length||P.length||T.length,first:n&&0===B.length,transitions:D,current:w,deleted:C,prevProps:t})}(k.current,r),k.current.changed&&k.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,l=e.item;k.current.instances.has(a)||k.current.instances.set(a,new G);var u=k.current.instances.get(a),d=o({},h,{to:r,from:n,config:c,ref:g,onRest:function(n){k.current.mounted&&(e.destroyed&&(g||s||Y(k,a),f&&f(l)),!Array.from(k.current.instances).some((function(e){return!e[1].idle}))&&(g||s)&&k.current.deleted.length>0&&Y(k),v&&v(l,t,n))},onStart:O&&function(){return O(l,t)},onFrame:m&&function(e){return m(l,t,e)},delay:i,reset:b&&"enter"===t});u.update(d),k.current.paused||u.start()})),i.useEffect((function(){return k.current.mounted=y.current=!0,function(){k.current.mounted=y.current=!1,Array.from(k.current.instances).map((function(e){return e[1].destroy()})),k.current.instances.clear()}}),[]),k.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:k.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=W},,,,,,function(e,t,n){"use strict";e.exports=n(193)},function(e,t){e.exports=window.wp.wordcount},,,function(e,t){e.exports=window.wp.shortcode},function(e,t,n){"use strict";var r=n(6),o=n(15),c=n(0);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,a=void 0===n?24:n,l=Object(o.a)(e,["icon","size"]);return Object(c.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:a,height:a},l))}},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},,function(e,t,n){"use strict";var r=n(8),o=n(15),c=n(0),i=n(2),a=n(3),l=n(174),s=Object(a.createSlotFill)("BlockControls"),u=s.Fill,d=s.Slot,b=function(e){return"BlockControls".concat(e?"-expanded":"")},f=function(e){var t=e.controls,n=e.__experimentalIsExpanded,r=e.children;return Object(l.a)()?Object(c.createElement)(u,{name:b(n)},(function(e){var n=Object(i.isEmpty)(e)?null:e;return Object(c.createElement)(a.__experimentalToolbarContext.Provider,{value:n},Object(c.createElement)(a.ToolbarGroup,{controls:t}),r)})):null};f.Slot=function(e){var t=e.__experimentalIsExpanded,n=void 0!==t&&t,i=Object(o.a)(e,["__experimentalIsExpanded"]),l=Object(c.useContext)(a.__experimentalToolbarContext);return Object(c.createElement)(d,Object(r.a)({name:b(n)},i,{fillProps:l}))},t.a=f},,,,,,,,function(e,t,n){"use strict";var r=n(147);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,,,,function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){e.exports=function(){"use strict";return function(e){var t={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(t,e),function(e){return function(n){return function(r){var o,c,i=t[r.type],a=n(r);if(i)for(o=0;o<i.length;o++)(c=i[o](r,e))&&e.dispatch(c);return a}}}}}()},,,,,function(e,t){e.exports=window.wp.tokenList},,,,function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=c},,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(4),o=n(91);function c(){var e=Object(o.b)(),t=e.isSelected,n=e.clientId,c=e.name,i=Object(r.useSelect)((function(e){if(!t){var r=e("core/block-editor"),o=r.getBlockName,i=r.isFirstMultiSelectedBlock,a=r.getMultiSelectedBlockClientIds;return!!i(n)&&a().every((function(e){return o(e)===c}))}}),[n,t,c]);return t||i}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},,,,function(e,t,n){"use strict";var r=a(n(294)),o=a(n(299)),c=a(n(215)),i=a(n(212));function a(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:c.default,ReplaceTransition:o.default,CSSTransition:r.default}},,,,,,function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var a=n(12),l=n(31),s=n(189),u=n(190),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout((function(){return e.textarea&&s(e.textarea)})):this.textarea&&s(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),s.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),o=(t.innerRef,t.children),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),s=this.state.lineHeight,u=n&&s?s*n:null;return a.createElement("textarea",c({},l,{onChange:this.onChange,style:u?c({},r,{maxHeight:u}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&s.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(d,c({},e,{innerRef:t}))}))},function(e,t,n){var r,o;void 0===(o="function"==typeof(r=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){var t=o.get(e);t&&t.destroy()}function a(e){var t=o.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,i=null,a=function(){e.clientWidth!==r&&d()},l=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:l,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(s("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==r){i=r;var o=c("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=l,e.exports=t.default})?r.apply(t,[e,t]):r)||(e.exports=o)},function(e,t,n){var r=n(191);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var c=e.nodeName,i=document.createElement(c);i.innerHTML=" ","TEXTAREA"===c.toUpperCase()&&i.setAttribute("rows","1");var a=r(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),n=i.offsetHeight,l.removeChild(i)}return n}},function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=c},function(e,t,n){"use strict";var r=n(194);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,c=n.onlyScrollIfNeeded,i=n.alignWithTop,a=n.alignWithLeft,l=n.offsetTop||0,s=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var b=r.isWindow(t),f=r.offset(e),p=r.outerHeight(e),m=r.outerWidth(e),v=void 0,O=void 0,g=void 0,h=void 0,j=void 0,y=void 0,k=void 0,_=void 0,E=void 0,w=void 0;b?(k=t,w=r.height(k),E=r.width(k),_={left:r.scrollLeft(k),top:r.scrollTop(k)},j={left:f.left-_.left-s,top:f.top-_.top-l},y={left:f.left+m-(_.left+E)+d,top:f.top+p-(_.top+w)+u},h=_):(v=r.offset(t),O=t.clientHeight,g=t.clientWidth,h={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(v.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-s,top:f.top-(v.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-l},y={left:f.left+m-(v.left+g+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+p-(v.top+O+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),j.top<0||y.top>0?!0===i?r.scrollTop(t,h.top+j.top):!1===i?r.scrollTop(t,h.top+y.top):j.top<0?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+y.top):c||((i=void 0===i||!!i)?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+y.top)),o&&(j.left<0||y.left>0?!0===a?r.scrollLeft(t,h.left+j.left):!1===a?r.scrollLeft(t,h.left+y.left):j.left<0?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+y.left):c||((a=void 0===a||!!a)?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+y.left)))}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function c(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function i(e){return c(e)}function a(e){return c(e,!0)}function l(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,c=o.body,i=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=i.clientLeft||c.clientLeft||0,top:r-=i.clientTop||c.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=i(r),t.top+=a(r),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="left",b=void 0;function f(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,c=n||o.defaultView.getComputedStyle(e,null);return c&&(r=c.getPropertyValue(t)||c[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!u.test(t)){var r=e.style,o=r[d],c=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],r[d]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[d]=o,e.runtimeStyle[d]=c}return""===n?"auto":n});var m=["margin","border","padding"];function v(e,t,n){var r={},o=e.style,c=void 0;for(c in t)t.hasOwnProperty(c)&&(r[c]=o[c],o[c]=t[c]);for(c in n.call(e),t)t.hasOwnProperty(c)&&(o[c]=r[c])}function O(e,t,n){var r=0,o=void 0,c=void 0,i=void 0;for(c=0;c<t.length;c++)if(o=t[c])for(i=0;i<n.length;i++){var a;a="border"===o?o+n[i]+"Width":o+n[i],r+=parseFloat(b(e,a))||0}return r}function g(e){return null!=e&&e==e.window}var h={};function j(e,t,n){if(g(e))return"width"===t?h.viewportWidth(e):h.viewportHeight(e);if(9===e.nodeType)return"width"===t?h.docWidth(e):h.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,c=(b(e),p(e)),i=0;(null==o||o<=0)&&(o=void 0,(null==(i=b(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=c?1:-1);var a=void 0!==o||c,l=o||i;if(-1===n)return a?l-O(e,["border","padding"],r):i;if(a){var s=2===n?-O(e,["border"],r):O(e,["margin"],r);return l+(1===n?0:s)}return i+O(e,m.slice(n),r)}f(["Width","Height"],(function(e){h["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],h["viewport"+e](n))},h["viewport"+e]=function(t){var n="client"+e,r=t.document,o=r.body,c=r.documentElement[n];return"CSS1Compat"===r.compatMode&&c||o&&o[n]||c}}));var y={position:"absolute",visibility:"hidden",display:"block"};function k(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=j.apply(void 0,n):v(e,y,(function(){t=j.apply(void 0,n)})),t}function _(e,t,n){var r=n;if("object"!==(void 0===t?"undefined":o(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):b(e,t);for(var c in t)t.hasOwnProperty(c)&&_(e,c,t[c])}f(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);h["outer"+t]=function(t,n){return t&&k(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];h[e]=function(t,r){return void 0===r?t&&k(t,e,-1):t?(b(t),p(t)&&(r+=O(t,["padding","border"],n)),_(t,e,r)):void 0}})),e.exports=r({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return l(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=l(e),r={},o=void 0,c=void 0;for(c in t)t.hasOwnProperty(c)&&(o=parseFloat(_(e,c))||0,r[c]=o+t[c]-n[c]);_(e,r)}(e,t)},isWindow:g,each:f,css:_,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(g(e)){if(void 0===t)return i(e);window.scrollTo(t,a(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(g(e)){if(void 0===t)return a(e);window.scrollTo(i(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},h)},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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"}));t.a=c},,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=c},,,,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));t.a=c},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(31)),o=a(n(12)),c=a(n(113)),i=n(213);function a(e){return e&&e.__esModule?e:{default:e}}n(214),t.UNMOUNTED="unmounted",t.EXITED="exited",t.ENTERING="entering",t.ENTERED="entered",t.EXITING="exiting";var l=function(e){var t,n;function r(t,n){var r;r=e.call(this,t,n)||this;var o,c=n.transitionGroup,i=c&&!c.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o="exited",r.appearStatus="entering"):o="entered":o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getChildContext=function(){return{transitionGroup:null}},r.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null},i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},i.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=c.default.findDOMNode(this);"entering"===t?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},i.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,c=this.getTimeouts(),i=o?c.appear:c.enter;t||r?(this.props.onEnter(e,o),this.safeSetState({status:"entering"},(function(){n.props.onEntering(e,o),n.onTransitionEnd(e,i,(function(){n.safeSetState({status:"entered"},(function(){n.props.onEntered(e,o)}))}))}))):this.safeSetState({status:"entered"},(function(){n.props.onEntered(e)}))},i.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:"exiting"},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var c=o.default.Children.only(n);return o.default.cloneElement(c,r)},r}(o.default.Component);function s(){}l.contextTypes={transitionGroup:r.object},l.childContextTypes={transitionGroup:function(){}},l.propTypes={},l.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:s,onEntering:s,onEntered:s,onExit:s,onExiting:s,onExited:s},l.UNMOUNTED=0,l.EXITED=1,l.ENTERING=2,l.ENTERED=3,l.EXITING=4;var u=(0,i.polyfill)(l);t.default=u},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function c(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==a){var l=e.displayName||e.name,s="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+s+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=c;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return i})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,c.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";var r;t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0,(r=n(31))&&r.__esModule,t.timeoutsShape=null,t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=a(n(31)),o=a(n(12)),c=n(213),i=n(300);function a(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},d=function(e){var t,n;function r(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(s(s(r)));return r.state={handleExited:o,firstRender:!0},r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var c=r.prototype;return c.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},c.componentDidMount=function(){this.appeared=!0,this.mounted=!0},c.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,i.getInitialChildMapping)(e,r):(0,i.getNextChildMapping)(e,n,r),firstRender:!1}},c.handleExited=function(e,t){var n=(0,i.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=l({},t.children);return delete n[e.key],{children:n}})))},c.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),c=u(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?c:o.default.createElement(t,r,c)},r}(o.default.Component);d.childContextTypes={transitionGroup:r.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var b=(0,c.polyfill)(d);t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-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"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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"}));t.a=c},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.dispatch;return function(e){return function(n){return Array.isArray(n)?n.filter(Boolean).map(t):e(n)}}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r=n(9),o=n(0),c=n(179),i=n(2),a=(n(100),n(138));function l(e){var t=e.children,n=e.className;return Object(o.createElement)(a.a.Slot,{__experimentalIsExpanded:!0},(function(e){return Object(o.createElement)(s,{className:n,fills:e},t)}))}function s(t){var n=t.fills,a=t.className,l=void 0===a?"":a,s=t.children,u=Object(o.useRef)(),d=Object(o.useRef)(),b=Object(o.useRef)(),f=Object(o.useState)({}),p=Object(r.a)(f,2),m=p[0],v=p[1],O=Object(o.useRef)();O.current=n;var g=Object(o.useCallback)(Object(i.throttle)((function(){var e=O.current.length?d.current:b.current;if(e){e.style.position="absolute",e.style.width="auto";var t,n=(t=e).ownerDocument.defaultView.getComputedStyle(t);v({width:n.getPropertyValue("width"),height:n.getPropertyValue("height")}),e.style.position="",e.style.width=""}}),100),[]);Object(o.useEffect)((function(){var e=new window.MutationObserver((function(e){e.find((function(e){return"childList"===e.type}))&&g()}));return e.observe(u.current,{childList:!0,subtree:!0}),function(){return e.disconnect()}}),[]),Object(o.useEffect)((function(){n.length>1&&void 0!==e&&e.env}),[n.length]);var h=n[0];return Object(o.createElement)("div",{className:"block-editor-block-toolbar-animated-width-container",ref:u,style:m},Object(o.createElement)(c.TransitionGroup,null,h?Object(o.createElement)(c.CSSTransition,{key:"fills",timeout:300,classNames:"block-editor-block-toolbar-content"},Object(o.createElement)("div",{className:l,ref:d},h)):Object(o.createElement)(c.CSSTransition,{key:"default",timeout:300,classNames:"block-editor-block-toolbar-content"},Object(o.createElement)("div",{className:l,ref:b},s))))}}).call(this,n(107))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.diffChars=function(e,t,n){return o.diff(e,t,n)},t.characterDiff=void 0;var o=new(((r=n(301))&&r.__esModule?r:{default:r}).default);t.characterDiff=o},function(e,t,n){"use strict";t.match=function(e,t){return l(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var o=e.expressions.every((function(e){var n=e.feature,r=e.modifier,o=e.value,c=t[n];if(!c)return!1;switch(n){case"orientation":case"scan":return c.toLowerCase()===o.toLowerCase();case"width":case"height":case"device-width":case"device-height":o=d(o),c=d(c);break;case"resolution":o=u(o),c=u(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=s(o),c=s(c);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,c=parseInt(c,10)||0}switch(r){case"min":return c>=o;case"max":return c<=o;default:return c===o}}));return o&&!n||!o&&n}))},t.parse=l;var r=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,o=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,c=/^(?:(min|max)-)?(.+)/,i=/(em|rem|px|cm|mm|in|pt|pc)?$/,a=/(dpi|dpcm|dppx)?$/;function l(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(r),n=t[1],i=t[2],a=t[3]||"",l={};return l.inverse=!!n&&"not"===n.toLowerCase(),l.type=i?i.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],l.expressions=a.map((function(e){var t=e.match(o),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),l}))}function s(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(a)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function d(e){var t=parseFloat(e);switch(String(e).match(i)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],a=!0;return function e(d){var b=n?c(d):d,f={},p=!0,m={node:b,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){m.isRoot||(m.parent.node[m.key]=e),m.node=e,t&&(p=!1)},delete:function(e){delete m.parent.node[m.key],e&&(p=!1)},remove:function(e){l(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],e&&(p=!1)},keys:null,before:function(e){f.before=e},after:function(e){f.after=e},pre:function(e){f.pre=e},post:function(e){f.post=e},stop:function(){a=!1},block:function(){p=!1}};if(!a)return m;function v(){if("object"==typeof m.node&&null!==m.node){m.keys&&m.node_===m.node||(m.keys=i(m.node)),m.isLeaf=0==m.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){m.circular=o[e];break}}else m.isLeaf=!0,m.keys=null;m.notLeaf=!m.isLeaf,m.notRoot=!m.isRoot}v();var O=t.call(m,m.node);return void 0!==O&&m.update&&m.update(O),f.before&&f.before.call(m,m.node),p?("object"!=typeof m.node||null===m.node||m.circular||(o.push(m),v(),s(m.keys,(function(t,o){r.push(t),f.pre&&f.pre.call(m,m.node[t],t);var c=e(m.node[t]);n&&u.call(m.node,t)&&(m.node[t]=c.node),c.isLast=o==m.keys.length-1,c.isFirst=0==o,f.post&&f.post.call(m,c),r.pop()})),o.pop()),f.after&&f.after.call(m,m.node),m):m}(e).node}function c(e){if("object"==typeof e&&null!==e){var t;if(l(e))t=[];else if("[object Date]"===a(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===a(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===a(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===a(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===a(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===a(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return s(i(e),(function(n){t[n]=e[n]})),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];u.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var a=c(r);return e.push(r),t.push(a),s(i(r),(function(e){a[e]=n(r[e])})),e.pop(),t.pop(),a}return r}(this.value)};var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function a(e){return Object.prototype.toString.call(e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};s(i(r.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}},,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));t.a=c},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(31));var r=a(n(295)),o=a(n(298)),c=a(n(12)),i=a(n(212));function a(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n(214);var s=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,r.default)(e,t)}))},u=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,o.default)(e,t)}))},d=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),s(e,r),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,r),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("appear").doneClassName,o=t.getClassNames("enter").doneClassName,c=n?r+" "+o:o;t.removeClasses(e,n?"appear":"enter"),s(e,c),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),s(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),s(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?(r&&n?n+"-":"")+e:n[e];return{className:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,o=n.activeClassName,c=n.doneClassName;r&&u(e,r),o&&u(e,o),c&&u(e,c)},o.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,s(e,t))},o.render=function(){var e=l({},this.props);return delete e.classNames,c.default.createElement(i.default,l({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(c.default.Component);d.defaultProps={classNames:""},d.propTypes={};var b=d;t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(296);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,o.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var o=r(n(297));e.exports=t.default},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,i(n(31));var r=i(n(12)),o=n(113),c=i(n(215));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=i.prototype;return a.handleLifecycle=function(e,t,n){var c,i=this.props.children,a=r.default.Children.toArray(i)[t];a.props[e]&&(c=a.props)[e].apply(c,n),this.props[e]&&this.props[e]((0,o.findDOMNode)(this))},a.render=function(){var e=this.props,t=e.children,n=e.in,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),a=i[0],l=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(c.default,o,n?r.default.cloneElement(a,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);a.propTypes={};var l=a;t.default=l,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=c,t.getInitialChildMapping=function(e,t){return o(e.children,(function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var a=o(e.children),l=c(t,a);return Object.keys(l).forEach((function(o){var c=l[o];if((0,r.isValidElement)(c)){var s=o in t,u=o in a,d=t[o],b=(0,r.isValidElement)(d)&&!d.props.in;!u||s&&!b?u||!s||b?u&&s&&(0,r.isValidElement)(d)&&(l[o]=(0,r.cloneElement)(c,{onExited:n.bind(null,c),in:d.props.in,exit:i(c,"exit",e),enter:i(c,"enter",e)})):l[o]=(0,r.cloneElement)(c,{in:!1}):l[o]=(0,r.cloneElement)(c,{onExited:n.bind(null,c),in:!0,exit:i(c,"exit",e),enter:i(c,"enter",e)})}})),l};var r=n(12);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function c(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),c=[];for(var i in e)i in t?c.length&&(o[i]=c,c=[]):c.push(i);var a={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var s=o[l][r];a[o[l][r]]=n(s)}a[l]=n(l)}for(r=0;r<c.length;r++)a[c[r]]=n(c[r]);return a}function i(e,t,n){return null!=n[t]?n[t]:e.props[t]}},function(e,t,n){"use strict";function r(){}function o(e,t,n,r,o){for(var c=0,i=t.length,a=0,l=0;c<i;c++){var s=t[c];if(s.removed){if(s.value=e.join(r.slice(l,l+s.count)),l+=s.count,c&&t[c-1].added){var u=t[c-1];t[c-1]=t[c],t[c]=u}}else{if(!s.added&&o){var d=n.slice(a,a+s.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),s.value=e.join(d)}else s.value=e.join(n.slice(a,a+s.count));a+=s.count,s.added||(l+=s.count)}}var b=t[i-1];return i>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[i-2].value+=b.value,t.pop()),t}function c(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,u=1,d=l+s,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=l&&f+1>=s)return a([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var r=void 0,d=b[n-1],f=b[n+1],p=(f?f.newPos:0)-n;d&&(b[n-1]=void 0);var m=d&&d.newPos+1<l,v=f&&0<=p&&p<s;if(m||v){if(!m||v&&d.newPos<f.newPos?(r=c(f),i.pushComponent(r.components,void 0,!0)):((r=d).newPos++,i.pushComponent(r.components,!0,void 0)),p=i.extractCommon(r,t,e,n),r.newPos+1>=l&&p+1>=s)return a(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}u++}if(r)!function e(){setTimeout((function(){if(u>d)return r();p()||e()}),0)}();else for(;u<=d;){var m=p();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,c=n.length,i=e.newPos,a=i-r,l=0;i+1<o&&a+1<c&&this.equals(t[i+1],n[a+1]);)i++,a++,l++;return l&&e.components.push({count:l}),e.newPos=i,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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"}));t.a=c},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"getColorClassName",(function(){return ue})),n.d(t,"getColorObjectByAttributeValues",(function(){return le})),n.d(t,"getColorObjectByColorValue",(function(){return se})),n.d(t,"createCustomColorsHOC",(function(){return Tn})),n.d(t,"withColors",(function(){return Nn})),n.d(t,"__experimentalUseColors",(function(){return Yn})),n.d(t,"__experimentalGetGradientClass",(function(){return me})),n.d(t,"getGradientValueBySlug",(function(){return ve})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return Oe})),n.d(t,"getGradientSlugByValue",(function(){return ge})),n.d(t,"__experimentalUseGradient",(function(){return he})),n.d(t,"getFontSize",(function(){return qt})),n.d(t,"getFontSizeClass",(function(){return Yt})),n.d(t,"getFontSizeObjectByValue",(function(){return $t})),n.d(t,"FontSizePicker",(function(){return Xt})),n.d(t,"withFontSizes",(function(){return er})),n.d(t,"AlignmentToolbar",(function(){return lr})),n.d(t,"Autocomplete",(function(){return wr})),n.d(t,"BlockAlignmentToolbar",(function(){return R})),n.d(t,"__experimentalBlockAlignmentMatrixToolbar",(function(){return Cr})),n.d(t,"BlockBreadcrumb",(function(){return Ir})),n.d(t,"BlockContextProvider",(function(){return Tr})),n.d(t,"BlockControls",(function(){return O.a})),n.d(t,"BlockColorsStyleSelector",(function(){return Ar})),n.d(t,"BlockEdit",(function(){return Fr})),n.d(t,"useBlockEditContext",(function(){return U.b})),n.d(t,"BlockFormatControls",(function(){return Gr})),n.d(t,"BlockIcon",(function(){return kr})),n.d(t,"BlockNavigationDropdown",(function(){return gd})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return od})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return Nd})),n.d(t,"__experimentalBlockNavigationTree",(function(){return pd})),n.d(t,"__experimentalBlockVariationPicker",(function(){return Rd})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return Md})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return Wd})),n.d(t,"ButtonBlockerAppender",(function(){return El})),n.d(t,"ColorPalette",(function(){return Yd})),n.d(t,"ColorPaletteControl",(function(){return Xd})),n.d(t,"ContrastChecker",(function(){return ze})),n.d(t,"__experimentalGradientPicker",(function(){return Jd})),n.d(t,"__experimentalGradientPickerControl",(function(){return eb})),n.d(t,"__experimentalGradientPickerPanel",(function(){return tb})),n.d(t,"__experimentalFontAppearanceControl",(function(){return Rt})),n.d(t,"__experimentalFontFamilyControl",(function(){return Vt})),n.d(t,"__experimentalColorGradientControl",(function(){return Be})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return Fe})),n.d(t,"__experimentalImageSizeControl",(function(){return rb})),n.d(t,"InnerBlocks",(function(){return vb})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return mb})),n.d(t,"InspectorAdvancedControls",(function(){return $})),n.d(t,"InspectorControls",(function(){return $e})),n.d(t,"__experimentalLinkControl",(function(){return $b})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return Hb})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return Bb})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return xb})),n.d(t,"LineHeightControl",(function(){return Bt})),n.d(t,"MediaReplaceFlow",(function(){return Jb})),n.d(t,"MediaPlaceholder",(function(){return cf})),n.d(t,"MediaUpload",(function(){return Qb})),n.d(t,"MediaUploadCheck",(function(){return Zb})),n.d(t,"PanelColorSettings",(function(){return Ln})),n.d(t,"PlainText",(function(){return sf})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return df})),n.d(t,"RichText",(function(){return Td})),n.d(t,"RichTextShortcut",(function(){return bf})),n.d(t,"RichTextToolbarButton",(function(){return ff})),n.d(t,"__unstableRichTextInputEvent",(function(){return pf})),n.d(t,"ToolSelector",(function(){return vf})),n.d(t,"__experimentalUnitControl",(function(){return an})),n.d(t,"URLInput",(function(){return Cb})),n.d(t,"URLInputButton",(function(){return hf})),n.d(t,"URLPopover",(function(){return rf})),n.d(t,"__experimentalImageURLInputUI",(function(){return _f})),n.d(t,"withColorContext",(function(){return $d})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return fu})),n.d(t,"__experimentalInserterMenuExtension",(function(){return ms})),n.d(t,"__experimentalPreviewOptions",(function(){return wf})),n.d(t,"__experimentalUseResizeCanvas",(function(){return Tf})),n.d(t,"BlockInspector",(function(){return Lf})),n.d(t,"BlockList",(function(){return Fl})),n.d(t,"__experimentalBlock",(function(){return Gu})),n.d(t,"useBlockProps",(function(){return zu})),n.d(t,"BlockMover",(function(){return Gs})),n.d(t,"BlockPreview",(function(){return zl})),n.d(t,"BlockSelectionClearer",(function(){return Ff})),n.d(t,"BlockSettingsMenu",(function(){return ku})),n.d(t,"BlockSettingsMenuControls",(function(){return hu})),n.d(t,"BlockTitle",(function(){return Sr})),n.d(t,"BlockToolbar",(function(){return Iu})),n.d(t,"CopyHandler",(function(){return iu})),n.d(t,"DefaultBlockAppender",(function(){return _l})),n.d(t,"__unstableEditorStyles",(function(){return sp})),n.d(t,"Inserter",(function(){return xs})),n.d(t,"__experimentalLibrary",(function(){return up})),n.d(t,"__experimentalSearchForm",(function(){return Fo})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return bp})),n.d(t,"MultiSelectScrollIntoView",(function(){return fp})),n.d(t,"NavigableToolbar",(function(){return Vs})),n.d(t,"ObserveTyping",(function(){return mp})),n.d(t,"PreserveScrollInReorder",(function(){return vp})),n.d(t,"SkipToSelectedBlock",(function(){return Nf})),n.d(t,"Typewriter",(function(){return jp})),n.d(t,"Warning",(function(){return vo})),n.d(t,"WritingFlow",(function(){return Ds})),n.d(t,"BlockEditorProvider",(function(){return yl})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return Pf})),n.d(t,"__experimentalUseEditorFeature",(function(){return fe})),n.d(t,"transformStyles",(function(){return lp})),n.d(t,"validateThemeColors",(function(){return yp})),n.d(t,"validateThemeGradients",(function(){return kp})),n.d(t,"storeConfig",(function(){return gl})),n.d(t,"SETTINGS_DEFAULTS",(function(){return zo}));var r={};n.r(r),n.d(r,"resetBlocks",(function(){return xc})),n.d(r,"resetSelection",(function(){return Bc})),n.d(r,"receiveBlocks",(function(){return Pc})),n.d(r,"updateBlockAttributes",(function(){return Tc})),n.d(r,"updateBlock",(function(){return Nc})),n.d(r,"selectBlock",(function(){return Dc})),n.d(r,"selectPreviousBlock",(function(){return Rc})),n.d(r,"selectNextBlock",(function(){return Ac})),n.d(r,"startMultiSelect",(function(){return Mc})),n.d(r,"stopMultiSelect",(function(){return Lc})),n.d(r,"multiSelect",(function(){return Fc})),n.d(r,"clearSelectedBlock",(function(){return Vc})),n.d(r,"toggleSelection",(function(){return Hc})),n.d(r,"replaceBlocks",(function(){return Uc})),n.d(r,"replaceBlock",(function(){return Gc})),n.d(r,"moveBlocksDown",(function(){return Kc})),n.d(r,"moveBlocksUp",(function(){return qc})),n.d(r,"moveBlocksToPosition",(function(){return $c})),n.d(r,"moveBlockToPosition",(function(){return Yc})),n.d(r,"insertBlock",(function(){return Xc})),n.d(r,"insertBlocks",(function(){return Qc})),n.d(r,"__unstableSetInsertionPoint",(function(){return Zc})),n.d(r,"showInsertionPoint",(function(){return Jc})),n.d(r,"hideInsertionPoint",(function(){return ei})),n.d(r,"setTemplateValidity",(function(){return ti})),n.d(r,"synchronizeTemplate",(function(){return ni})),n.d(r,"mergeBlocks",(function(){return ri})),n.d(r,"removeBlocks",(function(){return oi})),n.d(r,"removeBlock",(function(){return ci})),n.d(r,"replaceInnerBlocks",(function(){return ii})),n.d(r,"toggleBlockMode",(function(){return ai})),n.d(r,"startTyping",(function(){return li})),n.d(r,"stopTyping",(function(){return si})),n.d(r,"startDraggingBlocks",(function(){return ui})),n.d(r,"stopDraggingBlocks",(function(){return di})),n.d(r,"enterFormattedText",(function(){return bi})),n.d(r,"exitFormattedText",(function(){return fi})),n.d(r,"selectionChange",(function(){return pi})),n.d(r,"insertDefaultBlock",(function(){return mi})),n.d(r,"updateBlockListSettings",(function(){return vi})),n.d(r,"updateSettings",(function(){return Oi})),n.d(r,"__unstableSaveReusableBlock",(function(){return gi})),n.d(r,"__unstableMarkLastChangeAsPersistent",(function(){return hi})),n.d(r,"__unstableMarkNextChangeAsNotPersistent",(function(){return ji})),n.d(r,"__unstableMarkAutomaticChange",(function(){return yi})),n.d(r,"setNavigationMode",(function(){return ki})),n.d(r,"setBlockMovingClientId",(function(){return _i})),n.d(r,"duplicateBlocks",(function(){return Ei})),n.d(r,"insertBeforeBlock",(function(){return wi})),n.d(r,"insertAfterBlock",(function(){return Ci})),n.d(r,"toggleBlockHighlight",(function(){return Si})),n.d(r,"flashBlock",(function(){return Ii})),n.d(r,"setHasControlledInnerBlocks",(function(){return xi}));var o={};n.r(o),n.d(o,"getBlockName",(function(){return Mi})),n.d(o,"isBlockValid",(function(){return Li})),n.d(o,"getBlockAttributes",(function(){return Fi})),n.d(o,"getBlock",(function(){return Vi})),n.d(o,"__unstableGetBlockWithoutInnerBlocks",(function(){return Hi})),n.d(o,"getBlocks",(function(){return zi})),n.d(o,"__unstableGetBlockWithBlockTree",(function(){return Ui})),n.d(o,"__unstableGetBlockTree",(function(){return Gi})),n.d(o,"getClientIdsOfDescendants",(function(){return Wi})),n.d(o,"getClientIdsWithDescendants",(function(){return Ki})),n.d(o,"getGlobalBlockCount",(function(){return qi})),n.d(o,"getBlocksByClientId",(function(){return $i})),n.d(o,"getBlockCount",(function(){return Yi})),n.d(o,"getSelectionStart",(function(){return Xi})),n.d(o,"getSelectionEnd",(function(){return Qi})),n.d(o,"getBlockSelectionStart",(function(){return Zi})),n.d(o,"getBlockSelectionEnd",(function(){return Ji})),n.d(o,"getSelectedBlockCount",(function(){return ea})),n.d(o,"hasSelectedBlock",(function(){return ta})),n.d(o,"getSelectedBlockClientId",(function(){return na})),n.d(o,"getSelectedBlock",(function(){return ra})),n.d(o,"getBlockRootClientId",(function(){return oa})),n.d(o,"getBlockParents",(function(){return ca})),n.d(o,"getBlockParentsByBlockName",(function(){return ia})),n.d(o,"getBlockHierarchyRootClientId",(function(){return aa})),n.d(o,"getLowestCommonAncestorWithSelectedBlock",(function(){return la})),n.d(o,"getAdjacentBlockClientId",(function(){return sa})),n.d(o,"getPreviousBlockClientId",(function(){return ua})),n.d(o,"getNextBlockClientId",(function(){return da})),n.d(o,"getSelectedBlocksInitialCaretPosition",(function(){return ba})),n.d(o,"getSelectedBlockClientIds",(function(){return fa})),n.d(o,"getMultiSelectedBlockClientIds",(function(){return pa})),n.d(o,"getMultiSelectedBlocks",(function(){return ma})),n.d(o,"getFirstMultiSelectedBlockClientId",(function(){return va})),n.d(o,"getLastMultiSelectedBlockClientId",(function(){return Oa})),n.d(o,"isFirstMultiSelectedBlock",(function(){return ga})),n.d(o,"isBlockMultiSelected",(function(){return ha})),n.d(o,"isAncestorMultiSelected",(function(){return ja})),n.d(o,"getMultiSelectedBlocksStartClientId",(function(){return ya})),n.d(o,"getMultiSelectedBlocksEndClientId",(function(){return ka})),n.d(o,"getBlockOrder",(function(){return _a})),n.d(o,"getBlockIndex",(function(){return Ea})),n.d(o,"isBlockSelected",(function(){return wa})),n.d(o,"hasSelectedInnerBlock",(function(){return Ca})),n.d(o,"isBlockWithinSelection",(function(){return Sa})),n.d(o,"hasMultiSelection",(function(){return Ia})),n.d(o,"isMultiSelecting",(function(){return xa})),n.d(o,"isSelectionEnabled",(function(){return Ba})),n.d(o,"getBlockMode",(function(){return Pa})),n.d(o,"isTyping",(function(){return Ta})),n.d(o,"isDraggingBlocks",(function(){return Na})),n.d(o,"getDraggedBlockClientIds",(function(){return Da})),n.d(o,"isBlockBeingDragged",(function(){return Ra})),n.d(o,"isAncestorBeingDragged",(function(){return Aa})),n.d(o,"isCaretWithinFormattedText",(function(){return Ma})),n.d(o,"getBlockInsertionPoint",(function(){return La})),n.d(o,"isBlockInsertionPointVisible",(function(){return Fa})),n.d(o,"isValidTemplate",(function(){return Va})),n.d(o,"getTemplate",(function(){return Ha})),n.d(o,"getTemplateLock",(function(){return za})),n.d(o,"canInsertBlockType",(function(){return Ga})),n.d(o,"canInsertBlocks",(function(){return Wa})),n.d(o,"getInserterItems",(function(){return Ya})),n.d(o,"hasInserterItems",(function(){return Xa})),n.d(o,"__experimentalGetAllowedBlocks",(function(){return Qa})),n.d(o,"getBlockListSettings",(function(){return Za})),n.d(o,"getSettings",(function(){return Ja})),n.d(o,"isLastBlockChangePersistent",(function(){return el})),n.d(o,"__experimentalGetBlockListSettingsForBlocks",(function(){return tl})),n.d(o,"__experimentalGetParsedReusableBlock",(function(){return nl})),n.d(o,"__unstableIsLastBlockChangeIgnored",(function(){return rl})),n.d(o,"__experimentalGetLastBlockAttributeChanges",(function(){return ol})),n.d(o,"isNavigationMode",(function(){return il})),n.d(o,"hasBlockMovingClientId",(function(){return al})),n.d(o,"didAutomaticChange",(function(){return ll})),n.d(o,"isBlockHighlighted",(function(){return sl})),n.d(o,"areInnerBlocksControlled",(function(){return ul})),n.d(o,"__experimentalGetActiveBlockIdByBlockNames",(function(){return dl}));var c=n(11),i=n(22),a=(n(105),n(55)),l=(n(84),n(8)),s=n(6),u=n(0),d=n(10),b=n.n(d),f=n(2),p=n(13),m=n(32),v=n(4),O=n(138),g=n(1),h=n(3),j=n(7),y=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),k=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),_=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),E=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),w=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),C={type:"default"},S=Object(u.createContext)(C),I=S.Provider;function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P={left:{icon:y,title:Object(g.__)("Align left")},center:{icon:k,title:Object(g.__)("Align center")},right:{icon:_,title:Object(g.__)("Align right")},wide:{icon:E,title:Object(g.__)("Wide width")},full:{icon:w,title:Object(g.__)("Full width")}},T=["left","center","right","wide","full"],N=["wide","full"],D={isAlternate:!0},R=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?T:r,c=e.isCollapsed,i=void 0===c||c,a=Object(v.useSelect)((function(e){return{wideControlsEnabled:(0,e("core/block-editor").getSettings)().alignWide}})).wideControlsEnabled,l=void 0!==a&&a,s=Object(u.useContext)(S);if("default"!==s.type)return null;var d=s.alignments,b=void 0===d?T:d,f=o.filter((function(e){return(l||!N.includes(e))&&b.includes(e)}));if(0===f.length)return null;var p=P[t],m=P.center;return Object(u.createElement)(h.ToolbarGroup,{popoverProps:D,isCollapsed:i,icon:p?p.icon:m.icon,label:Object(g.__)("Change alignment"),controls:f.map((function(e){return B(B({},P[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L=["left","center","right","wide","full"],F=["wide","full"];function V(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?L.filter((function(t){return e.includes(t)})):!0===e?L:[],!r||!0===e&&!n?f.without.apply(void 0,[t].concat(F)):t}var H=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=V(Object(c.getBlockSupport)(n,"align"),Object(c.hasBlockSupport)(n,"alignWide",!0));return[r.length>0&&t.isSelected&&Object(u.createElement)(O.a,{key:"align-controls"},Object(u.createElement)(R,{value:t.attributes.align,onChange:function(e){var n,r;e||(null===(n=Object(c.getBlockType)(t.name).attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e=""),t.setAttributes({align:e})},controls:r})),Object(u.createElement)(e,Object(l.a)({key:"edit"},t))]}}),"withToolbarControls"),z=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Object(v.useSelect)((function(e){return!!e("core/block-editor").getSettings().alignWide}),[]);if(void 0===r)return Object(u.createElement)(e,t);var i=V(Object(c.getBlockSupport)(n,"align"),Object(c.hasBlockSupport)(n,"alignWide",!0),o),a=t.wrapperProps;return i.includes(r)&&(a=M(M({},a),{},{"data-align":r})),Object(u.createElement)(e,Object(l.a)({},t,{wrapperProps:a}))}}));Object(m.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(f.has)(e.attributes,["align","type"])||Object(c.hasBlockSupport)(e,"align")&&(e.attributes=M(M({},e.attributes),{},{align:{type:"string",enum:[].concat(L,[""])}})),e})),Object(m.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",z),Object(m.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",H),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return V(Object(c.getBlockSupport)(t,"align"),Object(c.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=b()("align".concat(r),e.className)),e}));var U=n(91),G=Object(h.createSlotFill)("InspectorAdvancedControls"),W=G.Fill,K=G.Slot;function q(e){var t=e.children;return Object(U.b)().isSelected?Object(u.createElement)(W,null,t):null}q.slotName="InspectorAdvancedControls",q.Slot=K;var $=q;function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Q=/[\s#]/g,Z=Object(p.createHigherOrderComponent)((function(e){return function(t){return Object(c.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(u.createElement)(u.Fragment,null,Object(u.createElement)(e,t),Object(u.createElement)($,null,Object(u.createElement)(h.TextControl,{className:"html-anchor-control",label:Object(g.__)("HTML anchor"),help:Object(u.createElement)(u.Fragment,null,Object(g.__)("Enter a word or two — without spaces — to make a unique web address just for this heading, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(u.createElement)(h.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(g.__)("Learn more about anchors"))),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(Q,"-"),t.setAttributes({anchor:e})},autoComplete:"off"}))):Object(u.createElement)(e,t)}}),"withInspectorControl");function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(m.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(f.has)(e.attributes,["anchor","type"])||Object(c.hasBlockSupport)(e,"anchor")&&(e.attributes=X(X({},e.attributes),{},{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(m.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Z),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(c.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));var te=Object(p.createHigherOrderComponent)((function(e){return function(t){return Object(c.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(u.createElement)(u.Fragment,null,Object(u.createElement)(e,t),Object(u.createElement)($,null,Object(u.createElement)(h.TextControl,{autoComplete:"off",label:Object(g.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(g.__)("Separate multiple classes with spaces.")}))):Object(u.createElement)(e,t)}}),"withInspectorControl");function ne(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(c.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(m.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(c.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=ee(ee({},e.attributes),{},{className:{type:"string"}})),e})),Object(m.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",te),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(c.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=b()(e.className,n.className)),e})),Object(m.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(c.hasBlockSupport)(t,"customClassName",!0)){var r=Object(f.omit)(e,["className"]),o=Object(c.getSaveContent)(t,r),i=ne(o),a=ne(n),l=Object(f.difference)(a,i);l.length?e.className=l.join(" "):o&&delete e.className}return e}));var re=n(16);Object(m.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(c.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(f.uniq)([Object(c.getBlockDefaultClassName)(t.name)].concat(Object(re.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(c.getBlockDefaultClassName)(t.name)),e}));var oe=n(9),ce=n(119),ie=n(79),ae=n.n(ie),le=function(e,t,n){if(t){var r=Object(f.find)(e,{slug:t});if(r)return r}return{color:n}},se=function(e,t){return Object(f.find)(e,{color:t})};function ue(e,t){if(e&&t)return"has-".concat(Object(f.kebabCase)(t),"-").concat(e)}var de={"color.palette":function(e){return void 0===e.colors?void 0:e.colors},"color.gradients":function(e){return void 0===e.gradients?void 0:e.gradients},"color.custom":function(e){return void 0===e.disableCustomColors?void 0:!e.disableCustomColors},"color.customGradient":function(e){return void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients},"typography.fontSizes":function(e){return void 0===e.fontSizes?void 0:e.fontSizes},"typography.customFontSize":function(e){return void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes},"typography.customLineHeight":function(e){return e.enableCustomLineHeight},"spacing.units":function(e){if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw"]:e.enableCustomUnits}};function be(e,t){for(var n in t)if(t[n]!==e[n])return!1;return!0}function fe(e){var t=Object(U.b)(),n=t.name,r=t.clientId;return Object(v.useSelect)((function(t){var o,c=t("core/block-editor"),i=c.getBlockAttributes,a=(0,c.getSettings)(),l=t("core/blocks").getBlockType(n),s=n,u=Object(f.get)(l,["supports","__experimentalSelector"]);if(Object(f.isObject)(u)){var d=i(r);for(var b in u)if(be(d,u[b].attributes)){s=b;break}}var p="__experimentalFeatures.global.".concat(e),m="__experimentalFeatures.".concat(s,".").concat(e),v=null!==(o=Object(f.get)(a,m))&&void 0!==o?o:Object(f.get)(a,p);if(void 0!==v)return v;var O=de[e]?de[e](a):void 0;return void 0!==O?O:"typography.dropCap"===e||void 0}),[n,r,e])}var pe=[];function me(e){if(e)return"has-".concat(e,"-gradient-background")}function ve(e,t){var n=Object(f.find)(e,["slug",t]);return n&&n.gradient}function Oe(e,t){return Object(f.find)(e,["gradient",t])}function ge(e,t){var n=Oe(e,t);return n&&n.slug}function he(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.gradientAttribute,n=void 0===t?"gradient":t,r=e.customGradientAttribute,o=void 0===r?"customGradient":r,c=Object(U.b)(),i=c.clientId,a=fe("color.gradients")||pe,l=Object(v.useSelect)((function(e){var t=(0,e("core/block-editor").getBlockAttributes)(i);return{customGradient:t[o],gradient:t[n]}}),[i,n,o]),d=l.gradient,b=l.customGradient,f=Object(v.useDispatch)("core/block-editor"),p=f.updateBlockAttributes,m=Object(u.useCallback)((function(e){var t,r,c=ge(a,e);p(i,c?(r={},Object(s.a)(r,n,c),Object(s.a)(r,o,void 0),r):(t={},Object(s.a)(t,n,void 0),Object(s.a)(t,o,e),t))}),[a,i,p]),O=me(d);return{gradientClass:O,gradientValue:d?ve(a,d):b,setGradient:m}}var je=function e(t){if(!Object(f.isObject)(t))return t;var n=Object(f.pickBy)(Object(f.mapValues)(t,e),f.identity);return Object(f.isEqual)(n,{})?void 0:n},ye=n(15);function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
|
2 |
// translators: first %s: the color name or value (e.g. red or #ff0000)
|
3 |
-
var
|
4 |
-
function
|
5 |
// translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
|
6 |
-
var
|
7 |
-
function He(e){var t=e.tinyBackgroundColor,n=e.tinyTextColor,r=e.backgroundColor,o=e.textColor,c=t.getBrightness()<n.getBrightness()?Object(g.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(g.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(u.useEffect)((function(){Object(Ve.speak)(Object(g.__)("This color combination may be hard for people to read."))}),[r,o]),Object(u.createElement)("div",{className:"block-editor-contrast-checker"},Object(u.createElement)(h.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},c))}var ze=function(e){var t=e.backgroundColor,n=e.fallbackBackgroundColor,r=e.fallbackTextColor,o=e.fontSize,c=e.isLargeText,i=e.textColor;if(!t&&!n||!i&&!r)return null;var a=ae()(t||n),l=ae()(i||r);return 1!==a.getAlpha()||1!==l.getAlpha()||ae.a.isReadable(a,l,{level:"AA",size:c||!1!==c&&o>=24?"large":"small"})?null:Object(u.createElement)(He,{backgroundColor:t,textColor:i,tinyBackgroundColor:a,tinyTextColor:l})},Ue=n(174),Ge=Object(h.createSlotFill)("InspectorControls"),We=Ge.Fill,Ke=Ge.Slot;function qe(e){var t=e.children;return Object(Ue.a)()?Object(u.createElement)(We,null,t):null}qe.Slot=Ke;var $e=qe;function Ye(e,t){return t.getElementById("block-"+e)}function Xe(e,t){return t.closest(".block-editor-block-list__block")===e}function Qe(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(e){var t=e.closest(".block-editor-block-list__block");if(t)return t.id.slice("block-".length)}}function Ze(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function Je(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,c=Object(u.useState)(),i=Object(oe.a)(c,2),a=i[0],l=i[1],s=Object(u.useState)(),d=Object(oe.a)(s,2),b=d[0],f=d[1];return Object(u.useEffect)((function(){if(o){var e=Ye(n,document);if(e){f(Ze(e).color);for(var t=e,r=Ze(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)r=Ze(t=t.parentNode).backgroundColor;l(r)}}})),Object(u.createElement)($e,null,Object(u.createElement)(Fe,{title:Object(g.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(u.createElement)(ze,{backgroundColor:a,textColor:b})))}function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nt=[],rt=function(e){if("web"!==u.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},ot=function(e){if("web"!==u.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return Object(f.isObject)(t)&&!!t.link},ct=function(e){if("web"!==u.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return Object(f.isObject)(t)&&!!t.gradients},it=function(e){if("web"!==u.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return t&&!1!==t.text};function at(e,t,n){var r,o,c,i,a,l;if(!rt(t))return e;var u=ct(t),d=n.backgroundColor,f=n.textColor,p=n.gradient,m=n.style,v=ue("background-color",d),O=me(p),g=ue("color",f),h=b()(e.className,g,O,(l={},Object(s.a)(l,v,!(u&&(null==m||null===(r=m.color)||void 0===r?void 0:r.gradient)||!v)),Object(s.a)(l,"has-text-color",f||(null==m||null===(o=m.color)||void 0===o?void 0:o.text)),Object(s.a)(l,"has-background",d||(null==m||null===(c=m.color)||void 0===c?void 0:c.background)||u&&(p||(null==m||null===(i=m.color)||void 0===i?void 0:i.gradient))),Object(s.a)(l,"has-link-color",null==m||null===(a=m.color)||void 0===a?void 0:a.link),l));return e.className=h||void 0,e}var lt=function(e,t){var n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?le(e,n[1]).color:t};function st(e){var t,n,r,o,i,a,l=e.name,d=e.attributes,b=fe("color.link"),f=fe("color.palette")||nt,p=fe("color.gradients")||nt,m=Object(u.useRef)(d);if(Object(u.useEffect)((function(){m.current=d}),[d]),!rt(l))return null;var v,O=function(e){if("web"!==u.Platform.OS)return!1;var t=Object(c.getBlockSupport)(e,"color");return t&&!1!==t.background}(l),h=ct(l),j=d.style,y=d.textColor,k=d.backgroundColor,_=d.gradient;if(h&&_)v=ve(p,_);else if(h){var E;v=null==j||null===(E=j.color)||void 0===E?void 0:E.gradient}var w=function(t){return function(n){var r,o,c=se(f,n),i=t+"Color",a=tt(tt({},m.current.style),{},{color:tt(tt({},null===(r=m.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color),{},Object(s.a)({},t,(null==c?void 0:c.slug)?void 0:n))}),l=(null==c?void 0:c.slug)?c.slug:void 0,u=Object(s.a)({style:je(a)},i,l);e.setAttributes(u),m.current=tt(tt({},m.current),u)}};return Object(u.createElement)(Je,{enableContrastChecking:"web"===u.Platform.OS&&!_&&!(null==j||null===(t=j.color)||void 0===t?void 0:t.gradient),clientId:e.clientId,settings:[].concat(Object(re.a)(it(l)?[{label:Object(g.__)("Text Color"),onColorChange:w("text"),colorValue:le(f,y,null==j||null===(n=j.color)||void 0===n?void 0:n.text).color}]:[]),Object(re.a)(O||h?[{label:Object(g.__)("Background Color"),onColorChange:O?w("background"):void 0,colorValue:le(f,k,null==j||null===(r=j.color)||void 0===r?void 0:r.background).color,gradientValue:v,onGradientChange:h?function(t){var n,r=ge(p,t);if(r){var o,c,i,a=tt(tt({},null===(o=m.current)||void 0===o?void 0:o.style),{},{color:tt(tt({},null===(c=m.current)||void 0===c||null===(i=c.style)||void 0===i?void 0:i.color),{},{gradient:void 0})});n={style:je(a),gradient:r}}else{var l,s,u,d=tt(tt({},null===(l=m.current)||void 0===l?void 0:l.style),{},{color:tt(tt({},null===(s=m.current)||void 0===s||null===(u=s.style)||void 0===u?void 0:u.color),{},{gradient:t})});n={style:je(d),gradient:void 0}}e.setAttributes(n),m.current=tt(tt({},m.current),n)}:void 0}]:[]),Object(re.a)(b&&ot(l)?[{label:Object(g.__)("Link Color"),onColorChange:function(t){var n,r=se(f,t);e.setAttributes({style:tt(tt({},e.attributes.style),{},{color:tt(tt({},null===(n=e.attributes.style)||void 0===n?void 0:n.color),{},{link:(null==r?void 0:r.slug)?"var:preset|color|".concat(r.slug):t})})})},colorValue:lt(f,null==j||null===(o=j.color)||void 0===o?void 0:o.link),clearable:!!(null===(i=e.attributes.style)||void 0===i||null===(a=i.color)||void 0===a?void 0:a.link)}]:[]))})}var ut=Object(p.createHigherOrderComponent)((function(e){return function(t){var n,r,o,c=t.name,i=t.attributes,a=i.backgroundColor,s=i.textColor,d=fe("color.palette")||nt;if(!rt(c))return Object(u.createElement)(e,t);var b={color:s?null===(n=le(d,s))||void 0===n?void 0:n.color:void 0,backgroundColor:a?null===(r=le(d,a))||void 0===r?void 0:r.color:void 0},f=t.wrapperProps;return f=tt(tt({},t.wrapperProps),{},{style:tt(tt({},b),null===(o=t.wrapperProps)||void 0===o?void 0:o.style)}),Object(u.createElement)(e,Object(l.a)({},t,{wrapperProps:f}))}}));Object(m.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return rt(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),ct(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",at),Object(m.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!rt(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),at(r,e,n)},e})),Object(m.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",ut);var dt=n(290),bt=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"}));function ft(e){var t=e.value,n=e.textDecorations,r=e.onChange,o={strikethrough:dt.a,underline:bt};return Object(u.createElement)("fieldset",{className:"block-editor-text-decoration-control"},Object(u.createElement)("legend",null,Object(g.__)("Decoration")),Object(u.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},n.map((function(e){return Object(u.createElement)(h.Button,{key:e.slug,icon:o[e.slug],isSmall:!0,isPressed:t===e.slug,onClick:function(){return function(e){var o=t===e?void 0:e,c=n.find((function(e){return e.slug===o})),i=c?"var:preset|text-decoration|".concat(c.slug):void 0;r(i)}(e.slug)}},!o[e.slug]&&e.name)}))))}function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vt(e){var t,n=e.attributes.style,r=e.setAttributes,o=fe("typography.textDecorations");if(Ot(e))return null;var c=gt(o,null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration);return Object(u.createElement)(ft,{value:c,textDecorations:o,onChange:function(e){r({style:je(mt(mt({},n),{},{typography:mt(mt({},null==n?void 0:n.typography),{},{textDecoration:e})}))})}})}function Ot(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(c.hasBlockSupport)(t,"__experimentalTextDecoration"),r=fe("typography.textDecorations"),o=!!(null==r?void 0:r.length);return n||!o}var gt=function(e,t){var n,r=/var:preset\|text-decoration\|(.+)/.exec(t);return r&&r[1]?null===(n=e.find((function(e){return e.slug===r[1]})))||void 0===n?void 0:n.slug:t},ht=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})),jt=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M10.8 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.1-.4-.3-.9-.4-1.6-.4-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.3 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.5.1-.7 0-.8-.1zM9.1 16c-.2.3-.5.6-.9.8-.4.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.5-3.9c-.3-.6-.7-1.1-1.2-1.5-.5-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1 0-.6-.2-1.3-.5-1.9zm-1.6 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.5-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),yt=Object(u.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(j.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"}));function kt(e){var t=e.value,n=e.textTransforms,r=e.onChange,o={capitalize:ht,lowercase:jt,uppercase:yt};return Object(u.createElement)("fieldset",{className:"block-editor-text-transform-control"},Object(u.createElement)("legend",null,Object(g.__)("Letter case")),Object(u.createElement)("div",{className:"block-editor-text-transform-control__buttons"},n.map((function(e){return Object(u.createElement)(h.Button,{key:e.slug,icon:o[e.slug],isSmall:!0,isPressed:t===e.slug,onClick:function(){return function(e){var o=t===e?void 0:e,c=n.find((function(e){return e.slug===o})),i=c?"var:preset|text-transform|".concat(c.slug):void 0;r(i)}(e.slug)}},!o[e.slug]&&e.name)}))))}function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wt(e){var t,n=e.attributes.style,r=e.setAttributes,o=fe("typography.textTransforms");if(Ct(e))return null;var c=St(o,null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform);return Object(u.createElement)(kt,{value:c,textTransforms:o,onChange:function(e){r({style:je(Et(Et({},n),{},{typography:Et(Et({},null==n?void 0:n.typography),{},{textTransform:e})}))})}})}function Ct(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(c.hasBlockSupport)(t,"__experimentalTextTransform"),r=fe("typography.textTransforms"),o=!!(null==r?void 0:r.length);return n||!o}var St=function(e,t){var n,r=/var:preset\|text-transform\|(.+)/.exec(t);return r&&r[1]?null===(n=e.find((function(e){return e.slug===r[1]})))||void 0===n?void 0:n.slug:t};function It(e){var t=!Ot(e),n=!Ct(e);return t||n?Object(u.createElement)("div",{className:"block-editor-text-decoration-and-transform"},t&&Object(u.createElement)(vt,e),n&&Object(u.createElement)(wt,e)):null}var xt=n(18);function Bt(e){var t=e.value,n=e.onChange,r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return Object(u.createElement)("div",{className:"block-editor-line-height-control"},Object(u.createElement)(h.TextControl,{autoComplete:"off",onKeyDown:function(e){e.keyCode!==xt.ZERO||r||(e.preventDefault(),n("0"))},onChange:function(e){if(r)n(e);else{var t=e;switch(e){case"".concat(.1):t=1.6;break;case"0":t=1.4}n(t)}},label:Object(g.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}function Pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pt(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nt(e){var t,n=e.attributes.style;return Dt(e)?null:Object(u.createElement)(Bt,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:function(t){var r=Tt(Tt({},n),{},{typography:Tt(Tt({},null==n?void 0:n.typography),{},{lineHeight:t})});e.setAttributes({style:je(r)})}})}function Dt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!fe("typography.customLineHeight");return!Object(c.hasBlockSupport)(t,"lineHeight")||n}function Rt(e){var t=e.value,n=e.options,r=e.onChange,o=t.fontStyle,c=t.fontWeight,i=n.fontStyles,a=void 0===i?[]:i,l=n.fontWeights,s=void 0===l?[]:l,d=a.length>0||s.length>0,b=Object(u.useMemo)((function(){var e={fontStyle:void 0,fontWeight:void 0},t=[{key:"default",name:Object(g.__)("Default"),style:e,presetStyle:e}];return a.forEach((function(e){var n=e.name,r=e.slug;s.forEach((function(e){var o=e.name,c=e.slug;t.push({key:"".concat(c,"-").concat(r),name:"normal"===r?o:"".concat(o," ").concat(n),style:{fontStyle:r,fontWeight:c},presetStyle:{fontStyle:"var:preset|font-style|".concat(r),fontWeight:"var:preset|font-weight|".concat(c)}})}))})),t}),[n]),f=b.find((function(e){return e.presetStyle.fontStyle===o&&e.presetStyle.fontWeight===c}));return Object(u.createElement)("fieldset",{className:"components-font-appearance-control"},d&&Object(u.createElement)(h.CustomSelectControl,{className:"components-font-appearance-control__select",label:Object(g.__)("Appearance"),options:b,value:f,onChange:function(e){var t=e.selectedItem;return r(t.presetStyle)}}))}function At(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?At(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Lt(e){var t,n,r=e.attributes.style,o=e.setAttributes,c=fe("typography.fontStyles"),i=fe("typography.fontWeights");if(Ft(e))return null;var a={fontStyle:null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,fontWeight:null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight};return Object(u.createElement)(Rt,{value:a,options:{fontStyles:c,fontWeights:i},onChange:function(e){o({style:je(Mt(Mt({},r),{},{typography:Mt(Mt({},null==r?void 0:r.typography),e)}))})}})}function Ft(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(c.hasBlockSupport)(t,"__experimentalFontAppearance"),r=fe("typography.fontStyles"),o=fe("typography.fontWeights"),i=!!(null==r?void 0:r.length)&&!!(null==o?void 0:o.length);return n||!i}function Vt(e){var t=e.value,n=void 0===t?"":t,r=e.onChange,o=e.fontFamilies,c=Object(ye.a)(e,["value","onChange","fontFamilies"]),i=fe("typography.fontFamilies");if(o||(o=i),Object(f.isEmpty)(o))return null;var a=[{value:"",label:Object(g.__)("Default")}].concat(Object(re.a)(o.map((function(e){var t=e.fontFamily;return{value:t,label:e.name||t}}))));return Object(u.createElement)(h.SelectControl,Object(l.a)({label:Object(g.__)("Font family"),options:a,value:n,onChange:r,labelPosition:"top"},c))}function Ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ht(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ht(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ut(e){var t,n=e.name,r=e.setAttributes,o=e.attributes.style,c=void 0===o?{}:o,i=fe("typography.fontFamilies");if(Gt({name:n}))return null;var a=function(e,t){var n=/var:preset\|font-family\|(.+)/.exec(t);return n&&n[1]?Object(f.find)(e,(function(e){return e.slug===n[1]})).fontFamily:t}(i,null===(t=c.typography)||void 0===t?void 0:t.fontFamily);return Object(u.createElement)(Vt,{className:"block-editor-hooks-font-family-control",fontFamilies:i,value:a,onChange:function(e){var t=Object(f.find)(i,(function(t){return t.fontFamily===e}));r({style:je(zt(zt({},c),{},{typography:zt(zt({},c.typography||{}),{},{fontFamily:t?"var:preset|font-family|".concat(t.slug):e||void 0})}))})}})}function Gt(e){var t=e.name,n=fe("typography.fontFamilies");return!n||0===n.length||!Object(c.hasBlockSupport)(t,"__experimentalFontFamily")}var Wt=n(158),Kt=n.n(Wt),qt=function(e,t,n){if(t){var r=Object(f.find)(e,{slug:t});if(r)return r}return{size:n}};function $t(e,t){return Object(f.find)(e,{size:t})||{size:t}}function Yt(e){if(e)return"has-".concat(Object(f.kebabCase)(e),"-font-size")}var Xt=function(e){var t=fe("typography.fontSizes"),n=!fe("typography.customFontSize");return Object(u.createElement)(h.FontSizePicker,Object(l.a)({},e,{fontSizes:t,disableCustomFontSizes:n}))};function Qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Jt(e,t,n){if(!Object(c.hasBlockSupport)(t,"fontSize"))return e;var r=new Kt.a(e.className);r.add(Yt(n.fontSize));var o=r.value;return e.className=o||void 0,e}function en(e){var t,n=e.attributes,r=n.fontSize,o=n.style,c=e.setAttributes,i=tn(e),a=fe("typography.fontSizes");if(i)return null;var l=qt(a,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize);return Object(u.createElement)(Xt,{value:l.size,onChange:function(e){var t=$t(a,e).slug;c({style:je(Zt(Zt({},o),{},{typography:Zt(Zt({},null==o?void 0:o.typography),{},{fontSize:t?void 0:e})})),fontSize:t})}})}function tn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=fe("typography.fontSizes"),r=!!(null==n?void 0:n.length);return!Object(c.hasBlockSupport)(t,"fontSize")||!r}var nn=Object(p.createHigherOrderComponent)((function(e){return function(t){var n,r=fe("typography.fontSizes"),o=t.name,i=t.attributes,a=i.fontSize,l=i.style,s=t.wrapperProps,d=Zt({},t);if(Object(c.hasBlockSupport)(o,"fontSize")&&a&&!(null==l||null===(n=l.typography)||void 0===n?void 0:n.fontSize)){var b,f=qt(r,a,null==l||null===(b=l.typography)||void 0===b?void 0:b.fontSize).size;d.wrapperProps=Zt(Zt({},s),{},{style:Zt({fontSize:f},null==s?void 0:s.style)})}return Object(u.createElement)(e,d)}}),"withFontSizeInlineStyles");Object(m.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Object(c.hasBlockSupport)(e,"fontSize")?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",Jt),Object(m.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Object(c.hasBlockSupport)(e,"fontSize"))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),Jt(r,e,n)},e})),Object(m.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",nn);var rn=["lineHeight","__experimentalFontAppearance","fontSize","__experimentalFontFamily","__experimentalTextDecoration","__experimentalTextTransform"];function on(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[Ft(e),tn(e),Dt(e),Gt(e),Ot(e),Ct(e)];return t.filter(Boolean).length===t.length}(e),n=cn(e.name);return t||!n?null:Object(u.createElement)($e,null,Object(u.createElement)(h.PanelBody,{title:Object(g.__)("Typography")},Object(u.createElement)(Ut,e),Object(u.createElement)(en,e),Object(u.createElement)(Lt,e),Object(u.createElement)(Nt,e),Object(u.createElement)(It,e)))}var cn=function(e){return"web"===u.Platform.OS&&rn.some((function(t){return Object(c.hasBlockSupport)(e,t)}))};function an(e){var t=e.units,n=Object(ye.a)(e,["units"]),r=ln(t);return Object(u.createElement)(h.__experimentalUnitControl,Object(l.a)({units:r},n))}function ln(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.filter((function(t){return e.includes(t.value)}))}(fe("spacing.units")||[],e);return 0!==t.length&&t}function sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sn(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dn(e){var t,n=e.name,r=e.attributes.style,o=e.setAttributes,i=ln();return function(e){var t=Object(c.getBlockSupport)(e,"spacing");return t&&!1!==t.padding}(n)?u.Platform.select({web:Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:function(e){var t=un(un({},r),{},{spacing:{padding:e}});o({style:je(t)})},onChangeShowVisualizer:function(e){var t=un(un({},r),{},{visualizers:{padding:e}});o({style:je(t)})},label:Object(g.__)("Padding"),units:i})),native:null}):null}function bn(e){var t=e.children,n=Object(ye.a)(e,["children"]);return fe("spacing.customPadding")?Object(u.createElement)($e,n,Object(u.createElement)(h.PanelBody,{title:Object(g.__)("Spacing")},t)):null}function fn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mn=[].concat(Object(re.a)(rn),["color","spacing"]),vn=function(e){return mn.some((function(t){return Object(c.hasBlockSupport)(e,t)}))};function On(e){if(Object(f.startsWith)(e,"var:")){var t=e.slice("var:".length).split("|").join("--");return"var(--wp--".concat(t,")")}return e}function gn(e,t,n){if(!vn(t))return e;var r=n.style;return e.style=pn(pn({},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return Object.entries(c.__EXPERIMENTAL_STYLE_PROPERTY).forEach((function(n){var r=Object(ce.a)(n),o=r[0],c=r.slice(1),i=Object(oe.a)(c,1)[0];Object(f.has)(e,i)&&(t[o]=On(Object(f.get)(e,i)))})),t}(r)),e.style),e}var hn=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Object(c.hasBlockSupport)(n,"spacing");return[Object(u.createElement)(on,Object(l.a)({key:"typography"},t)),Object(u.createElement)(st,Object(l.a)({key:"colors"},t)),Object(u.createElement)(e,Object(l.a)({key:"edit"},t)),r&&Object(u.createElement)(bn,{key:"spacing"},Object(u.createElement)(dn,t))]}}),"withToolbarControls");Object(m.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return vn(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(m.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",gn),Object(m.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!vn(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),gn(r,e,n)},e})),Object(m.addFilter)("editor.BlockEdit","core/style/with-block-controls",hn);var jn=n(23),yn=n(24),kn=n(19),_n=n(26),En=n(27),wn=n(20);function Cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var In=[],xn=function(e){return Object(p.createHigherOrderComponent)((function(t){return function(n){return Object(u.createElement)(t,Object(l.a)({},n,{colors:e}))}}),"withCustomColorPalette")},Bn=function(){return Object(p.createHigherOrderComponent)((function(e){return function(t){var n=fe("color.palette")||In;return Object(u.createElement)(e,Object(l.a)({},t,{colors:n}))}}),"withEditorColorPalette")};function Pn(e,t){var n=Object(f.reduce)(e,(function(e,t){return Sn(Sn({},e),Object(f.isString)(t)?Object(s.a)({},t,Object(f.kebabCase)(t)):t)}),{});return Object(p.compose)([t,function(e){return function(t){Object(_n.a)(i,t);var r,o,c=(r=i,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(wn.a)(r);if(o){var n=Object(wn.a)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Object(En.a)(this,e)});function i(e){var t;return Object(jn.a)(this,i),(t=c.call(this,e)).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(kn.a)(t))},t.state={},t}return Object(yn.a)(i,[{key:"getMostReadableColor",value:function(e){return function(e,t){return ae.a.mostReadable(t,Object(f.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(f.reduce)(n,(function(t,n,r){var o=Object(f.upperFirst)(r),c="custom".concat(o);return t["set".concat(o)]=e.createSetColor(r,c),t}),{})}},{key:"createSetColor",value:function(e,t){var n=this;return function(r){var o,c=se(n.props.colors,r);n.props.setAttributes((o={},Object(s.a)(o,e,c&&c.slug?c.slug:void 0),Object(s.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(u.createElement)(e,Sn(Sn(Sn(Sn({},this.props),{},{colors:void 0},this.state),this.setters),{},{colorUtils:this.colorUtils}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.attributes,o=e.colors;return Object(f.reduce)(n,(function(e,n,c){var i=le(o,r[c],r["custom".concat(Object(f.upperFirst)(c))]),a=t[c];return(null==a?void 0:a.color)===i.color&&a?e[c]=a:e[c]=Sn(Sn({},i),{},{class:ue(n,i.slug)}),e}),{})}}]),i}(u.Component)}])}function Tn(e){return function(){for(var t=xn(e),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Object(p.createHigherOrderComponent)(Pn(r,t),"withCustomColors")}}function Nn(){for(var e=Bn(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Object(p.createHigherOrderComponent)(Pn(n,e),"withColors")}var Dn=n(70),Rn=n.n(Dn);function An(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?An(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):An(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ln=function(e){var t=e.colorSettings,n=Object(ye.a)(e,["colorSettings"]),r=t.map((function(e){var t=e.value,n=e.onChange;return Mn(Mn({},Object(ye.a)(e,["value","onChange"])),{},{colorValue:t,onColorChange:n})}));return Object(u.createElement)(Fe,Object(l.a)({settings:r,gradients:[],disableCustomGradients:!0},n))},Fn=function(e,t,n){return"function"==typeof e?e(t):!0===e?n:e};function Vn(e){var t=e.title,n=e.colorSettings,r=e.colorPanelProps,o=e.contrastCheckers,c=e.detectedBackgroundColor,i=e.detectedColor,a=e.panelChildren,s=e.initialOpen;return Object(u.createElement)(Ln,Object(l.a)({title:t,initialOpen:s,colorSettings:Object.values(n)},r),o&&(Array.isArray(o)?o.map((function(e){var t=e.backgroundColor,r=e.textColor,o=Object(ye.a)(e,["backgroundColor","textColor"]);return t=Fn(t,n,c),r=Fn(r,n,i),Object(u.createElement)(ze,Object(l.a)({key:"".concat(t,"-").concat(r),backgroundColor:t,textColor:r},o))})):Object(f.map)(n,(function(e){var t=e.value,r=o.backgroundColor,a=o.textColor;return r=Fn(r||t,n,c),a=Fn(a||t,n,i),Object(u.createElement)(ze,Object(l.a)({},o,{key:"".concat(r,"-").concat(a),backgroundColor:r,textColor:a}))}))),"function"==typeof a?a(n):a)}function Hn(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return zn(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zn(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function zn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Un(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Un(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Wn(e){return e.ownerDocument.defaultView.getComputedStyle(e)}var Kn=[],qn={textColor:Object(g.__)("Text Color"),backgroundColor:Object(g.__)("Background Color")},$n=function(e){return Object(u.createElement)($e,null,Object(u.createElement)(Vn,e))};function Yn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(g.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(g.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,a=t.colorDetector,l=(a=void 0===a?{}:a).targetRef,d=a.backgroundColorTargetRef,p=void 0===d?l:d,m=a.textColorTargetRef,O=void 0===m?l:m,h=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],j=Object(U.b)(),y=j.clientId,k=fe("color.palette")||Kn,_=Object(v.useSelect)((function(e){return{attributes:(0,e("core/block-editor").getBlockAttributes)(y)}}),[y]),E=_.attributes,w=Object(v.useDispatch)("core/block-editor"),C=w.updateBlockAttributes,S=Object(u.useCallback)((function(e){return C(y,e)}),[C,y]),I=Object(u.useMemo)((function(){return Rn()((function(e,t,n,r,o,c){return function(i){var a,l=i.children,d=i.className,p=void 0===d?"":d,m=i.style,v=void 0===m?{}:m,O={};r?O=Object(s.a)({},t,o):c&&(O=Object(s.a)({},t,c));var g={className:b()(p,(a={},Object(s.a)(a,"has-".concat(Object(f.kebabCase)(r),"-").concat(Object(f.kebabCase)(t)),r),Object(s.a)(a,n||"has-".concat(Object(f.kebabCase)(e)),r||c),a)),style:Gn(Gn({},O),v)};return Object(f.isFunction)(l)?l(g):u.Children.map(l,(function(e){return Object(u.cloneElement)(e,{className:b()(e.props.className,g.className),style:Gn(Gn({},g.style),e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),x=Object(u.useMemo)((function(){return Rn()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));S(Object(s.a)({},r?Object(f.camelCase)("custom ".concat(e)):e,void 0)),S(Object(s.a)({},r?e:Object(f.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[S,e.length]),B=Object(u.useState)(),P=Object(oe.a)(B,2),T=P[0],N=P[1],D=Object(u.useState)(),R=Object(oe.a)(D,2),A=R[0],M=R[1];return Object(u.useEffect)((function(){if(c){var e,t=!1,n=!1,r=Hn(Object(f.castArray)(c));try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.backgroundColor,a=o.textColor;if(t||(t=!0===i),n||(n=!0===a),t&&n)break}}catch(e){r.e(e)}finally{r.f()}if(n&&M(Wn(O.current).color),t){for(var l=p.current,s=Wn(l).backgroundColor;"rgba(0, 0, 0, 0)"===s&&l.parentNode&&l.parentNode.nodeType===l.parentNode.ELEMENT_NODE;)s=Wn(l=l.parentNode).backgroundColor;N(s)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(E[t.name]," | ").concat(E[Object(f.camelCase)("custom ".concat(t.name))])}),"")].concat(Object(re.a)(h))),Object(u.useMemo)((function(){var t={},n=e.reduce((function(e,n){"string"==typeof n&&(n={name:n});var r=Gn(Gn({},n),{},{color:E[n.name]}),o=r.name,c=r.property,i=void 0===c?o:c,a=r.className,l=r.panelLabel,s=void 0===l?n.label||qn[o]||Object(f.startCase)(o):l,u=r.componentName,d=void 0===u?Object(f.startCase)(o).replace(/\s/g,""):u,b=r.color,p=void 0===b?n.color:b,m=r.colors,v=void 0===m?k:m,O=E[Object(f.camelCase)("custom ".concat(o))],g=O?void 0:v.find((function(e){return e.slug===p}));return e[d]=I(o,i,a,p,g&&g.color,O),e[d].displayName=d,e[d].color=O||g&&g.color,e[d].slug=p,e[d].setColor=x(o,v),t[d]={value:g?g.color:E[Object(f.camelCase)("custom ".concat(o))],onChange:e[d].setColor,label:s,colors:v},v||delete t[d].colors,e}),{}),a={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:T,detectedColor:A,panelChildren:i};return Gn(Gn({},n),{},{ColorPanel:Object(u.createElement)(Vn,a),InspectorControlsColorPanel:Object(u.createElement)($n,a)})}),[E,S,A,T].concat(Object(re.a)(h)))}function Xn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xn(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(wn.a)(e);if(t){var o=Object(wn.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(En.a)(this,n)}}var Jn=[],er=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(f.reduce)(t,(function(e,t){return e[t]="custom".concat(Object(f.upperFirst)(t)),e}),{});return Object(p.createHigherOrderComponent)(Object(p.compose)([Object(p.createHigherOrderComponent)((function(e){return function(t){var n=fe("typography.fontSizes")||Jn;return Object(u.createElement)(e,Object(l.a)({},t,{fontSizes:n}))}}),"withFontSizes"),function(e){return function(t){Object(_n.a)(o,t);var n=Zn(o);function o(e){var t;return Object(jn.a)(this,o),(t=n.call(this,e)).setters=t.createSetters(),t.state={},t}return Object(yn.a)(o,[{key:"createSetters",value:function(){var e=this;return Object(f.reduce)(r,(function(t,n,r){var o=Object(f.upperFirst)(r);return t["set".concat(o)]=e.createSetFontSize(r,n),t}),{})}},{key:"createSetFontSize",value:function(e,t){var n=this;return function(r){var o,c=Object(f.find)(n.props.fontSizes,{size:Number(r)});n.props.setAttributes((o={},Object(s.a)(o,e,c&&c.slug?c.slug:void 0),Object(s.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(u.createElement)(e,Qn(Qn(Qn({},this.props),{},{fontSizes:void 0},this.state),this.setters))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.attributes,o=e.fontSizes,c=function(e,r){return!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e])};if(!Object(f.some)(r,c))return null;var i=Object(f.reduce)(Object(f.pickBy)(r,c),(function(e,t,r){var c=n[r],i=qt(o,c,n[t]);return e[r]=Qn(Qn({},i),{},{class:Yt(c)}),e}),{});return Qn(Qn({},t),i)}}]),o}(u.Component)}]),"withFontSizes")},tr=n(291),nr=n(292),rr=n(293);function or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?or(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ir=[{icon:tr.a,title:Object(g.__)("Align text left"),align:"left"},{icon:nr.a,title:Object(g.__)("Align text center"),align:"center"},{icon:rr.a,title:Object(g.__)("Align text right"),align:"right"}],ar={position:"bottom right",isAlternate:!0},lr=function(e){var t=e.value,n=e.onChange,r=e.alignmentControls,o=void 0===r?ir:r,c=e.label,i=void 0===c?Object(g.__)("Change text alignment"):c,a=e.isCollapsed,l=void 0===a||a,s=e.isRTL;function d(e){return function(){return n(t===e?void 0:e)}}var b=Object(f.find)(o,(function(e){return e.align===t}));return Object(u.createElement)(h.ToolbarGroup,{isCollapsed:l,icon:b?b.icon:s?rr.a:tr.a,label:i,popoverProps:ar,controls:o.map((function(e){var n=e.align,r=t===n;return cr(cr({},e),{},{isActive:r,role:l?"menuitemradio":void 0,onClick:d(n)})}))})},sr=function(e){return e.name||""},ur=function(e){return e.title},dr=function(e){return e.keywords||[]},br=function(e){return e.category},fr=function(){return null};function pr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(e=(e=Object(f.deburr)(e)).replace(/^\//,"")).toLowerCase()}var mr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(f.words)(pr(e))},vr=function(e,t){return Object(f.differenceWith)(e,mr(t),(function(e,t){return t.includes(e)}))},Or=function(e,t,n,r){return 0===mr(r).length?e:gr(e,r,{getCategory:function(e){var n;return null===(n=Object(f.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:function(e){var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title},getVariations:function(e){var t=e.variations,n=void 0===t?[]:t;return Array.from(n.reduce((function(e,t){var n=t.title,r=t.keywords,o=void 0===r?[]:r;return e.add(n),o.forEach((function(t){return e.add(t)})),e}),new Set))}})},gr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=mr(t);if(0===r.length)return e;var o=e.map((function(e){return[e,hr(e,t,n)]})).filter((function(e){return Object(oe.a)(e,2)[1]>0}));return o.sort((function(e,t){var n=Object(oe.a)(e,2)[1];return Object(oe.a)(t,2)[1]-n})),o.map((function(e){return Object(oe.a)(e,1)[0]}))};function hr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getName,o=void 0===r?sr:r,c=n.getTitle,i=void 0===c?ur:c,a=n.getKeywords,l=void 0===a?dr:a,s=n.getCategory,u=void 0===s?br:s,d=n.getCollection,b=void 0===d?fr:d,p=o(e),m=i(e),v=l(e),O=u(e),g=b(e),h=pr(t),j=pr(m),y=0;if(h===j)y+=30;else if(j.startsWith(h))y+=20;else{var k=[p,m].concat(Object(re.a)(v),[O,g]).join(" "),_=Object(f.words)(h),E=vr(_,k);0===E.length&&(y+=10)}return 0!==y&&p.startsWith("core/")&&y++,y}var jr=function(e,t){var n=Object(v.useSelect)((function(t){var n=t("core/block-editor").getInserterItems,r=t("core/blocks"),o=r.getCategories,c=r.getCollections;return{categories:o(),collections:c(),items:n(e)}}),[e]),r=n.categories,o=n.collections;return[n.items,r,o,function(e){var n=e.name,r=e.initialAttributes,o=e.innerBlocks,i=Object(c.createBlock)(n,r,Object(c.createBlocksFromInnerBlocksTemplate)(o));t(i)}]},yr=n(162);function kr(e){var t,n=e.icon,r=e.showColors,o=void 0!==r&&r,c=e.className;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:yr.a});var i=Object(u.createElement)(h.Icon,{icon:n&&n.src?n.src:n}),a=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return Object(u.createElement)("span",{style:a,className:b()("block-editor-block-icon",c,{"has-colors":o})},i)}var _r={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems:function(e){var t=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getBlockName,o=t.getBlockInsertionPoint,c=n();return{selectedBlockName:c?r(c):null,rootClientId:o().rootClientId}}),[]),n=t.rootClientId,r=t.selectedBlockName,o=jr(n,f.noop),c=Object(oe.a)(o,3),i=c[0],a=c[1],l=c[2],s=Object(u.useMemo)((function(){return(e.trim()?Or(i,a,l,e):Object(f.orderBy)(i,["frecency"],["desc"])).filter((function(e){return e.name!==r})).slice(0,9)}),[e,r,i,a,l]);return[Object(u.useMemo)((function(){return s.map((function(e){var t=e.title,n=e.icon,r=e.isDisabled;return{key:"block-".concat(e.id),value:e,label:Object(u.createElement)(u.Fragment,null,Object(u.createElement)(kr,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))}),[s])]},allowContext:function(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes,r=e.innerBlocks;return{action:"replace",value:Object(c.createBlock)(t,n,Object(c.createBlocksFromInnerBlocksTemplate)(r))}}},Er=[],wr=function(e){var t=Object(U.b)().name,n=e.completers,r=void 0===n?Er:n;return r=Object(u.useMemo)((function(){var e=r;return t===Object(c.getDefaultBlockName)()&&(e=e.concat([_r])),Object(m.hasFilter)("editor.Autocomplete.completers")&&(e===r&&(e=e.map(f.clone)),e=Object(m.applyFilters)("editor.Autocomplete.completers",e,t)),e}),[r,t]),Object(u.createElement)(h.Autocomplete,Object(l.a)({},e,{completers:r}))},Cr=function(e){var t=e.label,n=void 0===t?Object(g.__)("Change matrix alignment"):t,r=e.onChange,o=void 0===r?f.noop:r,c=e.value,i=void 0===c?"center":c,a=Object(u.createElement)(h.__experimentalAlignmentMatrixControl.Icon,{value:i}),l="block-editor-block-alignment-matrix-toolbar",s="".concat(l,"__popover");return Object(u.createElement)(h.Dropdown,{position:"bottom right",className:l,popoverProps:{className:s,isAlternate:!0},renderToggle:function(e){var t=e.onToggle,r=e.isOpen;return Object(u.createElement)(h.ToolbarGroup,null,Object(u.createElement)(h.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":r,onKeyDown:function(e){r||e.keyCode!==xt.DOWN||(e.preventDefault(),e.stopPropagation(),t())},label:n,icon:a,showTooltip:!0}))},renderContent:function(){return Object(u.createElement)(h.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:o,value:i})}})};function Sr(e){var t=e.clientId,n=Object(v.useSelect)((function(e){if(!t)return{};var n=e("core/block-editor"),r=n.getBlockName;return{attributes:(0,n.getBlockAttributes)(t),name:r(t)}}),[t]),r=n.attributes,o=n.name;if(!o)return null;var i=Object(c.getBlockType)(o);if(!i)return null;var a=i.title,l=Object(c.__experimentalGetBlockLabel)(i,r);return l!==a?"".concat(a,": ").concat(Object(f.truncate)(l,{length:15})):a}var Ir=function(){var e=Object(v.useDispatch)("core/block-editor"),t=e.selectBlock,n=e.clearSelectedBlock,r=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectionStart,r=t.getSelectedBlockClientId,o=t.getBlockParents,c=r();return{parents:o(c),clientId:c,hasSelection:!!n().clientId}}),[]),o=r.clientId,c=r.parents,i=r.hasSelection;return Object(u.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":Object(g.__)("Block breadcrumb")},Object(u.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&Object(u.createElement)(h.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:n},Object(g.__)("Document")),!i&&Object(g.__)("Document")),c.map((function(e){return Object(u.createElement)("li",{key:e},Object(u.createElement)(h.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:function(){return t(e)}},Object(u.createElement)(Sr,{clientId:e})))})),!!o&&Object(u.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},Object(u.createElement)(Sr,{clientId:o})))};function xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pr=Object(u.createContext)({});function Tr(e){var t=e.value,n=e.children,r=Object(u.useContext)(Pr),o=Object(u.useMemo)((function(){return Br(Br({},r),t)}),[r,t]);return Object(u.createElement)(Pr.Provider,{value:o,children:n})}var Nr=Pr,Dr=function(){return Object(u.createElement)(h.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(u.createElement)(h.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"}))},Rr=function(e){var t=e.style,n=e.className;return Object(u.createElement)("div",{className:"block-library-colors-selector__icon-container"},Object(u.createElement)("div",{className:"".concat(n," block-library-colors-selector__state-selection"),style:t},Object(u.createElement)(Dr,null)))},Ar=function(e){var t,n,r,o=e.children,c=Object(ye.a)(e,["children"]);return Object(u.createElement)(h.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:(t=c,n=t.TextColor,r=t.BackgroundColor,function(e){var t=e.onToggle,o=e.isOpen;return Object(u.createElement)(h.ToolbarGroup,null,Object(u.createElement)(h.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:Object(g.__)("Open Colors Selector"),onClick:t,onKeyDown:function(e){o||e.keyCode!==xt.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(u.createElement)(r,null,Object(u.createElement)(n,null,Object(u.createElement)(Rr,null)))}))}),renderContent:function(){return o}})},Mr={},Lr=Object(h.withFilters)("editor.BlockEdit")((function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(c.getBlockType)(r),i=Object(u.useContext)(Nr),a=Object(u.useMemo)((function(){return o&&o.usesContext?Object(f.pick)(i,o.usesContext):Mr}),[o,i]);if(!o)return null;var s=o.edit||o.save;if(o.apiVersion>1||Object(c.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(u.createElement)(s,Object(l.a)({},e,{context:a}));var d=Object(c.hasBlockSupport)(o,"className",!0)?Object(c.getBlockDefaultClassName)(r):null,p=b()(d,n.className);return Object(u.createElement)(s,Object(l.a)({},e,{context:a,className:p}))}));function Fr(e){var t={name:e.name,isSelected:e.isSelected,clientId:e.clientId,onFocus:e.onFocus,onCaretVerticalPositionChange:e.onCaretVerticalPositionChange};return Object(u.createElement)(U.a,{value:Object(u.useMemo)((function(){return t}),Object.values(t))},Object(u.createElement)(Lr,e))}var Vr=Object(h.createSlotFill)("BlockFormatControls"),Hr=Vr.Fill,zr=Vr.Slot,Ur=function(e){return Object(U.b)().isSelected?Object(u.createElement)(Hr,null,(function(t){var n=Object(f.isEmpty)(t)?null:t;return Object(u.createElement)(h.__experimentalToolbarContext.Provider,{value:n},e.children)})):null};Ur.Slot=function(e){var t=Object(u.useContext)(h.__experimentalToolbarContext);return Object(u.createElement)(zr,Object(l.a)({},e,{fillProps:t}))};var Gr=Ur,Wr=n(17),Kr=n.n(Wr),qr=n(37),$r=n(219),Yr=n(122),Xr=n(30),Qr=function(e){return e+1},Zr=function(e){return{top:e.offsetTop,left:e.offsetLeft}},Jr=function(e,t,n,r,o){var c=Object(p.useReducedMotion)()||!r,i=Object(u.useReducer)(Qr,0),a=Object(oe.a)(i,2),l=a[0],s=a[1],d=Object(u.useReducer)(Qr,0),b=Object(oe.a)(d,2),f=b[0],m=b[1],v=Object(u.useState)({x:0,y:0}),O=Object(oe.a)(v,2),g=O[0],h=O[1],j=Object(u.useMemo)((function(){return e.current?Zr(e.current):null}),[o]),y=Object(u.useMemo)((function(){if(!n||!e.current)return function(){};var t=Object(Xr.getScrollContainer)(e.current);if(!t)return function(){};var r=e.current.getBoundingClientRect();return function(){var n=e.current.getBoundingClientRect().top-r.top;n&&(t.scrollTop+=n)}}),[o,n]);function k(n){var r=n.x,o=n.y;r=Math.round(r),o=Math.round(o),r===k.x&&o===k.y||(function(n){var r=n.x,o=n.y;if(e.current){var c=0===r&&0===o;e.current.style.transformOrigin=c?"":"center",e.current.style.transform=c?"":"translate3d(".concat(r,"px,").concat(o,"px,0)"),e.current.style.zIndex=!t||c?"":"1",y()}}({x:r,y:o}),k.x=r,k.y=o)}Object(u.useLayoutEffect)((function(){l&&m()}),[l]),Object(u.useLayoutEffect)((function(){if(j)if(c)y();else{e.current.style.transform="";var t=Zr(e.current);s(),h({x:Math.round(j.left-t.left),y:Math.round(j.top-t.top)})}}),[o]),k.x=0,k.y=0,Object(Yr.useSpring)({from:{x:g.x,y:g.y},to:{x:0,y:0},reset:l!==f,config:{mass:5,tension:2e3,friction:200},immediate:c,onFrame:k})},eo=Object(Yr.animated)(h.__experimentalTreeGridRow);function to(e){var t=e.isSelected,n=e.position,r=e.level,o=e.rowCount,c=e.children,i=e.className,a=e.path,s=Object(ye.a)(e,["isSelected","position","level","rowCount","children","className","path"]),d=Object(u.useRef)(null),f=a.join("_"),p=Jr(d,t,!1,!0,f);return Object(u.createElement)(eo,Object(l.a)({ref:d,style:p,className:b()("block-editor-block-navigation-leaf",i),level:r,positionInSet:n,setSize:o},s),c)}var no=n(216),ro=n(217),oo=n(218),co=n(192);var io=function(e,t,n){return"up"===e?"horizontal"===t?n?no.a:ro.a:oo.a:"down"===e?"horizontal"===t?n?ro.a:no.a:co.a:null},ao=function(e,t,n){return"up"===e?"horizontal"===t?n?Object(g.__)("Move right"):Object(g.__)("Move left"):Object(g.__)("Move up"):"down"===e?"horizontal"===t?n?Object(g.__)("Move left"):Object(g.__)("Move right"):Object(g.__)("Move down"):null},lo=Object(u.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,i=Object(ye.a)(e,["clientIds","direction","orientation"]),a=Object(p.useInstanceId)(lo),s=Object(f.castArray)(n).length,d=Object(v.useSelect)((function(e){var t=e("core/block-editor"),i=t.getBlockIndex,a=t.getBlockRootClientId,l=t.getBlockOrder,s=t.getBlock,u=t.getSettings,d=t.getBlockListSettings,b=Object(f.castArray)(n),p=Object(f.first)(b),m=a(p),v=i(p,m),O=i(Object(f.last)(b),m),g=l(m),h=s(p),j=0===v,y=O===g.length-1,k=(d(m)||{}).orientation;return{blockType:h?Object(c.getBlockType)(h.name):null,isDisabled:"up"===r?j:y,rootClientId:m,firstIndex:v,isFirst:j,isLast:y,isRTL:u().isRTL,orientation:o||k}}),[n,r]),m=d.blockType,O=d.isDisabled,j=d.rootClientId,y=d.isFirst,k=d.isLast,_=d.firstIndex,E=d.isRTL,w=d.orientation,C=void 0===w?"vertical":w,S=Object(v.useDispatch)("core/block-editor"),I=S.moveBlocksDown,x=S.moveBlocksUp,B="up"===r?x:I,P="block-editor-block-mover-button__description-".concat(a);return Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.Button,Object(l.a)({ref:t,className:b()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:io(r,C,E),label:ao(r,C,E),"aria-describedby":P},i,{onClick:O?null:function(e){B(n,j),i.onClick&&i.onClick(e)},"aria-disabled":O})),Object(u.createElement)("span",{id:P,className:"block-editor-block-mover-button__description"},function(e,t,n,r,o,c,i,a){var l=n+1,s=function(e){return"up"===e?"horizontal"===i?a?"right":"left":"up":"down"===e?"horizontal"===i?a?"left":"right":"down":null};if(e>1)return function(e,t,n,r,o){var c=t+1;return o<0&&n?Object(g.__)("Blocks cannot be moved up as they are already at the top"):o>0&&r?Object(g.__)("Blocks cannot be moved down as they are already at the bottom"):o<0&&!n?Object(g.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
8 |
-
|
9 |
-
Object(g._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,c):void 0}(e,n,r,o,c);if(r&&o)return Object(g.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
|
10 |
-
Object(
|
11 |
-
Object(
|
12 |
-
Object(
|
13 |
-
Object(
|
14 |
-
Object(
|
15 |
-
Object(
|
16 |
-
Object(
|
17 |
-
Object(
|
18 |
-
Object(
|
19 |
-
Object(
|
20 |
-
Object(
|
21 |
-
Object(
|
22 |
-
Object(
|
|
|
|
|
23 |
// translators: Button to fix block content
|
24 |
-
title:Object(
|
25 |
-
Object(g.__)("Resolve Block"),onRequestClose:p,className:"block-editor-block-compare"},Object(u.createElement)(ho,{block:i,onKeep:t,onConvert:n,convertor:jo,convertButtonText:Object(g.__)("Convert to Blocks")})))})),ko=Object(u.createElement)(vo,{className:"block-editor-block-list__block-crash-warning"},Object(g.__)("This block has encountered an error and cannot be previewed.")),_o=function(){return ko};var Eo=function(e){Object(_n.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(wn.a)(t);if(n){var o=Object(wn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(En.a)(this,e)});function o(){var e;return Object(jn.a)(this,o),(e=r.apply(this,arguments)).state={hasError:!1},e}return Object(yn.a)(o,[{key:"componentDidCatch",value:function(e){this.props.onError(e),this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),o}(u.Component),wo=n(103),Co=n.n(wo),So=function(e){var t=e.clientId,n=Object(u.useState)(""),r=Object(oe.a)(n,2),o=r[0],i=r[1],a=Object(v.useSelect)((function(e){return e("core/block-editor").getBlock(t)}),[t]),l=Object(v.useDispatch)("core/block-editor").updateBlock;return Object(u.useEffect)((function(){i(Object(c.getBlockContent)(a))}),[a]),Object(u.createElement)(Co.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(c.getBlockType)(a.name),n=Object(c.getBlockAttributes)(e,o,a.attributes),r=o||Object(c.getSaveContent)(e,n),s=!o||Object(c.isValidBlockContent)(e,n,r);l(t,{attributes:n,originalContent:r,isValid:s}),o||i({content:r})},onChange:function(e){return i(e.target.value)}})},Io=n(34),xo=n.n(Io);function Bo(e,t){for(var n="start"===t?"firstChild":"lastChild",r="start"===t?"nextSibling":"previousSibling";e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[r];)e=e[r];return e}function Po(e){var t=e("core/block-editor"),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.getMultiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.getSelectedBlockClientId;return{isSelectionEnabled:n(),isMultiSelecting:r(),multiSelectedBlockClientIds:o(),hasMultiSelection:c(),getBlockParents:i,selectedBlockClientId:a()}}function To(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((function(e){t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}var No=n(163),Do=[Object(u.createInterpolateElement)(Object(g.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(u.createElement)("kbd",null)}),Object(u.createInterpolateElement)(Object(g.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(u.createElement)("kbd",null)}),Object(u.createInterpolateElement)(Object(g.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(u.createElement)("kbd",null)}),Object(g.__)("Drag files into the editor to automatically insert media blocks."),Object(g.__)("Change a block's type by pressing the block icon on the toolbar.")],Ro=function(){var e=Object(u.useState)(Math.floor(Math.random()*Do.length)),t=Object(oe.a)(e,1)[0];return Object(u.createElement)(h.Tip,null,Do[t])},Ao=n(134),Mo=n(133),Lo=n(211),Fo=function e(t){var n=t.className,r=t.onChange,o=t.value,c=t.placeholder,i=Object(p.useInstanceId)(e),a=Object(u.useRef)();return Object(u.createElement)("div",{className:b()("block-editor-inserter__search",n)},Object(u.createElement)(h.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(i)},c),Object(u.createElement)("input",{ref:a,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(i),type:"search",placeholder:c,autoFocus:!0,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(u.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(u.createElement)(h.Button,{icon:Ao.a,label:Object(g.__)("Reset search"),onClick:function(){r(""),a.current.focus()}}),!o&&Object(u.createElement)(Mo.a,{icon:Lo.a})))},Vo=function(e){var t=e.blockType,n=t.icon,r=t.title,o=t.description;return Object(u.createElement)("div",{className:"block-editor-block-card"},Object(u.createElement)(kr,{icon:n,showColors:!0}),Object(u.createElement)("div",{className:"block-editor-block-card__content"},Object(u.createElement)("h2",{className:"block-editor-block-card__title"},r),Object(u.createElement)("span",{className:"block-editor-block-card__description"},o)))},Ho={insertUsage:{}},zo={alignWide:!1,colors:[{name:Object(g.__)("Black"),slug:"black",color:"#000000"},{name:Object(g.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(g.__)("White"),slug:"white",color:"#ffffff"},{name:Object(g.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(g.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(g.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(g.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(g.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(g.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(g.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(g.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(g.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(g._x)("Small","font size name"),size:13,slug:"small"},{name:Object(g._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(g._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(g._x)("Large","font size name"),size:36,slug:"large"},{name:Object(g._x)("Huge","font size name"),size:42,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(g.__)("Thumbnail")},{slug:"medium",name:Object(g.__)("Medium")},{slug:"large",name:Object(g.__)("Large")},{slug:"full",name:Object(g.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,availableLegacyWidgets:{},__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:Object(g.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:Object(g.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:Object(g.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:Object(g.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:Object(g.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:Object(g.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:Object(g.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(g.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:Object(g.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:Object(g.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:Object(g.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(g.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function Uo(e,t,n){return[].concat(Object(re.a)(e.slice(0,n)),Object(re.a)(Object(f.castArray)(t)),Object(re.a)(e.slice(n)))}function Go(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(re.a)(e);return o.splice(t,r),Uo(o,e.slice(t,t+r),n)}function Wo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ko(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wo(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(s.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,qo(o,r))})),n}function $o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(s.a)({},n.clientId,t),$o(n.innerBlocks,n.clientId))}),{})}function Yo(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.identity,n={},r=Object(re.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(ye.a)(o,["innerBlocks"]);r.push.apply(r,Object(re.a)(c)),n[i.clientId]=t(i)}return n}function Xo(e){return Yo(e,(function(e){return Object(f.omit)(e,"attributes")}))}function Qo(e){return Yo(e,(function(e){return e.attributes}))}function Zo(e,t){return e===t?Ko({},e):t}function Jo(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(f.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(f.isEqual)(Object(f.keys)(n),Object(f.keys)(r)));var n,r}var ec=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})},tc=Object(f.flow)(v.combineReducers,(function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var r=n.id,o=n.updatedId;if(r===o)return t;(t=Ko({},t)).attributes=Object(f.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?Ko(Ko({},e),{},{ref:o}):e}))}return e(t,n)}}),(function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=e(t,n);if(r===t)return t;r.cache=t.cache?t.cache:{};var o=function(e){return e.reduce((function(e,n){var r=n;do{e.push(r),r=t.parents[r]}while(r&&!t.controlledInnerBlocks[r]);return e}),[])};switch(n.type){case"RESET_BLOCKS":r.cache=Object(f.mapValues)(Yo(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(f.keys)(Yo(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=Ko(Ko({},r.cache),ec(o(c)));break;case"UPDATE_BLOCK":r.cache=Ko(Ko({},r.cache),ec(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=Ko(Ko({},r.cache),ec(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=ec(o(n.replacedClientIds));r.cache=Ko(Ko(Ko({},Object(f.omit)(r.cache,n.replacedClientIds)),Object(f.omit)(i,n.replacedClientIds)),ec(Object(f.keys)(Yo(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=Ko(Ko({},Object(f.omit)(r.cache,n.removedClientIds)),ec(Object(f.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var a=Object(re.a)(n.clientIds);n.fromRootClientId&&a.push(n.fromRootClientId),n.toRootClientId&&a.push(n.toRootClientId),r.cache=Ko(Ko({},r.cache),ec(o(a)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var l=[];n.rootClientId&&l.push(n.rootClientId),r.cache=Ko(Ko({},r.cache),ec(o(l)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var s=Object(f.keys)(Object(f.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=Ko(Ko({},r.cache),ec(o(s)))}return r}}),(function(e){return function(t,n){var r=function(e){for(var r=e,o=0;o<r.length;o++){var c;!t.order[r[o]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=Object(re.a)(r)),(c=r).push.apply(c,Object(re.a)(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=Ko(Ko({},n),{},{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=Ko(Ko({},n),{},{type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(n.clientIds)})}return e(t,n)}}),(function(e){return function(t,n){if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);var r={};if(Object.keys(t.controlledInnerBlocks).length)for(var o=Object(re.a)(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,a=Object(ye.a)(c,["innerBlocks"]);o.push.apply(o,Object(re.a)(i)),t.controlledInnerBlocks[a.clientId]&&(r[a.clientId]=!0)}var l=t;t.order[n.rootClientId]&&(l=e(l,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));var s=l;return n.blocks.length&&((s=e(s,Ko(Ko({},n),{},{type:"INSERT_BLOCKS",index:0}))).order=Ko(Ko({},s.order),Object(f.reduce)(r,(function(e,n,r){return t.order[r]&&(e[r]=t.order[r]),e}),{}))),s}}),(function(e){return function(t,n){if(t&&"RESET_BLOCKS"===n.type){var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(f.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(Object(re.a)(n),[o],Object(re.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(f.pickBy)(t.controlledInnerBlocks));return Ko(Ko({},t),{},{byClientId:Ko(Ko({},Object(f.omit)(t.byClientId,r)),Xo(n.blocks)),attributes:Ko(Ko({},Object(f.omit)(t.attributes,r)),Qo(n.blocks)),order:Ko(Ko({},Object(f.omit)(t.order,r)),Object(f.omit)(qo(n.blocks),o)),parents:Ko(Ko({},Object(f.omit)(t.parents,r)),$o(n.blocks)),cache:Ko(Ko({},Object(f.omit)(t.cache,r)),Object(f.omit)(Object(f.mapValues)(Yo(n.blocks),(function(){return{}})),o))})}return e(t,n)}}),(function(e){var t,n=!1;return function(r,o){var c=e(r,o),i="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===c&&!i){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var l=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===l?r:Ko(Ko({},c),{},{isPersistentChange:l})}return c=Ko(Ko({},c),{},{isPersistentChange:i?!n:!Jo(o,t)}),t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,c}}),(function(e){var t=new Set(["RECEIVE_BLOCKS"]);return function(n,r){var o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}))({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return Xo(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return Ko(Ko({},e),Xo(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(f.omit)(t.updates,"attributes");return Object(f.isEmpty)(n)?e:Ko(Ko({},e),{},Object(s.a)({},t.clientId,Ko(Ko({},e[t.clientId]),n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?Ko(Ko({},Object(f.omit)(e,t.replacedClientIds)),Xo(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(f.omit)(e,t.removedClientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return Qo(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return Ko(Ko({},e),Qo(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?Ko(Ko({},e),{},Object(s.a)({},t.clientId,Ko(Ko({},e[t.clientId]),t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(t.clientIds.every((function(t){return!e[t]})))return e;var n=t.clientIds.reduce((function(n,r){return Ko(Ko({},n),{},Object(s.a)({},r,Object(f.reduce)(t.attributes,(function(t,n,o){return n!==t[o]&&((t=Zo(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:Ko(Ko({},e),n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?Ko(Ko({},Object(f.omit)(e,t.replacedClientIds)),Qo(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(f.omit)(e,t.removedClientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return qo(t.blocks);case"RECEIVE_BLOCKS":return Ko(Ko({},e),Object(f.omit)(qo(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=qo(t.blocks,r),i=t.index,a=void 0===i?o.length:i;return Ko(Ko(Ko({},e),c),{},Object(s.a)({},r,Uo(o,c[r],a)));case"MOVE_BLOCKS_TO_POSITION":var l,u=t.fromRootClientId,d=void 0===u?"":u,b=t.toRootClientId,p=void 0===b?"":b,m=t.clientIds,v=t.index,O=void 0===v?e[p].length:v;if(d===p){var g=e[p],h=g.indexOf(m[0]);return Ko(Ko({},e),{},Object(s.a)({},p,Go(e[p],h,O,m.length)))}return Ko(Ko({},e),{},(l={},Object(s.a)(l,d,f.without.apply(void 0,[e[d]].concat(Object(re.a)(m)))),Object(s.a)(l,p,Uo(e[p],m,O)),l));case"MOVE_BLOCKS_UP":var j=t.clientIds,y=t.rootClientId,k=void 0===y?"":y,_=Object(f.first)(j),E=e[k];if(!E.length||_===Object(f.first)(E))return e;var w=E.indexOf(_);return Ko(Ko({},e),{},Object(s.a)({},k,Go(E,w,w-1,j.length)));case"MOVE_BLOCKS_DOWN":var C=t.clientIds,S=t.rootClientId,I=void 0===S?"":S,x=Object(f.first)(C),B=Object(f.last)(C),P=e[I];if(!P.length||B===Object(f.last)(P))return e;var T=P.indexOf(x);return Ko(Ko({},e),{},Object(s.a)({},I,Go(P,T,T+1,C.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var N=t.clientIds;if(!t.blocks)return e;var D=qo(t.blocks);return Object(f.flow)([function(e){return Object(f.omit)(e,t.replacedClientIds)},function(e){return Ko(Ko({},e),Object(f.omit)(D,""))},function(e){return Object(f.mapValues)(e,(function(e){return Object(f.reduce)(e,(function(e,t){return t===N[0]?[].concat(Object(re.a)(e),Object(re.a)(D[""])):(-1===N.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(f.flow)([function(e){return Object(f.omit)(e,t.removedClientIds)},function(e){return Object(f.mapValues)(e,(function(e){return f.without.apply(void 0,[e].concat(Object(re.a)(t.removedClientIds)))}))}])(e)}return e},parents:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return $o(t.blocks);case"RECEIVE_BLOCKS":return Ko(Ko({},e),$o(t.blocks));case"INSERT_BLOCKS":return Ko(Ko({},e),$o(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return Ko(Ko({},e),t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Ko(Ko({},Object(f.omit)(e,t.replacedClientIds)),$o(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(f.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.clientId,o=t.hasControlledInnerBlocks;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===n?Ko(Ko({},e),{},Object(s.a)({},r,o)):e}});function nc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.clientId))return e;var n=t.indexToSelect||t.blocks.length-1,r=t.blocks[n];if(!r)return{};if(r.clientId===e.clientId)return e;var o={clientId:r.clientId};return"number"==typeof t.initialPosition&&(o.initialPosition=t.initialPosition),o}return e}function rc(e,t,n){switch(t.type){case"CLEAR_SELECTED_BLOCK":case"SELECT_BLOCK":case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":return n}return e}var oc=Object(v.combineReducers)({blocks:tc,isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selectionStart:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset};case"RESET_SELECTION":return t.selectionStart;case"MULTI_SELECT":return{clientId:t.start}}return nc(e,t)},selectionEnd:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset};case"RESET_SELECTION":return t.selectionEnd;case"MULTI_SELECT":return{clientId:t.end}}return nc(e,t)},isMultiSelecting:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(e,t){return"REPLACE_BLOCKS"===t.type&&"number"==typeof t.initialPosition||"SELECT_BLOCK"===t.type?t.initialPosition:"REMOVE_BLOCKS"===t.type||"START_TYPING"===t.type?e:void 0},blocksMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){var n=t.clientId;return Ko(Ko({},e),{},Object(s.a)({},n,e[n]&&"html"===e[n]?"visual":"html"))}return e},blockListSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(f.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(f.isEqual)(e[n],t.settings)?e:Ko(Ko({},e),{},Object(s.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(f.omit)(e,n):e}return e},insertionPoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_INSERTION_POINT":case"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r}}return rc(e,t,null)},insertionPointVisibility:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":return!0;case"HIDE_INSERTION_POINT":return!1}return rc(e,t,!1)},template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return Ko(Ko({},e),{},{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zo,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return Ko(Ko({},e),t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ho,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce((function(e,n){var r=n.name,o={name:n.name};return Object(c.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),Ko(Ko({},e),{},{insertUsage:Ko(Ko({},e.insertUsage),{},Object(s.a)({},r,{time:t.time,count:e.insertUsage[r]?e.insertUsage[r].count+1:1,insert:o}))})}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return Object(s.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return Ko(Ko({},e),{},Object(s.a)({},n,t.attributes))}),{})}return null},isNavigationMode:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":var n=t.clientId;return t.isHighlighted?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}}),cc=n(153),ic=n.n(cc),ac=n(265),lc=n.n(ac),sc=n(40);function uc(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return dc(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dc(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function dc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bc(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pc=Kr.a.mark(Ic),mc=Kr.a.mark(Rc),vc=Kr.a.mark(Ac),Oc=Kr.a.mark(Uc),gc=Kr.a.mark($c),hc=Kr.a.mark(Yc),jc=Kr.a.mark(Qc),yc=Kr.a.mark(oi),kc=Kr.a.mark(ki),_c=Kr.a.mark(_i),Ec=Kr.a.mark(Ei),wc=Kr.a.mark(wi),Cc=Kr.a.mark(Ci),Sc=Kr.a.mark(Ii);function Ic(){return Kr.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.controls.select("core/block-editor","getBlockCount");case 2:if(0!==e.sent){e.next=7;break}return e.next=6,mi();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),pc)}function xc(e){return{type:"RESET_BLOCKS",blocks:e}}function Bc(e,t){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t}}function Pc(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Tc(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(f.castArray)(e),attributes:t}}function Nc(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Dc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Rc(e){var t;return Kr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,v.controls.select("core/block-editor","getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,Dc(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),mc)}function Ac(e){var t;return Kr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,v.controls.select("core/block-editor","getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,Dc(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),vc)}function Mc(){return{type:"START_MULTI_SELECT"}}function Lc(){return{type:"STOP_MULTI_SELECT"}}function Fc(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function Vc(){return{type:"CLEAR_SELECTED_BLOCK"}}function Hc(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function zc(e,t){var n,r,o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((function(e){var t,n=e.name;if(!Object(c.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!o[n])return e;var r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null==r?void 0:r.includes("is-style-"))return e;var i=e.attributes,a=void 0===i?{}:i,l=o[n];return fc(fc({},e),{},{attributes:fc(fc({},a),{},{className:"".concat(r||""," is-style-").concat(l).trim()})})}))}function Uc(e,t,n,r,o){var c,i,a;return Kr.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return e=Object(f.castArray)(e),l.t0=zc,l.t1=Object(f.castArray)(t),l.next=5,v.controls.select("core/block-editor","getSettings");case 5:return l.t2=l.sent,t=(0,l.t0)(l.t1,l.t2),l.next=9,v.controls.select("core/block-editor","getBlockRootClientId",Object(f.first)(e));case 9:c=l.sent,i=0;case 11:if(!(i<t.length)){l.next=21;break}return a=t[i],l.next=15,v.controls.select("core/block-editor","canInsertBlockType",a.name,c);case 15:if(l.sent){l.next=18;break}return l.abrupt("return");case 18:i++,l.next=11;break;case 21:return l.next=23,{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o};case 23:return l.delegateYield(Ic(),"t3",24);case 24:case"end":return l.stop()}}),Oc)}function Gc(e,t){return Uc(e,t)}function Wc(e){return function(t,n){return{clientIds:Object(f.castArray)(t),type:e,rootClientId:n}}}var Kc=Wc("MOVE_BLOCKS_DOWN"),qc=Wc("MOVE_BLOCKS_UP");function $c(e){var t,n,r,o,c,i=arguments;return Kr.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=i.length>1&&void 0!==i[1]?i[1]:"",n=i.length>2&&void 0!==i[2]?i[2]:"",r=i.length>3?i[3]:void 0,a.next=5,v.controls.select("core/block-editor","getTemplateLock",t);case 5:if("all"!==(o=a.sent)){a.next=8;break}return a.abrupt("return");case 8:if(c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r},t!==n){a.next=13;break}return a.next=12,c;case 12:return a.abrupt("return");case 13:if("insert"!==o){a.next=15;break}return a.abrupt("return");case 15:return a.next=17,v.controls.select("core/block-editor","canInsertBlocks",e,n);case 17:if(!a.sent){a.next=21;break}return a.next=21,c;case 21:case"end":return a.stop()}}),gc)}function Yc(e){var t,n,r,o=arguments;return Kr.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=o.length>1&&void 0!==o[1]?o[1]:"",n=o.length>2&&void 0!==o[2]?o[2]:"",r=o.length>3?o[3]:void 0,c.next=5,$c([e],t,n,r);case 5:case"end":return c.stop()}}),hc)}function Xc(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Qc([e],t,n,r)}function Qc(e,t,n){var r,o,c,i,a,l,s=arguments;return Kr.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return r=!(s.length>3&&void 0!==s[3])||s[3],o=s.length>4?s[4]:void 0,u.t0=zc,u.t1=Object(f.castArray)(e),u.next=6,v.controls.select("core/block-editor","getSettings");case 6:u.t2=u.sent,e=(0,u.t0)(u.t1,u.t2),c=[],i=uc(e),u.prev=10,i.s();case 12:if((a=i.n()).done){u.next=20;break}return l=a.value,u.next=16,v.controls.select("core/block-editor","canInsertBlockType",l.name,n);case 16:u.sent&&c.push(l);case 18:u.next=12;break;case 20:u.next=25;break;case 22:u.prev=22,u.t3=u.catch(10),i.e(u.t3);case 25:return u.prev=25,i.f(),u.finish(25);case 28:if(!c.length){u.next=30;break}return u.abrupt("return",{type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,meta:o});case 30:case"end":return u.stop()}}),jc,null,[[10,22,25,28]])}function Zc(e,t){return{type:"SET_INSERTION_POINT",rootClientId:e,index:t}}function Jc(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function ei(){return{type:"HIDE_INSERTION_POINT"}}function ti(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function ni(){return{type:"SYNCHRONIZE_TEMPLATE"}}function ri(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function oi(e){var t,n,r,o,c=arguments;return Kr.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t=!(c.length>1&&void 0!==c[1])||c[1],e&&e.length){i.next=3;break}return i.abrupt("return");case 3:return e=Object(f.castArray)(e),i.next=6,v.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,v.controls.select("core/block-editor","getTemplateLock",n);case 9:if(!i.sent){i.next=12;break}return i.abrupt("return");case 12:if(!t){i.next=18;break}return i.next=15,Rc(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,v.controls.select("core/block-editor","getPreviousBlockClientId",e[0]);case 20:r=i.sent;case 21:return i.next=23,{type:"REMOVE_BLOCKS",clientIds:e};case 23:return i.delegateYield(Ic(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),yc)}function ci(e,t){return oi([e],t)}function ii(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,time:Date.now()}}function ai(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function li(){return{type:"START_TYPING"}}function si(){return{type:"STOP_TYPING"}}function ui(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function di(){return{type:"STOP_DRAGGING_BLOCKS"}}function bi(){return{type:"ENTER_FORMATTED_TEXT"}}function fi(){return{type:"EXIT_FORMATTED_TEXT"}}function pi(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function mi(e,t,n){var r=Object(c.getDefaultBlockName)();if(r)return Xc(Object(c.createBlock)(r,e),n,t)}function vi(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Oi(e){return{type:"UPDATE_SETTINGS",settings:e}}function gi(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function hi(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function ji(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function yi(){return{type:"MARK_AUTOMATIC_CHANGE"}}function ki(){var e,t=arguments;return Kr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=!(t.length>0&&void 0!==t[0])||t[0],n.next=3,{type:"SET_NAVIGATION_MODE",isNavigationMode:e};case 3:e?Object(Ve.speak)(Object(g.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):Object(Ve.speak)(Object(g.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),kc)}function _i(){var e,t=arguments;return Kr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=t.length>0&&void 0!==t[0]?t[0]:null,n.next=3,{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e};case 3:e&&Object(Ve.speak)(Object(g.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."));case 4:case"end":return n.stop()}}),_c)}function Ei(e){var t,n,r,o,i,a,l=arguments;return Kr.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(t=!(l.length>1&&void 0!==l[1])||l[1],e||e.length){s.next=3;break}return s.abrupt("return");case 3:return s.next=5,v.controls.select("core/block-editor","getBlocksByClientId",e);case 5:return n=s.sent,s.next=8,v.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 8:if(r=s.sent,!Object(f.some)(n,(function(e){return!e}))){s.next=11;break}return s.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(f.some)(o,(function(e){return!Object(c.hasBlockSupport)(e,"multiple",!0)}))){s.next=14;break}return s.abrupt("return");case 14:return s.next=16,v.controls.select("core/block-editor","getBlockIndex",Object(f.last)(Object(f.castArray)(e)),r);case 16:return i=s.sent,a=n.map((function(e){return Object(c.cloneBlock)(e)})),s.next=20,Qc(a,i+1,r,t);case 20:if(!(a.length>1&&t)){s.next=23;break}return s.next=23,Fc(Object(f.first)(a).clientId,Object(f.last)(a).clientId);case 23:return s.abrupt("return",a.map((function(e){return e.clientId})));case 24:case"end":return s.stop()}}),Ec)}function wi(e){var t,n;return Kr.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,v.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,v.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,v.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,mi({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),wc)}function Ci(e){var t,n;return Kr.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,v.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,v.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,v.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,mi({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),Cc)}function Si(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function Ii(e){return Kr.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Si(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,Si(e,!1);case 6:case"end":return t.stop()}}),Sc)}function xi(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}var Bi=n(49);function Pi(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ti(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ti(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Ti(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ni(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Di(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ni(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ni(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ri=Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(h.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(u.createElement)(h.G,null,Object(u.createElement)(h.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),Ai=[];function Mi(e,t){var n=e.blocks.byClientId[t];if("web"!==u.Platform.OS&&"core/social-link"===(null==n?void 0:n.name)){var r=e.blocks.attributes[t].service;return r?"".concat("core/social-link","-").concat(r):"core/social-link"}return n?n.name:null}function Li(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function Fi(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var Vi=Object(Bi.a)((function(e,t){var n=e.blocks.byClientId[t];return n?Di(Di({},n),{},{attributes:Fi(e,t),innerBlocks:ul(e,t)?Ai:zi(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),Hi=Object(Bi.a)((function(e,t){var n=e.blocks.byClientId[t];return n?Di(Di({},n),{},{attributes:Fi(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),zi=Object(Bi.a)((function(e,t){return Object(f.map)(_a(e,t),(function(t){return Vi(e,t)}))}),(function(e,t){return Object(f.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),Ui=Object(Bi.a)((function(e,t){var n=e.blocks.byClientId[t];return n?Di(Di({},n),{},{attributes:Fi(e,t),innerBlocks:Gi(e,t)}):null}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),Gi=Object(Bi.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(f.map)(_a(e,t),(function(t){return Ui(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),Wi=function e(t,n){return Object(f.flatMap)(n,(function(n){var r=_a(t,n);return[].concat(Object(re.a)(r),Object(re.a)(e(t,r)))}))},Ki=Object(Bi.a)((function(e){var t=_a(e);return[].concat(Object(re.a)(t),Object(re.a)(Wi(e,t)))}),(function(e){return[e.blocks.order]})),qi=Object(Bi.a)((function(e,t){var n=Ki(e);return t?Object(f.reduce)(n,(function(n,r){return e.blocks.byClientId[r].name===t?n+1:n}),0):n.length}),(function(e){return[e.blocks.order,e.blocks.byClientId]})),$i=Object(Bi.a)((function(e,t){return Object(f.map)(Object(f.castArray)(t),(function(t){return Vi(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function Yi(e,t){return _a(e,t).length}function Xi(e){return e.selectionStart}function Qi(e){return e.selectionEnd}function Zi(e){return e.selectionStart.clientId}function Ji(e){return e.selectionEnd.clientId}function ea(e){return pa(e).length||(e.selectionStart.clientId?1:0)}function ta(e){var t=e.selectionStart,n=e.selectionEnd;return!!t.clientId&&t.clientId===n.clientId}function na(e){var t=e.selectionStart,n=e.selectionEnd,r=t.clientId;return r&&r===n.clientId?r:null}function ra(e){var t=na(e);return t?Vi(e,t):null}function oa(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var ca=Object(Bi.a)((function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],o=t;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(function(e){return[e.blocks.parents]})),ia=Object(Bi.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=ca(e,t,r);return Object(f.map)(Object(f.filter)(Object(f.map)(o,(function(t){return{id:t,name:Mi(e,t)}})),(function(e){var t=e.name;return Array.isArray(n)?n.includes(t):t===n})),(function(e){return e.id}))}),(function(e){return[e.blocks.parents]}));function aa(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function la(e,t){for(var n,r=na(e),o=[].concat(Object(re.a)(ca(e,t)),[t]),c=[].concat(Object(re.a)(ca(e,r)),[r]),i=Math.min(o.length,c.length),a=0;a<i&&o[a]===c[a];a++)n=o[a];return n}function sa(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=na(e)),void 0===t&&(t=n<0?va(e):Oa(e)),!t)return null;var r=oa(e,t);if(null===r)return null;var o=e.blocks.order,c=o[r],i=c.indexOf(t),a=i+1*n;return a<0||a===c.length?null:c[a]}function ua(e,t){return sa(e,t,-1)}function da(e,t){return sa(e,t,1)}function ba(e){return e.initialPosition}var fa=Object(Bi.a)((function(e){var t=e.selectionStart,n=e.selectionEnd;if(void 0===t.clientId||void 0===n.clientId)return Ai;if(t.clientId===n.clientId)return[t.clientId];var r=oa(e,t.clientId);if(null===r)return Ai;var o=_a(e,r),c=o.indexOf(t.clientId),i=o.indexOf(n.clientId);return c>i?o.slice(i,c+1):o.slice(c,i+1)}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function pa(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?Ai:fa(e)}var ma=Object(Bi.a)((function(e){var t=pa(e);return t.length?t.map((function(t){return Vi(e,t)})):Ai}),(function(e){return[].concat(Object(re.a)(fa.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function va(e){return Object(f.first)(pa(e))||null}function Oa(e){return Object(f.last)(pa(e))||null}function ga(e,t){return va(e)===t}function ha(e,t){return-1!==pa(e).indexOf(t)}var ja=Object(Bi.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=ha(e,n=oa(e,n));return r}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function ya(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:t.clientId||null}function ka(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:n.clientId||null}function _a(e,t){return e.blocks.order[t||""]||Ai}function Ea(e,t,n){return _a(e,n).indexOf(t)}function wa(e,t){var n=e.selectionStart,r=e.selectionEnd;return n.clientId===r.clientId&&n.clientId===t}function Ca(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(f.some)(_a(e,t),(function(t){return wa(e,t)||ha(e,t)||n&&Ca(e,t,n)}))}function Sa(e,t){if(!t)return!1;var n=pa(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function Ia(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId!==n.clientId}function xa(e){return e.isMultiSelecting}function Ba(e){return e.isSelectionEnabled}function Pa(e,t){return e.blocksMode[t]||"visual"}function Ta(e){return e.isTyping}function Na(e){return!!e.draggedBlocks.length}function Da(e){return e.draggedBlocks}function Ra(e,t){return e.draggedBlocks.includes(t)}function Aa(e,t){if(!Na(e))return!1;var n=ca(e,t);return Object(f.some)(n,(function(t){return Ra(e,t)}))}function Ma(e){return e.isCaretWithinFormattedText}function La(e){var t,n,r=e.insertionPoint,o=e.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=oa(e,c)||void 0,n=Ea(e,o.clientId,t)+1):n=_a(e).length,{rootClientId:t,index:n}}function Fa(e){return e.insertionPointVisibility}function Va(e){return e.template.isValid}function Ha(e){return e.settings.template}function za(e,t){if(!t)return e.settings.templateLock;var n=Za(e,t);return n?n.templateLock:null}var Ua=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(f.isBoolean)(e)?e:Object(f.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},o=Object(c.getBlockType)(t);if(!o)return!1;var i=Ja(e),a=i.allowedBlockTypes,l=r(a,t,!0);if(!l)return!1;var s=!!za(e,n);if(s)return!1;var u=Za(e,n);if(n&&void 0===u)return!1;var d=null==u?void 0:u.allowedBlocks,b=r(d,t),p=o.parent,m=Mi(e,n),v=r(p,m);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},Ga=Object(Bi.a)(Ua,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function Wa(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return Ga(e,Mi(e,t),n)}))}function Ka(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}var qa=function(e,t,n){return!!Object(c.hasBlockSupport)(t,"inserter",!0)&&Ua(e,t.name,n)},$a=function(e){return function(t){return Di(Di({},e),{},{id:"".concat(e.id,"-").concat(t.name),icon:t.icon||e.icon,title:t.title||e.title,description:t.description||e.description,example:t.hasOwnProperty("example")?t.example:e.example,initialAttributes:Di(Di({},e.initialAttributes),t.attributes),innerBlocks:t.innerBlocks,keywords:t.keywords||e.keywords})}},Ya=Object(Bi.a)((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},o=function(t){var n=t.name,o=!1;Object(c.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(f.some)($i(e,Ki(e)),{name:t.name}));var i=Ka(e,n)||{},a=i.time,l=i.count,s=void 0===l?0:l,u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return{id:n,name:t.name,initialAttributes:{},title:t.title,description:t.description,icon:t.icon,category:t.category,keywords:t.keywords,variations:u,example:t.example,isDisabled:o,utility:1,frecency:r(a,s)}},i=function(t){var n,o="core/block/".concat(t.id),i=nl(e,t.id);1===i.length&&(n=Object(c.getBlockType)(i[0].name));var a=Ka(e,o)||{},l=a.time,s=a.count,u=r(l,void 0===s?0:s);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n?n.icon:Ri,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:u}},a=Object(c.getBlockTypes)().filter((function(t){return qa(e,t,n)})).map(o),l=Ua(e,"core/block",n)?cl(e).map(i):[],s=a.filter((function(e){var t=e.variations;return!(void 0===t?[]:t).some((function(e){return e.isDefault}))})),u=[],d=Pi(a);try{for(d.s();!(t=d.n()).done;){var b=t.value,p=b.variations,m=void 0===p?[]:p;if(m.length){var v=$a(b);u.push.apply(u,Object(re.a)(m.map(v)))}}}catch(e){d.e(e)}finally{d.f()}return[].concat(Object(re.a)(s),u,Object(re.a)(l))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,cl(e),Object(c.getBlockTypes)()]})),Xa=Object(Bi.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(f.some)(Object(c.getBlockTypes)(),(function(n){return qa(e,n,t)}));if(n)return!0;var r=Ua(e,"core/block",t)&&cl(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,cl(e),Object(c.getBlockTypes)()]})),Qa=Object(Bi.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(f.filter)(Object(c.getBlockTypes)(),(function(n){return qa(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(c.getBlockTypes)()]}));function Za(e,t){return e.blockListSettings[t]}function Ja(e){return e.settings}function el(e){return e.blocks.isPersistentChange}var tl=Object(Bi.a)((function(e,t){return Object(f.filter)(e.blockListSettings,(function(e,n){return t.includes(n)}))}),(function(e){return[e.blockListSettings]})),nl=Object(Bi.a)((function(e,t){var n=Object(f.find)(cl(e),(function(e){return e.id===t}));return n?Object(c.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null}),(function(e){return[cl(e)]}));function rl(e){return e.blocks.isIgnoredChange}function ol(e){return e.lastBlockAttributesChange}function cl(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:Ai}function il(e){return e.isNavigationMode}function al(e){return e.hasBlockMovingClientId}function ll(e){return!!e.automaticChangeStatus}function sl(e,t){return e.highlightedBlock===t}function ul(e,t){return!!e.blocks.controlledInnerBlocks[t]}var dl=Object(Bi.a)((function(e,t){if(!t.length)return null;var n=na(e);if(t.includes(Mi(e,n)))return n;var r=pa(e),o=ia(e,n||r[0],t);return o?Object(f.last)(o):null}),(function(e,t){return[e.selectionStart.clientId,e.selectionEnd.clientId,t]}));function bl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bl(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pl={MERGE_BLOCKS:function(e,t){var n=t.dispatch,r=t.getState(),o=Object(oe.a)(e.blocks,2),a=o[0],l=o[1],s=Vi(r,a),u=Object(c.getBlockType)(s.name);if(u.merge){var d=Vi(r,l),b=Object(c.getBlockType)(d.name),p=Xi(r),m=p.clientId,v=p.attributeKey,O=p.offset,g=(m===a?u:b).attributes[v],h=(m===a||m===l)&&void 0!==v&&void 0!==O&&!!g;g||("number"==typeof v?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ".concat(Object(sc.a)(v))):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));var j=Object(c.cloneBlock)(s),y=Object(c.cloneBlock)(d);if(h){var k=m===a?j:y,_=k.attributes[v],E=g.multiline,w=g.__unstableMultilineWrapperTags,C=g.__unstablePreserveWhiteSpace,S=Object(i.insert)(Object(i.create)({html:_,multilineTag:E,multilineWrapperTags:w,preserveWhiteSpace:C}),"",O,O);k.attributes[v]=Object(i.toHTMLString)({value:S,multilineTag:E,preserveWhiteSpace:C})}var I=s.name===d.name?[y]:Object(c.switchToBlockType)(y,s.name);if(I&&I.length){var x=u.merge(j.attributes,I[0].attributes);if(h){var B=Object(f.findKey)(x,(function(e){return"string"==typeof e&&-1!==e.indexOf("")})),P=x[B],T=u.attributes[B],N=T.multiline,D=T.__unstableMultilineWrapperTags,R=T.__unstablePreserveWhiteSpace,A=Object(i.create)({html:P,multilineTag:N,multilineWrapperTags:D,preserveWhiteSpace:R}),M=A.text.indexOf(""),L=Object(i.remove)(A,M,M+1),F=Object(i.toHTMLString)({value:L,multilineTag:N,preserveWhiteSpace:R});x[B]=F,n(pi(s.clientId,B,M,M))}n(Uc([s.clientId,d.clientId],[fl(fl({},s),{},{attributes:fl(fl({},s.attributes),x)})].concat(Object(re.a)(I.slice(1)))))}}else n(Dc(s.clientId))},RESET_BLOCKS:[function(e,t){var n=t.getState(),r=Ha(n),o=za(n),i=!r||"all"!==o||Object(c.doBlocksMatchTemplate)(e.blocks,r);if(i!==Va(n))return ti(i)}],MULTI_SELECT:function(e,t){var n=ea((0,t.getState)());Object(Ve.speak)(Object(g.sprintf)(
|
26 |
/* translators: %s: number of selected blocks */
|
27 |
-
Object(
|
28 |
-
Object(g._x)("Add %s","directly add the only allowed block"),s):Object(g._x)("Add block","Generic label for block inserter button");var f=!d,p=Object(u.createElement)(h.Button,{ref:t,onFocus:c,tabIndex:i,className:b()(r,"block-editor-button-block-appender"),onClick:o,"aria-haspopup":f?"true":void 0,"aria-expanded":f?l:void 0,disabled:a,label:n},!d&&Object(u.createElement)(h.VisuallyHidden,{as:"span"},n),Object(u.createElement)(Mo.a,{icon:No.a}));return(f||d)&&(p=Object(u.createElement)(h.Tooltip,{text:n},p)),p},isAppender:!0})})),wl=Object(u.createContext)();function Cl(e){e.stopPropagation()}var Sl=Object(v.withSelect)((function(e,t){var n=t.rootClientId,r=e("core/block-editor"),o=r.getBlockOrder,i=r.canInsertBlockType,a=r.getTemplateLock,l=r.getSelectedBlockClientId;return{isLocked:!!a(n),blockClientIds:o(n),canInsertDefaultBlock:i(Object(c.getDefaultBlockName)(),n),selectedBlockClientId:l()}}))((function(e){var t,n=e.blockClientIds,r=e.rootClientId,o=e.canInsertDefaultBlock,c=e.isLocked,i=e.renderAppender,a=e.className,l=e.selectedBlockClientId,s=e.tagName,d=void 0===s?"div":s,p=Object(u.useContext)(wl);if(c||!1===i)return null;if(i)t=Object(u.createElement)(i,null);else{var m=!r,v=l===r,O=l&&!n.includes(l);if(!m&&!v&&(!l||O))return null;t=o?Object(u.createElement)(_l,{rootClientId:r,lastBlockClientId:Object(f.last)(n)}):Object(u.createElement)(El,{rootClientId:r,className:"block-list-appender__toggle"})}return Object(u.createElement)(d,{tabIndex:-1,onFocus:Cl,className:b()("block-list-appender","wp-block",a),ref:function(e){e?p.set(r||"",e):p.delete(r||"")}},t)}));function Il(e,t,n,r,o){return function(c){var i=function(e){var t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(c),a=i.srcRootClientId,l=i.srcClientIds;if("block"===i.type){var s=n(l[0],a);if(!(a===e&&s===t||l.includes(e)||r(l).some((function(t){return t===e})))){var u=a===e,d=l.length;o(l,a,e,u&&s<t?t-d:t)}}}}function xl(e,t,n,r,o){return function(i){if(n){var a=Object(c.findTransform)(Object(c.getBlockTransforms)("from"),(function(e){return"files"===e.type&&e.isMatch(i)}));if(a){var l=a.transform(i,r);o(l,t,e)}}}}function Bl(e,t,n){return function(r){var o=Object(c.pasteHandler)({HTML:r,mode:"BLOCKS"});o.length&&n(o,t,e)}}function Pl(e,t){var n=Object(v.useSelect)((function(e){var t=e("core/block-editor");return{getBlockIndex:t.getBlockIndex,getClientIdsOfDescendants:t.getClientIdsOfDescendants,hasUploadPermissions:(0,t.getSettings)().mediaUpload}}),[]),r=n.getBlockIndex,o=n.getClientIdsOfDescendants,c=n.hasUploadPermissions,i=Object(v.useDispatch)("core/block-editor"),a=i.insertBlocks,l=i.moveBlocksToPosition,s=i.updateBlockAttributes;return{onDrop:Il(e,t,r,o,l),onFilesDrop:xl(e,t,c,s,a),onHTMLDrop:Bl(e,t,a)}}function Tl(e,t,n){var r,o="top"===n||"bottom"===n,c=e.x,i=e.y,a=o?c:i,l=o?i:c,s=o?t.left:t.top,u=o?t.right:t.bottom,d=t[n];return r=a>=s&&a<=u?a:a<u?s:u,Math.sqrt(Math.pow(a-r,2)+Math.pow(l-d,2))}function Nl(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((function(o){var c=Tl(e,t,o);(void 0===n||c<n)&&(n=c,r=o)})),[n,r]}function Dl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Rl=new Map;function Al(e){var t=e.placeholder,n=e.rootClientId,r=e.renderAppender,o=e.__experimentalAppenderTagName,c=e.wrapperRef,i=Object(v.useSelect)((function(e){var t,r=e("core/block-editor"),o=r.getBlockOrder,c=r.getBlockListSettings,i=r.getSettings,a=r.getSelectedBlockClientId,l=r.getMultiSelectedBlockClientIds,s=r.hasMultiSelection,u=r.getGlobalBlockCount,d=r.isTyping,b=(0,r.__experimentalGetActiveBlockIdByBlockNames)(i().__experimentalSpotlightEntityBlocks);return{blockClientIds:o(n),selectedBlockClientId:a(),multiSelectedBlockClientIds:l(),orientation:null===(t=c(n))||void 0===t?void 0:t.orientation,hasMultiSelection:s(),enableAnimation:!d()&&u()<=200,activeEntityBlockId:b}}),[n]),a=i.blockClientIds,l=i.selectedBlockClientId,d=i.multiSelectedBlockClientIds,f=i.orientation,p=i.hasMultiSelection,m=i.enableAnimation,O=i.activeEntityBlockId,g=function(e){var t=e.element,n=e.rootClientId,r=void 0===n?"":n,o=Object(u.useState)(null),c=Object(oe.a)(o,2),i=c[0],a=c[1],l=Object(v.useSelect)((function(e){var t,n=e("core/block-editor"),o=n.getBlockListSettings;return{isLockedAll:"all"===(0,n.getTemplateLock)(r),orientation:null===(t=o(r))||void 0===t?void 0:t.orientation}}),[r]),d=l.isLockedAll,b=l.orientation,f=Pl(r,i),p=Object(h.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dl(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:t,isDisabled:d,withPosition:!0},f)).position;if(Object(u.useEffect)((function(){if(p){var e=function(e,t,n){var r,o,c="horizontal"===n?["left","right"]:["top","bottom"];return e.forEach((function(n,i){if(n.classList.contains("wp-block")){var a=n.getBoundingClientRect(),l=Nl(t,a,c),s=Object(oe.a)(l,2),u=s[0],d=s[1];if(void 0===o||u<o){var b="bottom"===d||"right"===d,f=b?1:0,p=b&&e[i+1]&&e[i+1].classList.contains("is-dragging");o=u,r=i+(f+=p?1:0)}}})),r}(Array.from(t.current.children),p,b);a(void 0===e?0:e)}}),[p]),p)return i}({element:c,rootClientId:n}),j=g===a.length;return Object(u.createElement)(u.Fragment,null,a.map((function(e,t){var r=p?d.includes(e):l===e,o=g===t;return Object(u.createElement)(v.AsyncModeProvider,{key:e,value:!r},Object(u.createElement)(Qu,{rootClientId:n,clientId:e,index:t,enableAnimation:m,className:b()({"is-drop-target":o,"is-dropping-horizontally":o&&"horizontal"===f,"has-active-entity":O}),activeEntityBlockId:O}))})),a.length<1&&t,Object(u.createElement)(Sl,{tagName:o,rootClientId:n,renderAppender:r,className:b()({"is-drop-target":j,"is-dropping-horizontally":j&&"horizontal"===f})}))}function Ml(e){return Object(u.createElement)(v.AsyncModeProvider,{value:!1},Object(u.createElement)(Al,e))}var Ll,Fl=Object(u.forwardRef)((function(e,t){var n=e.className,r=e.placeholder,o=e.rootClientId,c=e.renderAppender,i=o?"div":Fu,a=Object(u.useRef)(),l=t||a;return Object(u.createElement)(wl.Provider,{value:Rl},Object(u.createElement)(i,{ref:l,className:b()("block-editor-block-list__layout",n)},Object(u.createElement)(Ml,{placeholder:r,rootClientId:o,renderAppender:c,wrapperRef:l})))}));function Vl(e){var t=e.onClick;return Object(u.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(u.createElement)(h.Disabled,null,Object(u.createElement)(Fl,null)))}var Hl=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(p.useResizeObserver)(),o=Object(oe.a)(r,2),c=o[0],i=o[1].width,a=Object(p.useResizeObserver)(),l=Object(oe.a)(a,2),s=l[0],d=l[1].height;Ll=Ll||Object(p.pure)(Fl);var b=(i-2*n)/t;return Object(u.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:d*b+2*n}},c,Object(u.createElement)(h.Disabled,{style:{transform:"scale(".concat(b,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},s,Object(u.createElement)(Ll,null)))},zl=Object(u.memo)((function(e){var t=e.blocks,n=e.__experimentalPadding,r=void 0===n?0:n,o=e.viewportWidth,c=void 0===o?700:o,i=e.__experimentalLive,a=void 0!==i&&i,l=e.__experimentalOnClick,s=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),d=Object(u.useMemo)((function(){return Object(f.castArray)(t)}),[t]);return t&&0!==t.length?Object(u.createElement)(yl,{value:d,settings:s},a?Object(u.createElement)(Vl,{onClick:l}):Object(u.createElement)(Hl,{viewportWidth:c,__experimentalPadding:r})):null}));function Ul(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ul(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ul(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wl=function(e){var t,n,r=e.item,o=Object(c.getBlockType)(r.name);return Object(u.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(u.createElement)("div",{className:"block-editor-inserter__preview"},Object(c.isReusableBlock)(r)||o.example?Object(u.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(u.createElement)(zl,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=o.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:o.example?Object(c.getBlockFromExample)(r.name,{attributes:Gl(Gl({},o.example.attributes),r.initialAttributes),innerBlocks:o.example.innerBlocks}):Object(c.createBlock)(r.name,r.initialAttributes)})):Object(u.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(g.__)("No Preview Available."))),!Object(c.isReusableBlock)(r)&&Object(u.createElement)(Vo,{blockType:r}))},Kl=n(54),ql=n(117),$l=n(118),Yl=function(e){var t=e.icon,n=e.onClick,r=e.isDisabled,o=e.title,c=e.className,i=e.composite,a=Object(ye.a)(e,["icon","onClick","isDisabled","title","className","composite"]),s=t?{backgroundColor:t.background,color:t.foreground}:{};return Object(u.createElement)("div",{className:"block-editor-block-types-list__list-item"},Object(u.createElement)($l.a,Object(l.a)({role:"option",as:h.Button},i,{className:b()("block-editor-block-types-list__item",c),onClick:function(e){e.preventDefault(),n()},disabled:r},a),Object(u.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:s},Object(u.createElement)(kr,{icon:t,showColors:!0})),Object(u.createElement)("span",{className:"block-editor-block-types-list__item-title"},o)))},Xl=function(e){var t=e.items,n=void 0===t?[]:t,r=e.onSelect,o=e.onHover,i=void 0===o?function(){}:o,a=e.children,s=e.label,d=Object(Kl.g)(),b=n.reduce((function(e,t){return e+"--"+t.id}),"");return Object(u.useEffect)((function(){d.unstable_sort()}),[d.unstable_sort,b]),Object(u.createElement)(ql.a,Object(l.a)({},d,{role:"listbox",className:"block-editor-block-types-list","aria-label":s}),n.map((function(e){return Object(u.createElement)(Yl,{key:e.id,className:Object(c.getBlockMenuDefaultClassName)(e.id),icon:e.icon,onClick:function(){r(e),i(null)},onFocus:function(){return i(e)},onMouseEnter:function(){return i(e)},onMouseLeave:function(){return i(null)},onBlur:function(){return i(null)},isDisabled:e.isDisabled,title:e.title,composite:d})})),a)};function Ql(e){var t=e.rootClientId,n=e.children,r=Object(v.useSelect)((function(e){var n=(0,e("core/blocks").getBlockType)((0,e("core/block-editor").getBlockName)(t));return{rootBlockTitle:n&&n.title,rootBlockIcon:n&&n.icon}})),o=r.rootBlockTitle,c=r.rootBlockIcon;return Object(u.createElement)("div",{className:"block-editor-inserter__child-blocks"},(c||o)&&Object(u.createElement)("div",{className:"block-editor-inserter__parent-block-header"},Object(u.createElement)(kr,{icon:c,showColors:!0}),o&&Object(u.createElement)("h2",null,o)),n)}var Zl=function(e){var t=e.title,n=e.icon,r=e.children;return Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(u.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),Object(u.createElement)(h.Icon,{icon:n})),Object(u.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};function Jl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var es=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.showMostUsedBlocks,c=jr(t,n),i=Object(oe.a)(c,4),a=i[0],l=i[1],d=i[2],b=i[3],p=Object(v.useSelect)((function(e){var n=e("core/block-editor").getBlockName;return!!(0,e("core/blocks").getChildBlockNames)(n(t)).length}),[t]),m=Object(u.useMemo)((function(){return Object(f.orderBy)(a,["frecency"],["desc"]).slice(0,6)}),[a]),O=Object(u.useMemo)((function(){return a.filter((function(e){return!e.category}))}),[a]),h=Object(u.useMemo)((function(){var e=function(e){return Object(f.findIndex)(l,(function(t){return t.slug===e.category}))};return Object(f.flow)((function(e){return e.filter((function(e){return e.category&&"reusable"!==e.category}))}),(function(t){return Object(f.sortBy)(t,e)}),(function(e){return Object(f.groupBy)(e,"category")}))(a)}),[a,l]),j=Object(u.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jl(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},d);return Object.keys(d).forEach((function(t){e[t]=a.filter((function(e){return function(e){return e.name.split("/")[0]}(e)===t})),0===e[t].length&&delete e[t]})),e}),[a,d]);return Object(u.useEffect)((function(){return function(){return r(null)}}),[]),Object(u.createElement)("div",null,p&&Object(u.createElement)(Ql,{rootClientId:t},Object(u.createElement)(Xl,{items:a,onSelect:b,onHover:r,label:Object(g.__)("Child Blocks")})),o&&!p&&!!m.length&&Object(u.createElement)(Zl,{title:Object(g._x)("Most used","blocks")},Object(u.createElement)(Xl,{items:m,onSelect:b,onHover:r,label:Object(g._x)("Most used","blocks")})),!p&&Object(f.map)(l,(function(e){var t=h[e.slug];return t&&t.length?Object(u.createElement)(Zl,{key:e.slug,title:e.title,icon:e.icon},Object(u.createElement)(Xl,{items:t,onSelect:b,onHover:r,label:e.title})):null})),!p&&!!O.length&&Object(u.createElement)(Zl,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(g.__)("Uncategorized")},Object(u.createElement)(Xl,{items:O,onSelect:b,onHover:r,label:Object(g.__)("Uncategorized")})),!p&&Object(f.map)(d,(function(e,t){var n=j[t];return n&&n.length?Object(u.createElement)(Zl,{key:t,title:e.title,icon:e.icon},Object(u.createElement)(Xl,{items:n,onSelect:b,onHover:r,label:e.title})):null})))},ts=function(e){var t,n=e.selectedCategory,r=e.patternCategories,o=e.onClickCategory,c=e.children;return Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:b()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(u.createElement)(h.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(g.__)("Filter patterns"),hideLabelFromVision:!0,value:n.name,onChange:function(e){o(r.find((function(t){return e===t.name})))},options:(t=[],r.map((function(e){return t.push({value:e.name,label:e.label})})),t)})),Object(u.createElement)("div",{className:"block-editor-inserter__panel-content"},c))},ns=function(e){var t=Object(v.useSelect)((function(e){var t=e("core/block-editor").getSettings();return{patterns:t.__experimentalBlockPatterns,patternCategories:t.__experimentalBlockPatternCategories}}),[]),n=t.patternCategories,r=t.patterns,o=Object(v.useDispatch)("core/notices").createSuccessNotice;return[r,n,Object(u.useCallback)((function(t,n){e(Object(f.map)(n,(function(e){return Object(c.cloneBlock)(e)})),t.name),o(Object(g.sprintf)(
|
29 |
/* translators: %s: block pattern title. */
|
30 |
-
Object(
|
31 |
// translators: %d: the name of the block that has been added
|
32 |
-
var n=Object(
|
33 |
/* translators: %d: number of results. */
|
34 |
-
Object(
|
35 |
/* translators: Blocks tab title in the block inserter. */
|
36 |
-
title:Object(
|
37 |
/* translators: Patterns tab title in the block inserter. */
|
38 |
-
title:Object(
|
39 |
/* translators: Reusable blocks tab title in the block inserter. */
|
40 |
-
title:Object(
|
41 |
-
Object(
|
42 |
-
Object(g.__)("%s block added"),l.title);Object(Ve.speak)(u)}}}})),Object(p.ifCondition)((function(e){var t=e.hasItems,n=e.isAppender,r=e.rootClientId,o=e.clientId;return t||!n&&!r&&!o}))])(Is),Bs=Object(u.forwardRef)((function(e,t){var n=e.selectedClientId,r=e.isReverse,o=e.containerRef,c=e.noCapture,i=e.hasMultiSelection,a=e.multiSelectionContainer,l=Object(v.useSelect)((function(e){return e("core/block-editor").isNavigationMode()})),s=Object(v.useDispatch)("core/block-editor").setNavigationMode;return Object(u.createElement)("div",{ref:t,tabIndex:l?void 0:"0",onFocus:function(){if(c.current)c.current=null;else if(n){var e=Ye(n,t.current.ownerDocument);if(r){var l=Xr.focus.tabbable.find(e);(Object(f.last)(l)||e).focus()}else e.focus()}else{if(i)return void a.current.focus();s(!0);var u=Xr.focus.tabbable.find(o.current);u.length&&(r?Object(f.last)(u).focus():Object(f.first)(u).focus())}},style:{position:"fixed"}})})),Ps=Object(f.overEvery)([Xr.isTextField,Xr.focus.tabbable.isTabbableIndex]);function Ts(e,t,n,r){var o,c=Xr.focus.focusable.find(n);return t&&(c=Object(f.reverse)(c)),c=c.slice(c.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),Object(f.find)(c,(function t(n,c,i){if(!Xr.focus.tabbable.isTabbableIndex(n))return!1;if(r){var a=n.getBoundingClientRect();if(a.left>=o.right||a.right<=o.left)return!1}if(Object(Xr.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if((l=n).classList.contains("block-editor-block-list__layout")||l.querySelector(".block-editor-block-list__layout"))return!0;var l;if(n.contains(e))return!1;for(var s,u=1;(s=i[c+u])&&n.contains(s);u++)if(t(s,c+u,i))return!1;return!0}))}function Ns(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,c=t.getPreviousBlockClientId,i=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,l=t.getLastMultiSelectedBlockClientId,s=t.hasMultiSelection,u=t.getBlockOrder,d=t.isNavigationMode,b=t.hasBlockMovingClientId,f=t.getBlockIndex,p=t.getBlockRootClientId,m=t.getClientIdsOfDescendants,v=t.canInsertBlockType,O=t.getBlockName,g=t.isSelectionEnabled,h=t.getBlockSelectionStart,j=t.isMultiSelecting,y=t.getSettings,k=n(),_=r(),E=o();return{selectedBlockClientId:k,selectionStartClientId:_,selectionBeforeEndClientId:c(E||k),selectionAfterEndClientId:i(E||k),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:s(),blocks:u(),isNavigationMode:d(),hasBlockMovingClientId:b,getBlockIndex:f,getBlockRootClientId:p,getClientIdsOfDescendants:m,canInsertBlockType:v,getBlockName:O,isSelectionEnabled:g(),blockSelectionStart:h(),isMultiSelecting:j(),keepCaretInsideBlock:y().keepCaretInsideBlock}}function Ds(e){var t=e.children,n=Object(u.useRef)(),r=Object(u.useRef)(),o=Object(u.useRef)(),c=Object(u.useRef)(),i=Object(u.useRef)(),a=Object(u.useRef)(),l=Object(u.useRef)(),s=Object(v.useSelect)(Ns,[]),d=s.selectedBlockClientId,p=s.selectionStartClientId,m=s.selectionBeforeEndClientId,O=s.selectionAfterEndClientId,h=s.selectedFirstClientId,j=s.selectedLastClientId,y=s.hasMultiSelection,k=s.blocks,_=s.isNavigationMode,E=s.hasBlockMovingClientId,w=s.isSelectionEnabled,C=s.blockSelectionStart,S=s.isMultiSelecting,I=s.getBlockIndex,x=s.getBlockRootClientId,B=s.getClientIdsOfDescendants,P=s.canInsertBlockType,T=s.getBlockName,N=s.keepCaretInsideBlock,D=Object(v.useDispatch)("core/block-editor"),R=D.multiSelect,A=D.selectBlock,M=D.clearSelectedBlock,L=D.setNavigationMode,F=D.setBlockMovingClientId,V=D.moveBlockToPosition,H=Object(u.useState)(!1),z=Object(oe.a)(H,2),U=z[0],G=z[1];Object(u.useEffect)((function(){y&&!S&&c.current.focus()}),[y,S]);var W=b()("block-editor-writing-flow",{"is-navigate-mode":_,"is-block-moving-mode":!!E(),"can-insert-moving-block":U});return Object(u.createElement)("div",{className:W},Object(u.createElement)(Bs,{ref:r,selectedClientId:d,containerRef:n,noCapture:a,hasMultiSelection:y,multiSelectionContainer:c}),Object(u.createElement)("div",{ref:n,onKeyDown:function(e){var t=e.keyCode,s=e.target,u=t===xt.UP,b=t===xt.DOWN,v=t===xt.LEFT,g=t===xt.RIGHT,w=t===xt.TAB,C=t===xt.ESCAPE,S=t===xt.ENTER,D=t===xt.SPACE,H=u||v,z=v||g,U=u||b,W=z||U,K=e.shiftKey,q=K||e.ctrlKey||e.altKey||e.metaKey,$=U?Xr.isVerticalEdge:Xr.isHorizontalEdge,Y=n.current.ownerDocument,X=Y.defaultView;if(_){var Q,Z=w&&K||u,J=w&&!K||b,ee=v,te=g;if(Z)Q=m;else if(J)Q=O;else if(ee){var ne;Q=null!==(ne=x(d))&&void 0!==ne?ne:d}else if(te){var re;Q=null!==(re=B([d])[0])&&void 0!==re?re:d}var oe=E();if(oe&&Q&&G(P(T(oe),x(Q))),C&&oe&&(F(null),G(!1)),(S||D)&&oe){var ce=x(oe),ie=x(d),ae=I(oe,ce),le=I(d,ie);ae<le&&ce===ie&&(le-=1),V(oe,ce,ie,le),A(oe),F(null)}if(J||Z||ee||te)if(Q)e.preventDefault(),A(Q);else if(w&&d){var se,ue=Ye(d,Y);(se=J?Xr.focus.tabbable.findNext(ue):Xr.focus.tabbable.findPrevious(ue))&&(e.preventDefault(),se.focus(),M())}}else{if(d)if(w){var de=Ye(d,Y);if(K){if(s===de)return a.current=!0,void r.current.focus()}else{var be=Xr.focus.tabbable.find(de);if(s===(Object(f.last)(be)||de))return a.current=!0,void o.current.focus()}}else C&&L(!0);else if(y&&w&&s===c.current)return a.current=!0,void(K?r.current.focus():o.current.focus());if(U?l.current||(l.current=Object(Xr.computeCaretRect)(X)):l.current=null,!W)return xt.isKeyboardEvent.primary(e)&&(i.current=Object(Xr.isEntirelySelected)(s)),void(xt.isKeyboardEvent.primary(e,"a")&&((s.isContentEditable?i.current:Object(Xr.isEntirelySelected)(s))&&(R(Object(f.first)(k),Object(f.last)(k)),e.preventDefault()),i.current=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===xt.UP||t===xt.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(s,t,q)){var fe,pe="rtl"===(fe=s).ownerDocument.defaultView.getComputedStyle(fe).direction?!H:H;if(K)(H&&m||!H&&O)&&(y||function(e,t){var r,o,c=Ts(e,t,n.current);return!(c&&(r=e,o=c,r.closest(".block-editor-block-list__block")===o.closest(".block-editor-block-list__block")))}(s,H)&&$(s,H))&&(function(e){var t=e?m:O;t&&R(p||d,t)}(H),e.preventDefault());else if(y)!function(e){var t=e?h:j;t&&A(t)}(H),e.preventDefault();else if(U&&Object(Xr.isVerticalEdge)(s,H)&&!N){var me=Ts(s,H,n.current,!0);me&&(Object(Xr.placeCaretAtVerticalEdge)(me,H,l.current),e.preventDefault())}else if(z&&X.getSelection().isCollapsed&&Object(Xr.isHorizontalEdge)(s,pe)&&!N){var ve=Ts(s,pe,n.current);Object(Xr.placeCaretAtHorizontalEdge)(ve,pe),e.preventDefault()}}}},onMouseDown:function(e){l.current=null;var t=e.target.ownerDocument;if(_&&d&&Xe(Ye(d,t),e.target)?(L(!1),F(null)):_&&E()&&Qe(e.target)&&G(P(T(E()),x(Qe(e.target)))),w&&0===e.button){var n=Qe(e.target);n&&(e.shiftKey?C!==n&&(R(C,n),e.preventDefault()):y&&A(n))}}},Object(u.createElement)("div",{ref:c,tabIndex:y?"0":void 0,"aria-label":y?Object(g.__)("Multiple selected blocks"):void 0,style:{position:"fixed"}}),t),Object(u.createElement)(Bs,{ref:o,selectedClientId:d,containerRef:n,noCapture:a,hasMultiSelection:y,multiSelectionContainer:c,isReverse:!0}),Object(u.createElement)("div",{"aria-hidden":!0,tabIndex:-1,onClick:function(){var e=Xr.focus.focusable.find(n.current),t=Object(f.findLast)(e,Ps);t&&Object(Xr.placeCaretAtHorizontalEdge)(t,!0)},className:"block-editor-writing-flow__click-redirect"}))}function Rs(e){var t=e.clientId,n=e.setIsInserterForced,r=e.containerRef,o=Object(u.useRef)(),c=Object(v.useSelect)((function(e){var n=e("core/block-editor"),r=n.getMultiSelectedBlockClientIds,o=n.getSelectedBlockClientId,c=n.hasMultiSelection;if((0,n.getSettings)().hasReducedUI)return!0;var i=r(),a=o();return c()?i.includes(t):t===a}),[t]);return Object(u.createElement)("div",{ref:o,onFocus:function(){return n(!0)},onBlur:function(){return n(!1)},onClick:function(e){var n=e.clientX,c=e.clientY,i=e.target;if(i===o.current){var a=r.current.ownerDocument,l=i.getBoundingClientRect(),s=c<l.top+l.height/2,u=Ye(t,a),d=Ts(u,!0,s?r.current:u)||u,b=new window.DOMRect(n,c,0,16);Object(Xr.placeCaretAtVerticalEdge)(d,s,b,!1)}},tabIndex:-1,className:b()("block-editor-block-list__insertion-point-inserter",{"is-inserter-hidden":c})},Object(u.createElement)(xs,{position:"bottom center",clientId:t,__experimentalIsQuick:!0}))}function As(e){var t=e.clientId,n=e.rootClientId,r=e.isInserterShown,o=e.isInserterForced,c=e.setIsInserterForced,i=e.containerRef,a=e.showInsertionPoint,l=Object(u.useContext)(wl),s=Object(u.useMemo)((function(){if(t){var e=i.current.ownerDocument;return Ye(t,e)}return l.get(n||"")}),[t,n,l]);return Object(u.createElement)(h.Popover,{noArrow:!0,animate:!1,anchorRef:s,position:"top right left",focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:"block-toolbar"},Object(u.createElement)("div",{className:"block-editor-block-list__insertion-point",style:{width:null==s?void 0:s.offsetWidth}},a&&Object(u.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),(r||o)&&Object(u.createElement)(Rs,{clientId:t,setIsInserterForced:c,containerRef:i})))}function Ms(e){var t=e.children,n=e.containerRef,r=Object(u.useState)(!1),o=Object(oe.a)(r,2),c=o[0],i=o[1],a=Object(u.useState)(!1),l=Object(oe.a)(a,2),s=l[0],d=l[1],b=Object(u.useState)(null),f=Object(oe.a)(b,2),p=f[0],m=f[1],O=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.isMultiSelecting,r=t.isBlockInsertionPointVisible,o=t.getBlockInsertionPoint,c=t.getBlockOrder,i=o(),a=c(i.rootClientId);return{isMultiSelecting:n(),isInserterVisible:r(),selectedClientId:a[i.index],selectedRootClientId:i.rootClientId}}),[]),g=O.isMultiSelecting,h=O.isInserterVisible,j=O.selectedClientId,y=O.selectedRootClientId,k=c||s||h;return Object(u.createElement)(u.Fragment,null,!g&&k&&Object(u.createElement)(As,{clientId:h?j:p,rootClientId:y,isInserterShown:c,isInserterForced:s,setIsInserterForced:d,containerRef:n,showInsertionPoint:h}),Object(u.createElement)("div",{onMouseMove:s||g?void 0:function(e){if(e.target.classList.contains("block-editor-block-list__layout")){var t=e.target.getBoundingClientRect(),n=e.clientY-t.top,r=Array.from(e.target.children).find((function(e){return e.offsetTop>n}));if(r&&(r.id||(r=r.firstElementChild))){var o=r.id.slice("block-".length);if(o){var a=r.getBoundingClientRect();e.clientX>a.right||e.clientX<a.left?c&&i(!1):(i(!0),m(o))}}}else c&&i(!1)}},t))}var Ls=function(e){var t=e.clientId,n=e.rootClientId,r=Object(ye.a)(e,["clientId","rootClientId"]),o=Object(v.useSelect)((function(e){var r,o=e("core/block-editor"),c=o.__unstableGetBlockWithoutInnerBlocks,i=o.getBlockIndex,a=o.hasBlockMovingClientId,l=o.getBlockListSettings,s=i(t,n),u=c(t);return{index:s,name:u.name,attributes:u.attributes,blockMovingMode:a(),orientation:null===(r=l(n))||void 0===r?void 0:r.orientation}}),[t,n]),i=o.index,a=o.name,s=o.attributes,d=o.blockMovingMode,f=o.orientation,p=Object(v.useDispatch)("core/block-editor"),m=p.setNavigationMode,O=p.removeBlock,g=Object(u.useRef)();Object(u.useEffect)((function(){g.current.focus(),window.navigator.platform.indexOf("Win")>-1&&Object(Ve.speak)(y)}),[]);var j=Object(c.getBlockType)(a),y=Object(c.__experimentalGetAccessibleBlockLabel)(j,s,i+1,f),k=b()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!d});return Object(u.createElement)("div",Object(l.a)({className:k},r),Object(u.createElement)(h.Button,{ref:g,onClick:function(){return m(!1)},onKeyDown:function(e){var n=e.keyCode;n!==xt.BACKSPACE&&n!==xt.DELETE||(O(t),e.preventDefault())},label:y},Object(u.createElement)(Sr,{clientId:t})))};function Fs(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var Vs=function(e){var t=e.children,n=e.focusOnMount,r=e.__experimentalInitialIndex,o=e.__experimentalOnIndexChange,c=Object(ye.a)(e,["children","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange"]),i=Object(u.useRef)(),s=function(e){var t=Object(u.useState)(!0),n=Object(oe.a)(t,2),r=n[0],o=n[1],c=Object(u.useCallback)((function(){var t=!Xr.focus.tabbable.find(e.current).some((function(e){return!("toolbarItem"in e.dataset)}));t||xo()("Using custom components as toolbar controls",{alternative:"ToolbarItem or ToolbarButton components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),o(t)}),[]);return Object(u.useLayoutEffect)((function(){var t=new window.MutationObserver(c);return t.observe(e.current,{childList:!0,subtree:!0}),function(){return t.disconnect()}}),[r]),r}(i);return function(e,t,n,r,o){var c=Object(u.useState)(t),i=Object(oe.a)(c,1)[0],l=Object(u.useState)(r),s=Object(oe.a)(l,1)[0],d=Object(u.useCallback)((function(){var t,n,r;t=e.current,n=Xr.focus.tabbable.find(t),(r=Object(oe.a)(n,1)[0])&&r.focus()}),[]);Object(a.useShortcut)("core/block-editor/focus-toolbar",d,{bindGlobal:!0,eventName:"keydown"}),Object(u.useEffect)((function(){i&&d()}),[n,i,d]),Object(u.useEffect)((function(){var t=0;return s&&!i&&(t=window.requestAnimationFrame((function(){var t,n=Fs(e.current),r=s||0;n[r]&&(t=e.current).contains(t.ownerDocument.activeElement)&&n[r].focus()}))),function(){if(window.cancelAnimationFrame(t),o){var n=Fs(e.current).findIndex((function(e){return 0===e.tabIndex}));o(n)}}}),[s,i])}(i,n,s,r,o),s?Object(u.createElement)(h.Toolbar,Object(l.a)({label:c["aria-label"],ref:i},c),t):Object(u.createElement)(h.NavigableMenu,Object(l.a)({orientation:"horizontal",role:"toolbar",ref:i},c),t)},Hs=Object(u.createElement)(j.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(u.createElement)(j.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function zs(e){var t=e.clientIds,n=Object(v.useSelect)((function(e){var n;if(1===t.length){var r=(0,e("core/block-editor").getBlockName)(Object(oe.a)(t,1)[0]);return null===(n=Object(c.getBlockType)(r))||void 0===n?void 0:n.icon}}),[t]);return Object(u.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(u.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(u.createElement)(h.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(u.createElement)(h.FlexItem,null,n?Object(u.createElement)(kr,{icon:n}):Object(g.sprintf)(
|
43 |
/* translators: %d: Number of blocks. */
|
44 |
-
Object(
|
45 |
/* translators: %s: Name of the block's parent. */
|
46 |
-
Object(
|
47 |
/* translators: %s: number of blocks. */
|
48 |
-
Object(
|
49 |
-
Object(
|
50 |
-
Object(
|
51 |
-
Object(
|
52 |
-
Object(g._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(c,{type:"snackbar"})}),[])}var iu=function(e){var t=e.children,n=Object(u.useRef)(),r=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]),o=r.getBlocksByClientId,i=r.getSelectedBlockClientIds,a=r.hasMultiSelection,l=r.getSettings,s=Object(v.useDispatch)("core/block-editor"),d=s.flashBlock,b=s.removeBlocks,f=s.replaceBlocks,p=cu(),m=l().__experimentalCanUserUseUnfilteredHTML,O=function(e){var t=i();if(0!==t.length){if(!a()){var r=e.target.ownerDocument;if("copy"===e.type||"cut"===e.type?Object(Xr.documentHasUncollapsedSelection)(r):Object(Xr.documentHasSelection)(r))return}if(n.current.contains(e.target)){if(e.preventDefault(),"copy"===e.type||"cut"===e.type){1===t.length&&d(t[0]),p(e.type,t);var l=o(t),s=Object(c.serialize)(l);e.clipboardData.setData("text/plain",s),e.clipboardData.setData("text/html",s)}if("cut"===e.type)b(t);else if("paste"===e.type){var u=function(e){var t=e.clipboardData,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}var o=Object(re.a)(Object(Xr.getFilesFromDataTransfer)(t)).filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}));return o.length&&!r&&(r=o.map((function(e){return'<img src="'.concat(Object(ou.createBlobURL)(e),'">')})).join(""),n=""),{html:r,plainText:n}}(e),v=u.plainText,O=u.html,g=Object(c.pasteHandler)({HTML:O,plainText:v,mode:"BLOCKS",canUserUseUnfilteredHTML:m});f(t,g,g.length-1,-1)}}}};return Object(u.createElement)("div",{ref:n,onCopy:O,onCut:O,onPaste:O},t)};function au(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]),i=o.canInsertBlockType,a=o.getBlockRootClientId,l=o.getBlocksByClientId,s=o.getTemplateLock,u=Object(v.useSelect)((function(e){return e("core/blocks")}),[]),d=u.getDefaultBlockName,b=u.getGroupingBlockName,p=l(t),m=a(t[0]),O=Object(f.every)(p,(function(e){return!!e&&Object(c.hasBlockSupport)(e.name,"multiple",!0)&&i(e.name,m)})),g=i(d(),m),h=Object(v.useDispatch)("core/block-editor"),j=h.removeBlocks,y=h.replaceBlocks,k=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,w=h.flashBlock,C=h.setBlockMovingClientId,S=h.setNavigationMode,I=h.selectBlock,x=cu();return n({canDuplicate:O,canInsertDefaultBlock:g,isLocked:!!s(m),rootClientId:m,blocks:p,onDuplicate:function(){return k(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(f.first)(Object(f.castArray)(t)))},onInsertAfter:function(){_(Object(f.last)(Object(f.castArray)(t)))},onMoveTo:function(){S(!0),I(t[0]),C(t[0])},onGroup:function(){if(p.length){var e=b(),n=Object(c.switchToBlockType)(p,e);n&&y(t,n)}},onUngroup:function(){if(p.length){var e=p[0].innerBlocks;e.length&&y(t,e)}},onCopy:function(){var e=p.map((function(e){return e.clientId}));1===p.length&&w(e[0]),x("copy",e)}})}var lu=Object(p.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlock,i=r.getBlockMode,a=r.getSettings,l=o(n),s=a().codeEditingEnabled;return{mode:i(n),blockType:l?Object(c.getBlockType)(l.name):null,isCodeEditingEnabled:s}})),Object(v.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?f.noop:n,o=t.clientId;return{onToggleMode:function(){e("core/block-editor").toggleBlockMode(o),r()}}}))])((function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,i=void 0!==o&&o,a=e.isCodeEditingEnabled,l=void 0===a||a;if(!Object(c.hasBlockSupport)(t,"html",!0)||!l)return null;var s="visual"===n?Object(g.__)("Edit as HTML"):Object(g.__)("Edit visually");return Object(u.createElement)(h.MenuItem,{onClick:r},!i&&s)})),su=Object(p.compose)(Object(v.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),Object(v.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(c.rawHandler)({HTML:Object(c.getBlockContent)(n)}))}}})))((function(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(g.__)("Convert to Blocks");return Object(u.createElement)(h.MenuItem,{onClick:n},!r&&o)})),uu=Object(h.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),du=uu.Fill,bu=uu.Slot;du.Slot=bu;var fu=du;function pu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pu(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vu=Object(h.createSlotFill)("BlockSettingsMenuControls"),Ou=vu.Fill,gu=vu.Slot;Ou.Slot=function(e){var t=e.fillProps,n=e.clientIds,r=void 0===n?null:n,o=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlocksByClientId,o=t.getSelectedBlockClientIds,c=null!==r?r:o();return Object(f.map)(Object(f.compact)(n(c)),(function(e){return e.name}))}),[r]);return Object(u.createElement)(gu,{fillProps:mu(mu({},t),{},{selectedBlocks:o})},(function(e){return!Object(f.isEmpty)(e)&&Object(u.createElement)(h.MenuGroup,null,e)}))};var hu=Ou,ju={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0},yu=function(e){var t=e.clientIds,n=e.__experimentalSelectBlock,r=e.children,o=Object(ye.a)(e,["clientIds","__experimentalSelectBlock","children"]),i=Object(f.castArray)(t),a=i.length,s=i[0],d=Object(v.useSelect)((function(e){var t=e("core/keyboard-shortcuts").getShortcutRepresentation;return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),b=Object(u.useCallback)(n?function(){var e=Object(qr.a)(Kr.a.mark((function e(t){var r;return Kr.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:(r=e.sent)&&r[0]&&n(r[0]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}():f.noop,[n]),p=1===a?Object(g.__)("Remove block"):Object(g.__)("Remove blocks");return Object(u.createElement)(au,{clientIds:t,__experimentalUpdateSelection:!n},(function(e){var n=e.canDuplicate,i=e.canInsertDefaultBlock,m=e.isLocked,v=e.onDuplicate,O=e.onInsertAfter,j=e.onInsertBefore,y=e.onRemove,k=e.onCopy,_=e.onMoveTo,E=e.blocks;return Object(u.createElement)(h.DropdownMenu,Object(l.a)({icon:$r.a,label:Object(g.__)("More options"),className:"block-editor-block-settings-menu",popoverProps:ju,noIcons:!0},o),(function(e){var o=e.onClose;return Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.MenuGroup,null,Object(u.createElement)(fu.Slot,{fillProps:{onClose:o}}),1===a&&Object(u.createElement)(su,{clientId:s}),Object(u.createElement)(h.ClipboardButton,{text:function(){return Object(c.serialize)(E)},role:"menuitem",className:"components-menu-item__button",onCopy:k},Object(g.__)("Copy")),n&&Object(u.createElement)(h.MenuItem,{onClick:Object(f.flow)(o,v,b),shortcut:d.duplicate},Object(g.__)("Duplicate")),i&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.MenuItem,{onClick:Object(f.flow)(o,j),shortcut:d.insertBefore},Object(g.__)("Insert Before")),Object(u.createElement)(h.MenuItem,{onClick:Object(f.flow)(o,O),shortcut:d.insertAfter},Object(g.__)("Insert After"))),!m&&Object(u.createElement)(h.MenuItem,{onClick:Object(f.flow)(o,_)},Object(g.__)("Move To")),1===a&&Object(u.createElement)(lu,{clientId:s,onToggle:o})),Object(u.createElement)(hu.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):u.Children.map((function(e){return Object(u.cloneElement)(e,{onClose:o})})),Object(u.createElement)(h.MenuGroup,null,!m&&Object(u.createElement)(h.MenuItem,{onClick:Object(f.flow)(o,y,b),shortcut:d.remove},p)))}))}))},ku=function(e){var t=e.clientIds,n=Object(ye.a)(e,["clientIds"]);return Object(u.createElement)(h.ToolbarGroup,null,Object(u.createElement)(h.ToolbarItem,null,(function(e){return Object(u.createElement)(yu,Object(l.a)({clientIds:t,toggleProps:e},n))})))},_u=window,Eu=_u.clearTimeout,wu=_u.setTimeout;function Cu(e){var t=e.ref,n=e.isFocused,r=e.debounceTimeout,o=void 0===r?200:r,c=e.onChange,i=void 0===c?f.noop:c,a=Object(u.useState)(!1),l=Object(oe.a)(a,2),s=l[0],d=l[1],b=Object(u.useRef)(),p=function(e){(null==t?void 0:t.current)&&d(e),i(e)},m=function(){var e=b.current;e&&Eu&&Eu(e)};return Object(u.useEffect)((function(){return function(){return m()}}),[]),{showMovers:s,debouncedShowMovers:function(e){e&&e.stopPropagation(),m(),s||p(!0)},debouncedHideMovers:function(e){e&&e.stopPropagation(),m(),b.current=wu((function(){var e;e=(null==t?void 0:t.current)&&t.current.matches(":hover"),!n&&!e&&p(!1)}),o)}}}var Su=n(266);function Iu(e){var t=e.hideDragHandle,n=e.__experimentalExpandedControl,r=void 0!==n&&n,o=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getBlockMode,o=t.getSelectedBlockClientIds,i=t.isBlockValid,a=t.getBlockRootClientId,l=t.getSettings,s=o(),u=s[0],d=a(u),b=l();return{blockClientIds:s,blockClientId:u,blockType:u&&Object(c.getBlockType)(n(u)),hasFixedToolbar:b.hasFixedToolbar,hasReducedUI:b.hasReducedUI,rootClientId:d,isValid:s.every((function(e){return i(e)})),isVisual:s.every((function(e){return"visual"===r(e)}))}}),[]),i=o.blockClientIds,a=o.blockClientId,s=o.blockType,d=o.hasFixedToolbar,m=o.hasReducedUI,g=o.isValid,j=o.isVisual,y=Object(v.useDispatch)("core/block-editor").toggleBlockHighlight,k=Object(u.useRef)(),_=function(e){var t=e.ref,n=e.debounceTimeout,r=void 0===n?200:n,o=e.onChange,c=void 0===o?f.noop:o,i=Object(u.useState)(!1),a=Object(oe.a)(i,2),l=a[0],s=a[1],d=Cu({ref:t,debounceTimeout:r,isFocused:l,onChange:c}),b=d.showMovers,p=d.debouncedShowMovers,m=d.debouncedHideMovers,v=Object(u.useRef)(!1),O=function(){return(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement)};return Object(u.useEffect)((function(){var e=t.current,n=function(){O()&&(s(!0),p())},r=function(){O()||(s(!1),m())};return e&&!v.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),v.current=!0),function(){e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,v,s,p,m]),{showMovers:b,gestures:{onMouseMove:p,onMouseLeave:m}}}({ref:k,onChange:function(e){e&&m||y(a,e)}}),E=_.showMovers,w=_.gestures,C=Object(p.useViewportMatch)("medium","<")||d;if(s&&!Object(c.hasBlockSupport)(s,"__experimentalToolbar",!0))return null;var S=C||E;if(0===i.length)return null;var I=g&&j,x=i.length>1,B=b()("block-editor-block-toolbar",S&&"is-showing-movers"),P=r?Su.a:"div";return Object(u.createElement)(P,{className:B},Object(u.createElement)("div",Object(l.a)({ref:k},w),!x&&Object(u.createElement)("div",{className:"block-editor-block-toolbar__block-parent-selector-wrapper"},Object(u.createElement)(Ws,{clientIds:i})),(I||x)&&Object(u.createElement)(h.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(u.createElement)(ru,{clientIds:i}),Object(u.createElement)(Gs,{clientIds:i,hideDragHandle:t||m}))),I&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)(O.a.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"}),Object(u.createElement)(Gr.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"})),Object(u.createElement)(ku,{clientIds:i}))}var xu=function(e){var t=e.focusOnMount,n=Object(ye.a)(e,["focusOnMount"]),r=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getSelectedBlockClientIds,o=e("core/blocks").getBlockType,c=r()[0];return{blockType:c&&o(n(c))}}),[]).blockType;return r&&!Object(c.hasBlockSupport)(r,"__experimentalToolbar",!0)?null:Object(u.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(u.createElement)(Vs,Object(l.a)({focusOnMount:t,className:"block-editor-block-contextual-toolbar"
|
53 |
-
/* translators: accessibility text for the block toolbar */,"aria-label":Object(
|
54 |
-
var F=Object(
|
55 |
/* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
|
56 |
-
Object(
|
57 |
/* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
|
58 |
-
Object(
|
59 |
-
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(g.__)("Outline"),className:"block-editor-block-navigation",shortcut:i,"aria-disabled":!t}))}var gd=Object(u.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(ye.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(v.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[])&&!n;return Object(u.createElement)(h.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(u.createElement)(Od,Object(l.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(u.createElement)(md,{onSelect:t,__experimentalFeatures:r})}})})),hd=n(132),jd=[xt.rawShortcut.primary("z"),xt.rawShortcut.primaryShift("z"),xt.rawShortcut.primary("y")],yd=Object(u.createElement)(h.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(f.fromPairs)(jd.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),kd=function(){return yd};function _d(e){return e.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)})).map((function(e){return'<img src="'.concat(Object(ou.createBlobURL)(e),'">')})).join("")}var Ed={position:"bottom right",isAlternate:!0},wd=function(){return Object(u.createElement)("div",{className:"block-editor-format-toolbar"},Object(u.createElement)(h.ToolbarGroup,null,["bold","italic","link","text-color"].map((function(e){return Object(u.createElement)(h.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(u.createElement)(h.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(u.createElement)(h.ToolbarItem,null,(function(t){return Object(u.createElement)(h.DropdownMenu,{icon:co.a,label:Object(g.__)("More rich text controls"),toggleProps:t,controls:Object(f.orderBy)(e.map((function(e){return Object(oe.a)(e,1)[0].props})),"title"),popoverProps:Ed})}))}))))},Cd=function(e){var t=e.inline,n=e.anchorRef;return t?Object(u.createElement)(h.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar"},Object(u.createElement)(wd,null)):Object(u.createElement)(Gr,null,Object(u.createElement)(wd,null))};function Sd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Id(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sd(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xd(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Bd(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?Bd.EMPTY_ARRAY:t||n?t||(xo()("wp.blockEditor.RichText formattingControls prop",{alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}Bd.EMPTY_ARRAY=[];var Pd=Object(u.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,a=t.value,s=t.onChange,d=t.isSelected,f=t.multiline,m=t.inlineToolbar,O=t.wrapperClassName,g=t.autocompleters,h=t.onReplace,j=t.placeholder,y=t.keepPlaceholderOnFocus,k=t.allowedFormats,_=t.formattingControls,E=t.withoutInteractiveFormatting,w=t.onRemove,C=t.onMerge,S=t.onSplit,I=t.__unstableOnSplitAtEnd,x=t.__unstableOnSplitMiddle,B=t.identifier,P=t.preserveWhiteSpace,T=t.__unstableEmbedURLOnPaste,N=t.__unstableDisableFormats,D=t.disableLineBreaks,R=t.unstableOnFocus,A=t.__unstableAllowPrefixTransformations,M=t.__unstableMultilineRootTag,L=t.__unstableMobileNoFocusOnMount,F=t.deleteEnter,V=t.placeholderTextColor,H=t.textAlign,z=t.selectionColor,G=t.tagsToEliminate,W=t.rootTagsToEliminate,K=t.disableEditingMenu,q=t.fontSize,$=t.fontFamily,Y=t.fontWeight,X=t.fontStyle,Q=t.minWidth,Z=t.maxWidth,J=t.onBlur,ee=t.setRef,te=Object(ye.a)(t,["children","tagName","value","onChange","isSelected","multiline","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","keepPlaceholderOnFocus","allowedFormats","formattingControls","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","preserveWhiteSpace","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMultilineRootTag","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","setRef"]),ne=Object(p.useInstanceId)(e);B=B||ne;var ce=Object(u.useRef)(),ie=n||ce,ae=Object(U.b)(),le=ae.clientId,se=ae.onCaretVerticalPositionChange,ue=ae.isSelected,de=Object(v.useSelect)((function(e){var t,n=e("core/block-editor"),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,i=n.getSelectionEnd,a=n.getSettings,l=n.didAutomaticChange,s=n.__unstableGetBlockWithoutInnerBlocks,b=n.isMultiSelecting,f=n.hasMultiSelection,p=o(),m=i(),v=a().__experimentalUndo;void 0===d?t=p.clientId===le&&p.attributeKey===B:d&&(t=p.clientId===le);var O={};if("native"===u.Platform.OS){var g=le&&s(le);O={shouldBlurOnUnmount:g&&t&&Object(c.isUnmodifiedDefaultBlock)(g)}}return Id({isCaretWithinFormattedText:r(),selectionStart:t?p.offset:void 0,selectionEnd:t?m.offset:void 0,isSelected:t,didAutomaticChange:l(),disabled:b()||f(),undo:v},O)})),be=de.isCaretWithinFormattedText,fe=de.selectionStart,pe=de.selectionEnd,me=de.isSelected,ve=de.didAutomaticChange,Oe=de.disabled,ge=de.undo,he=de.shouldBlurOnUnmount,je=Object(v.useDispatch)("core/block-editor"),ke=je.__unstableMarkLastChangeAsPersistent,_e=je.enterFormattedText,Ee=je.exitFormattedText,we=je.selectionChange,Ce=je.__unstableMarkAutomaticChange,Se=xd(f),Ie=Bd({allowedFormats:k,formattingControls:_,disableFormats:N}),xe=!Ie||Ie.length>0,Be=a,Pe=s;Array.isArray(a)&&(Be=c.children.toHTML(a),Pe=function(e){return s(c.children.fromDOM(Object(i.__unstableCreateElement)(document,e).childNodes))});var Te=Object(u.useCallback)((function(e,t){we(le,B,e,t)}),[le,B]),Ne=Object(u.useCallback)((function(e){var t=e.value,n=e.isReverse;C&&C(!n),w&&Object(i.isEmpty)(t)&&n&&w(!n)}),[C,w]),De=Object(u.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(h&&S){var n=[],r=Object(i.split)(e),o=Object(oe.a)(r,2),c=o[0],a=o[1],l=t.length>0,s=-1;l&&Object(i.isEmpty)(c)||(n.push(S(Object(i.toHTMLString)({value:c,multilineTag:Se}))),s+=1),l?(n.push.apply(n,Object(re.a)(t)),s+=t.length):x&&n.push(x()),(l||x)&&Object(i.isEmpty)(a)||n.push(S(Object(i.toHTMLString)({value:a,multilineTag:Se})));var u=l?s:1,d=l?-1:null;h(n,u,d)}}),[h,S,Se,x]),Re=Object(u.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=h&&S;if(h){var a=Object(c.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),l=Object(c.findTransform)(a,(function(e){return e.regExp.test(t.text)}));l&&(h([l.transform({content:t.text})]),Ce())}if(f)r?D||n(Object(i.insert)(t,"\n")):o&&Object(i.__unstableIsEmptyLine)(t)?De(t):n(Object(i.__unstableInsertLineSeparator)(t));else{var s=t.text,u=t.start,d=t.end,b=I&&u===d&&d===s.length;r||!o&&!b?D||n(Object(i.insert)(t,"\n")):!o&&b?I():o&&De(t)}}),[h,S,Ce,f,De,I]),Ae=Object(u.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,a=e.plainText,l=e.files,s=e.activeFormats;if(l&&l.length&&!r){var u=Object(c.pasteHandler)({HTML:_d(l),mode:"BLOCKS",tagName:o,preserveWhiteSpace:P});return window.console.log("Received items:\n\n",l),void(h&&Object(i.isEmpty)(t)?h(u):De(t,u))}var d,b=h&&S?"AUTO":"INLINE";"AUTO"===b&&Object(i.isEmpty)(t)&&(d=a,Object(hd.regexp)(".*").test(d))&&(b="BLOCKS"),T&&Object(i.isEmpty)(t)&&Object(ls.isURL)(a.trim())&&(b="BLOCKS");var p=Object(c.pasteHandler)({HTML:r,plainText:a,mode:b,tagName:o,preserveWhiteSpace:P});if("string"==typeof p){var m=Object(i.create)({html:p});if(s.length)for(var v=m.formats.length;v--;)m.formats[v]=[].concat(Object(re.a)(s),Object(re.a)(m.formats[v]||[]));f&&(m=Object(i.replace)(m,/\n+/g,i.__UNSTABLE_LINE_SEPARATOR)),n(Object(i.insert)(t,m))}else p.length>0&&(h&&Object(i.isEmpty)(t)?h(p,p.length-1,-1):De(t,p))}),[o,h,S,De,T,f,P]),Me=Object(u.useCallback)((function(e,t){if(h){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),a=Object(c.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),l=Object(c.findTransform)(a,(function(e){var t=e.prefix;return o===t}));if(l){var s=t(Object(i.slice)(e,n,r.length)),u=l.transform(s);h([u]),Ce()}}}}),[h,Ce]),Le=Object(u.createElement)(i.__experimentalRichText,{clientId:le,identifier:B,ref:ie,value:Be,onChange:Pe,selectionStart:fe,selectionEnd:pe,onSelectionChange:Te,tagName:o,placeholder:j,allowedFormats:Ie,withoutInteractiveFormatting:E,onEnter:Re,onDelete:Ne,onPaste:Ae,__unstableIsSelected:me,__unstableInputRule:Me,__unstableMultilineTag:Se,__unstableIsCaretWithinFormattedText:be,__unstableOnEnterFormattedText:_e,__unstableOnExitFormattedText:Ee,__unstableOnCreateUndoLevel:ke,__unstableMarkAutomaticChange:Ce,__unstableDidAutomaticChange:ve,__unstableUndo:ge,__unstableDisableFormats:N,preserveWhiteSpace:P,disabled:Oe,unstableOnFocus:R,__unstableAllowPrefixTransformations:A,__unstableMultilineRootTag:M,onCaretVerticalPositionChange:se,blockIsSelected:void 0!==d?d:ue,shouldBlurOnUnmount:he,__unstableMobileNoFocusOnMount:L,deleteEnter:F,placeholderTextColor:V,textAlign:H,selectionColor:z,tagsToEliminate:G,rootTagsToEliminate:W,disableEditingMenu:K,fontSize:q,fontFamily:$,fontWeight:Y,fontStyle:X,minWidth:Q,maxWidth:Z,onBlur:J,setRef:ee,id:te.id,style:te.style},(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,i=e.editableProps,a=e.editableTagName;return Object(u.createElement)(u.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&xe&&Object(u.createElement)(Cd,{inline:m,anchorRef:ie.current}),t&&Object(u.createElement)(kd,null),Object(u.createElement)(wr,{onReplace:h,completers:g,record:n,onChange:o,isSelected:t,contentRef:ie},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(u.createElement)(a,Object(l.a)({},i,te,{style:te.style?Id(Id({},te.style),i.style):i.style,className:b()("block-editor-rich-text__editable",te.className,i.className,{"keep-placeholder-on-focus":y}),"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,onKeyDown:function(e){r(e),i.onKeyDown(e)}}))})))}));return O?(xo()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(u.createElement)("div",{className:b()("block-editor-rich-text",O)},Le)):Le}));Pd.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(ye.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=c.children.toHTML(t));var i=xd(r);!t&&i&&(t="<".concat(i,"></").concat(i,">"));var a=Object(u.createElement)(u.RawHTML,null,t);return n?Object(u.createElement)(n,Object(f.omit)(o,["format"]),a):a},Pd.isEmpty=function(e){return!e||0===e.length},Pd.Content.defaultProps={format:"string",value:""};var Td=Pd;function Nd(e){var t=e.value,n=e.onChange;return Object(u.createElement)(od,null,Object(u.createElement)(Td,{value:t,onChange:n,placeholder:Object(g.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var Dd=n(302),Rd=function(e){var t=e.icon,n=void 0===t?Dd.a:t,r=e.label,o=void 0===r?Object(g.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(g.__)("Select a variation to start with."):c,a=e.variations,l=e.onSelect,s=e.allowSkip,d=b()("block-editor-block-variation-picker",{"has-many-variations":a.length>4});return Object(u.createElement)(h.Placeholder,{icon:n,label:o,instructions:i,className:d},Object(u.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(g.__)("Block variations")},a.map((function(e){return Object(u.createElement)("li",{key:e.name},Object(u.createElement)(h.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return l(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(u.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),s&&Object(u.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(u.createElement)(h.Button,{isLink:!0,onClick:function(){return l()}},Object(g.__)("Skip"))))};function Ad(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Md=function(e){var t=e.blockClientId,n=Object(u.useState)(),r=Object(oe.a)(n,2),o=r[0],c=r[1],i=Object(v.useDispatch)("core/block-editor").updateBlockAttributes,a=Object(v.useSelect)((function(e){var n=e("core/blocks").getBlockVariations,r=e("core/block-editor"),o=r.getBlockName,c=r.getBlockAttributes,i=t&&o(t);return{variations:i&&n(i,"transform"),blockAttributes:c(t)}}),[t]),l=a.variations,d=a.blockAttributes;if(Object(u.useEffect)((function(){c(function(e,t){if(t&&e){var n=t.filter((function(t){var n=t.attributes;return!(!n||!Object.keys(n).length)&&Object(f.isMatch)(e,n)}));if(1===n.length)return n[0].name}}(d,l))}),[d,l]),!(null==l?void 0:l.length))return null;var b=l.map((function(e){return{value:e.name,label:e.title,info:e.description}})),p=function(e){i(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ad(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ad(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},l.find((function(t){return t.name===e})).attributes))},m="block-editor-block-variation-transforms";return Object(u.createElement)(h.DropdownMenu,{className:m,label:Object(g.__)("Transform to variation"),text:Object(g.__)("Transform to variation"),popoverProps:{position:"bottom center",className:"".concat(m,"__popover")},icon:co.a,toggleProps:{iconPosition:"right"}},(function(){return Object(u.createElement)("div",{className:"".concat(m,"__container")},Object(u.createElement)(h.MenuGroup,null,Object(u.createElement)(h.MenuItemsChoice,{choices:b,value:o,onSelect:p})))}))},Ld=Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Fd=Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function Vd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vd(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zd={top:{icon:Object(u.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(h.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(g._x)("Vertically Align Top","Block vertical alignment setting")},center:{icon:Fd,title:Object(g._x)("Vertically Align Middle","Block vertical alignment setting")},bottom:{icon:Ld,title:Object(g._x)("Vertically Align Bottom","Block vertical alignment setting")}},Ud=["top","center","bottom"],Gd={isAlternate:!0},Wd=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?Ud:r,c=e.isCollapsed,i=void 0===c||c,a=zd[t],l=zd.top;return Object(u.createElement)(h.ToolbarGroup,{popoverProps:Gd,isCollapsed:i,icon:a?a.icon:l.icon,label:Object(g._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return Hd(Hd({},zd[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function Kd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kd(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $d=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=fe("color.palette"),r=!fe("color.custom"),o=void 0===t.colors?n:t.colors,c=void 0===t.disableCustomColors?r:t.disableCustomColors,i=!Object(f.isEmpty)(o)||!c;return Object(u.createElement)(e,qd(qd({},t),{},{colors:o,disableCustomColors:c,hasColorsToChoose:i}))}}),"withColorContext"),Yd=$d(h.ColorPalette);function Xd(e){var t=e.onChange,n=e.value,r=Object(ye.a)(e,["onChange","value"]);return Object(u.createElement)(Be,Object(l.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var Qd=[];function Zd(e){var t=fe("color.gradients")||Qd,n=!fe("color.customGradient");return Object(u.createElement)(h.__experimentalGradientPicker,Object(l.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var Jd=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?h.__experimentalGradientPicker:Zd;return Object(u.createElement)(t,e)};function eb(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(g.__)("Gradient Presets"):o,i=Object(ye.a)(e,["className","value","onChange","label"]),a=fe("color.gradients"),s=!fe("color.customGradient");return Object(f.isEmpty)(a)&&s?null:Object(u.createElement)(h.BaseControl,{className:b()("block-editor-gradient-picker-control",t)},Object(u.createElement)(h.BaseControl.VisualLabel,null,c),Object(u.createElement)(Jd,Object(l.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:a,disableCustomGradients:s},i)))}function tb(e){var t=fe("color.gradients");return Object(f.isEmpty)(t)?null:Object(u.createElement)(h.PanelBody,{title:Object(g.__)("Gradient")},Object(u.createElement)(eb,e))}var nb=[25,50,75,100];function rb(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,a=e.isResizable,l=void 0===a||a,s=e.slug,d=e.width,b=e.height,p=e.onChange,m=e.onChangeImage,v=void 0===m?f.noop:m;function O(e,t){return function(){p({width:e,height:t})}}return Object(u.createElement)(u.Fragment,null,!Object(f.isEmpty)(i)&&Object(u.createElement)(h.SelectControl,{label:Object(g.__)("Image size"),value:s,options:i,onChange:v}),l&&Object(u.createElement)("div",{className:"block-editor-image-size-control"},Object(u.createElement)("p",{className:"block-editor-image-size-control__row"},Object(g.__)("Image dimensions")),Object(u.createElement)("div",{className:"block-editor-image-size-control__row"},Object(u.createElement)(h.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(g.__)("Width"),value:null!==(t=null!=d?d:r)&&void 0!==t?t:"",min:1,onChange:function(e){return p({width:parseInt(e,10)})}}),Object(u.createElement)(h.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(g.__)("Height"),value:null!==(n=null!=b?b:o)&&void 0!==n?n:"",min:1,onChange:function(e){return p({height:parseInt(e,10)})}})),Object(u.createElement)("div",{className:"block-editor-image-size-control__row"},Object(u.createElement)(h.ButtonGroup,{"aria-label":Object(g.__)("Image size presets")},nb.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=d===t&&b===n;return Object(u.createElement)(h.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:O(t,n)},e,"%")}))),Object(u.createElement)(h.Button,{isSmall:!0,onClick:O()},Object(g.__)("Reset")))))}var ob=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=Object(U.b)().clientId;return Object(u.createElement)(e,Object(l.a)({},t,{clientId:n}))}}),"withClientId"),cb=ob((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(u.createElement)(El,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),ib=Object(p.compose)([ob,Object(v.withSelect)((function(e,t){var n=t.clientId,r=(0,e("core/block-editor").getBlockOrder)(n);return{lastBlockClientId:Object(f.last)(r)}}))])((function(e){var t=e.clientId,n=e.lastBlockClientId;return Object(u.createElement)(_l,{rootClientId:t,lastBlockClientId:n})})),ab=n(78),lb=n.n(ab),sb=new WeakMap;function ub(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function db(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ub(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ub(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bb(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,i=e.wrapperRef,a=e.templateInsertUpdatesSelection,l=e.__experimentalCaptureToolbars,s=e.__experimentalAppenderTagName,d=e.renderAppender,b=e.orientation,p=e.placeholder,m=e.__experimentalLayout,O=void 0===m?C:m;!function(e,t,n,r,o){var c=Object(v.useDispatch)("core/block-editor").updateBlockListSettings,i=Object(v.useSelect)((function(t){var n=t("core/block-editor").getBlockRootClientId(e);return{blockListSettings:t("core/block-editor").getBlockListSettings(e),parentLock:t("core/block-editor").getTemplateLock(n)}}),[e]),a=i.blockListSettings,l=i.parentLock;Object(u.useLayoutEffect)((function(){var i={allowedBlocks:t,templateLock:void 0===n?l:n};void 0!==r&&(i.__experimentalCaptureToolbars=r),void 0!==o&&(i.orientation=o),lb()(a,i)||c(e,i)}),[e,a,t,n,l,r,o,c])}(t,n,o,l,b),function(e,t,n,r){var o=Object(v.useDispatch)("core/block-editor").replaceInnerBlocks,i=Object(v.useSelect)((function(t){return t("core/block-editor").getBlocks(e)}),[e]),a=Object(u.useRef)(null);Object(u.useLayoutEffect)((function(){if((0===i.length||"all"===n)&&!Object(f.isEqual)(t,a.current)){a.current=t;var l=Object(c.synchronizeBlocksWithTemplate)(i,t);Object(f.isEqual)(l,i)||o(e,l,0===i.length&&r&&0!==l.length)}}),[i,n,e])}(t,r,o,a);var g=Object(v.useSelect)((function(e){var n=e("core/block-editor").getBlock(t),r=Object(c.getBlockType)(n.name);if(r&&r.providesContext)return function(e,t){sb.has(t)||sb.set(t,new WeakMap);var n=sb.get(t);if(!n.has(e)){var r=Object(f.mapValues)(t.providesContext,(function(t){return e[t]}));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return Object(u.createElement)(I,{value:O},Object(u.createElement)(Tr,{value:g},Object(u.createElement)(Ml,{rootClientId:t,renderAppender:d,__experimentalAppenderTagName:s,wrapperRef:i,placeholder:p})))}function fb(e){return jl(e),Object(u.createElement)(bb,e)}var pb=Object(u.forwardRef)((function(e,t){var n=mb({ref:t},e);return Object(u.createElement)("div",{className:"block-editor-inner-blocks"},Object(u.createElement)("div",n))}));function mb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(u.useRef)(),r=Object(U.b)(),o=r.clientId,c=Object(p.useViewportMatch)("medium","<"),i=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.isBlockSelected,i=t.hasSelectedInnerBlock,a=(0,t.isNavigationMode)()||c;return"core/template"!==n(o)&&!r(o)&&!i(o,!0)&&a}),[o,c]),a=e.ref||n,s=t.value&&t.onChange?fb:bb;return db(db({},e),{},{ref:a,className:b()(e.className,"block-editor-block-list__layout",{"has-overlay":i}),children:Object(u.createElement)(s,Object(l.a)({},t,{clientId:o,wrapperRef:a}))})}pb.DefaultBlockAppender=ib,pb.ButtonBlockAppender=cb,pb.Content=Object(c.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(u.createElement)(t,null)}));var vb=pb,Ob=n(220);function gb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gb(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jb=[{id:"opensInNewTab",title:Object(g.__)("Open in new tab")}],yb=function(e){var t=e.value,n=e.onChange,r=void 0===n?f.noop:n,o=e.settings,c=void 0===o?jb:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(hb(hb({},t),{},Object(s.a)({},e.id,n)))}},a=c.map((function(e){return Object(u.createElement)(h.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:i(e),checked:!!t&&!!t[e.id]})}));return Object(u.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(u.createElement)(h.VisuallyHidden,{as:"legend"},Object(g.__)("Currently selected link settings")),a)},kb=n(128),_b=n.n(kb);var Eb=function(e){return e.stopPropagation()},wb=function(e){Object(_n.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(wn.a)(t);if(n){var o=Object(wn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(En.a)(this,e)});function o(e){var t;return Object(jn.a)(this,o),(t=r.call(this,e)).onChange=t.onChange.bind(Object(kn.a)(t)),t.onFocus=t.onFocus.bind(Object(kn.a)(t)),t.onKeyDown=t.onKeyDown.bind(Object(kn.a)(t)),t.selectLink=t.selectLink.bind(Object(kn.a)(t)),t.handleOnClick=t.handleOnClick.bind(Object(kn.a)(t)),t.bindSuggestionNode=t.bindSuggestionNode.bind(Object(kn.a)(t)),t.autocompleteRef=e.autocompleteRef||Object(u.createRef)(),t.inputRef=Object(u.createRef)(),t.updateSuggestions=Object(f.debounce)(t.updateSuggestions.bind(Object(kn.a)(t)),200),t.suggestionNodes=[],t.isUpdatingSuggestions=!1,t.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""},t}return Object(yn.a)(o,[{key:"componentDidUpdate",value:function(e){var t=this,n=this.state,r=n.showSuggestions,o=n.selectedSuggestion,c=this.props.value;r&&null!==o&&this.suggestionNodes[o]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,_b()(this.suggestionNodes[o],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((function(){t.scrollingIntoView=!1}),100)),e.value!==c&&this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentDidMount",value:function(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"shouldShowInitialSuggestions",value:function(){var e=this.state.suggestions,t=this.props,n=t.__experimentalShowInitialSuggestions,r=void 0!==n&&n,o=t.value;return!this.isUpdatingSuggestions&&r&&!(o&&o.length)&&!(e&&e.length)}},{key:"updateSuggestions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=this.props,r=n.__experimentalFetchLinkSuggestions,o=n.__experimentalHandleURLSuggestions;if(r){var c=!(t&&t.length);if(c||!(t.length<2||!o&&Object(ls.isURL)(t))){this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});var i=r(t,{isInitialSuggestions:c});i.then((function(t){e.suggestionsRequest===i&&(e.setState({suggestions:t,loading:!1,showSuggestions:!!t.length}),t.length?e.props.debouncedSpeak(Object(g.sprintf)(
|
60 |
/* translators: %s: number of results. */
|
61 |
-
Object(
|
62 |
/* translators: %s: search term. */
|
63 |
-
Object(
|
64 |
/* translators: %s: search term. */
|
65 |
-
Object(g.__)('Search results for "%s"'),r),w=Object(u.createElement)(f?u.Fragment:h.VisuallyHidden,{},Object(u.createElement)("span",{className:"block-editor-link-control__search-results-label",id:_},E));return Object(u.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,Object(u.createElement)("div",Object(l.a)({},c,{className:v,"aria-labelledby":_}),a.map((function(e,t){return y&&"__CREATE__"===e.type?Object(u.createElement)(Sb,{searchTerm:r,buttonText:p,onClick:function(){return o(e)},key:e.type,itemProps:i(e,t),isSelected:t===s}):"__CREATE__"===e.type?null:Object(u.createElement)(xb,{key:"".concat(e.id,"-").concat(e.type),itemProps:i(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===s,isURL:O.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:k})}))))}function Pb(e){var t=Object(f.startsWith)(e,"#");return Object(ls.isURL)(e)||e&&e.includes("www.")||t}function Tb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tb(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Db=function(){return Promise.resolve([])},Rb=function(e){var t="URL",n=Object(ls.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(f.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(ls.prependHTTP)(e):e,type:t}])},Ab=function(){var e=Object(qr.a)(Kr.a.mark((function e(t,n,r,o,c,i){var a,l,s;return Kr.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.isInitialSuggestions,e.next=3,Promise.all([r(t,n),o(t)]);case 3:if(l=e.sent,s=!t.includes(" "),l=s&&i&&!a?l[0].concat(l[1]):l[0],!a){e.next=8;break}return e.abrupt("return",l);case 8:return e.abrupt("return",Pb(t)||!c?l:l.concat({title:t,url:t,type:"__CREATE__"}));case 9:case"end":return e.stop()}}),e)})));return function(t,n,r,o,c,i){return e.apply(this,arguments)}}();function Mb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mb(Object(n),!0).forEach((function(t){Object(s.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Fb=Promise.resolve([]),Vb=Object(u.forwardRef)((function(e,t){var n=e.value,r=e.children,o=e.currentLink,c=void 0===o?{}:o,i=e.className,a=void 0===i?null:i,l=e.placeholder,s=void 0===l?null:l,d=e.withCreateSuggestion,b=void 0!==d&&d,m=e.onCreateSuggestion,O=void 0===m?f.noop:m,h=e.onChange,j=void 0===h?f.noop:h,y=e.onSelect,k=void 0===y?f.noop:y,_=e.showSuggestions,E=void 0===_||_,w=e.renderSuggestions,C=void 0===w?function(e){return Object(u.createElement)(Bb,e)}:w,S=e.fetchSuggestions,I=void 0===S?null:S,x=e.allowDirectEntry,B=void 0===x||x,P=e.showInitialSuggestions,T=void 0!==P&&P,N=e.suggestionsQuery,D=void 0===N?{}:N,R=e.withURLSuggestion,A=void 0===R||R,M=e.createSuggestionButtonText,L=function(e,t,n,r){var o=Object(v.useSelect)((function(e){return{fetchSearchSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}}),[]).fetchSearchSuggestions,c=t?Rb:Db;return Object(u.useCallback)((function(t,i){var a=i.isInitialSuggestions;return Pb(t)?c(t,{isInitialSuggestions:a}):Ab(t,Nb(Nb({},e),{},{isInitialSuggestions:a}),o,c,n,r)}),[c,o,n])}(D,B,b,A),F=E?I||L:Fb,V=Object(p.useInstanceId)(Vb),H=Object(u.useState)(),z=Object(oe.a)(H,2),U=z[0],G=z[1],W=function(){var e=Object(qr.a)(Kr.a.mark((function e(t){var n,r;return Kr.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,"__CREATE__"!==t.type){e.next=12;break}return e.prev=2,e.next=5,O(t.title);case 5:n=e.sent,(null===(r=n)||void 0===r?void 0:r.url)&&k(n),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(2);case 11:return e.abrupt("return");case 12:(B||n&&Object.keys(n).length>=1)&&k(Lb(Lb({},Object(f.omit)(c,"id","url")),n),n);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();return Object(u.createElement)("form",{onSubmit:function(e){e.preventDefault(),W(U||{url:n})}},Object(u.createElement)(Cb,{className:a,value:n,onChange:function(e,t){j(e),G(t)},placeholder:null!=s?s:Object(g.__)("Search or type url"),__experimentalRenderSuggestions:E?function(e){return C(Lb(Lb({},e),{},{instanceId:V,withCreateSuggestion:b,currentInputValue:n,createSuggestionButtonText:M,suggestionsQuery:D,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),W(t)}}))}:null,__experimentalFetchLinkSuggestions:F,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T,ref:t}),r)})),Hb=Vb,zb=Object(h.createSlotFill)("BlockEditorLinkControlViewer"),Ub=zb.Slot,Gb=zb.Fill;function Wb(e){var t=e.value,n=e.onEditClick,r=t&&Object(ls.filterURLForDisplay)(Object(ls.safeDecodeURI)(t.url))||"";return Object(u.createElement)("div",{"aria-label":Object(g.__)("Currently selected"),"aria-selected":"true",className:b()("block-editor-link-control__search-item",{"is-current":!0})},Object(u.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(u.createElement)(h.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(u.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(u.createElement)(h.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(g.__)("Edit")),Object(u.createElement)(Ub,{fillProps:t}))}var Kb=function(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(e){return t?r({isCanceled:!0}):n(e)}),(function(e){return r(t?{isCanceled:!0}:e)}))})),cancel:function(){t=!0}}};function qb(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?f.noop:o,i=e.noDirectEntry,a=void 0!==i&&i,l=e.showSuggestions,s=void 0===l||l,d=e.showInitialSuggestions,b=e.forceIsEditingLink,p=e.createSuggestion,m=e.withCreateSuggestion,v=e.inputValue,O=void 0===v?"":v,j=e.suggestionsQuery,y=void 0===j?{}:j,k=e.noURLSuggestion,_=void 0!==k&&k,E=e.createSuggestionButtonText;void 0===m&&p&&(m=!0);var w=Object(u.useRef)(),C=Object(u.useState)(n&&n.url||""),S=Object(oe.a)(C,2),I=S[0],x=S[1],B=O||I,P=Object(u.useState)(void 0!==b?b:!n||!n.url),T=Object(oe.a)(P,2),N=T[0],D=T[1],R=Object(u.useRef)(!1);Object(u.useEffect)((function(){void 0!==b&&b!==N&&D(b)}),[b]),Object(u.useEffect)((function(){R.current&&w.current&&!w.current.contains(w.current.ownerDocument.activeElement)&&(Xr.focus.focusable.find(w.current)[0]||w.current).focus(),R.current=!1}),[N]);var A=function(e){var t=Object(u.useRef)(),n=Object(u.useState)(!1),r=Object(oe.a)(n,2),o=r[0],c=r[1],i=Object(u.useState)(null),a=Object(oe.a)(i,2),l=a[0],s=a[1],d=function(){var n=Object(qr.a)(Kr.a.mark((function n(r){return Kr.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),s(null),n.prev=2,t.current=Kb(Promise.resolve(e(r))),n.next=6,t.current.promise;case 6:return n.abrupt("return",n.sent);case 9:if(n.prev=9,n.t0=n.catch(2),!n.t0||!n.t0.isCanceled){n.next=13;break}return n.abrupt("return");case 13:throw s(n.t0.message||Object(g.__)("An unknown error occurred during creation. Please try again.")),n.t0;case 15:return n.prev=15,c(!1),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[2,9,15,18]])})));return function(e){return n.apply(this,arguments)}}();return Object(u.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:d,isCreatingPage:o,errorMessage:l}}(p),M=A.createPage,L=A.isCreatingPage,F=A.errorMessage;return Object(u.createElement)("div",{tabIndex:-1,ref:w,className:"block-editor-link-control"},L&&Object(u.createElement)("div",{className:"block-editor-link-control__loading"},Object(u.createElement)(h.Spinner,null)," ",Object(g.__)("Creating"),"…"),(N||!n)&&!L&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(u.createElement)(Hb,{currentLink:n,className:"block-editor-link-control__search-input",placeholder:t,value:B,withCreateSuggestion:m,onCreateSuggestion:M,onChange:x,onSelect:function(e){var t;c(e),R.current=!!(null===(t=w.current)||void 0===t?void 0:t.contains(w.current.ownerDocument.activeElement)),D(!1)},showInitialSuggestions:d,allowDirectEntry:!a,showSuggestions:s,suggestionsQuery:y,withURLSuggestion:!_,createSuggestionButtonText:E},Object(u.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(u.createElement)(h.Button,{type:"submit",label:Object(g.__)("Submit"),icon:Ob.a,className:"block-editor-link-control__search-submit"})))),F&&Object(u.createElement)(h.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},F)),n&&!N&&!L&&Object(u.createElement)(Wb,{value:n,onEditClick:function(){return D(!0)}}),Object(u.createElement)(yb,{value:n,settings:r,onChange:c}))}qb.ViewerFill=Gb;var $b=qb,Yb=n(303),Xb=n(221),Qb=Object(h.withFilters)("editor.MediaUpload")((function(){return null})),Zb=function(e){var t=e.fallback,n=void 0===t?null:t,r=e.children;return Object(v.useSelect)((function(e){return!!(0,e("core/block-editor").getSettings)().mediaUpload}),[])?r:n},Jb=Object(p.compose)([Object(v.withDispatch)((function(e){var t=e("core/notices");return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(h.withFilters)("editor.MediaReplaceFlow")])((function(e){var t=e.mediaURL,n=e.mediaId,r=e.allowedTypes,o=e.accept,c=e.onSelect,i=e.onSelectURL,a=e.onFilesUpload,l=void 0===a?f.noop:a,s=e.name,d=void 0===s?Object(g.__)("Replace"):s,b=e.createNotice,p=e.removeNotice,m=Object(u.useState)(t),O=Object(oe.a)(m,2),j=O[0],y=O[1],k=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().mediaUpload}),[]),_=Object(u.createRef)(),E=Object(f.uniqueId)("block-editor/media-replace-flow/error-notice/"),w=function(e){var t=document.createElement("div");t.innerHTML=Object(u.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){b("error",n,{speak:!0,id:E,isDismissible:!0})}),1e3)},C=function(e){c(e),y(e.url),Object(Ve.speak)(Object(g.__)("The media file has been replaced")),p(E)},S=function(e){e.keyCode===xt.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(u.createElement)(h.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(u.createElement)(h.ToolbarGroup,{className:"media-replace-flow"},Object(u.createElement)(h.ToolbarButton,{ref:_,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},d))},renderContent:function(e){return e.onClose,Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(u.createElement)(Qb,{value:n,onSelect:function(e){return C(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(u.createElement)(h.MenuItem,{icon:Yb.a,onClick:t},Object(g.__)("Open Media Library"))}}),Object(u.createElement)(Zb,null,Object(u.createElement)(h.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;l(t),k({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(oe.a)(e,1)[0];C(t)},onError:w})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(u.createElement)(h.MenuItem,{icon:Xb.a,onClick:function(){t()}},Object(g.__)("Upload"))}}))),i&&Object(u.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){e.stopPropagation()},onKeyPress:function(e){e.stopPropagation()}},Object(u.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(g.__)("Current media URL:")),Object(u.createElement)($b,{value:{url:j},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;y(t),i(t),_.current.focus()}})))}})})),ef=n(202);function tf(e){var t=e.url,n=e.urlLabel,r=e.className,o=b()(r,"block-editor-url-popover__link-viewer-url");return t?Object(u.createElement)(h.ExternalLink,{className:o,href:t},n||Object(ls.filterURLForDisplay)(Object(ls.safeDecodeURI)(t))):Object(u.createElement)("span",{className:o})}function nf(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,i=e.focusOnMount,a=void 0===i?"firstElement":i,s=Object(ye.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),d=Object(u.useState)(!1),b=Object(oe.a)(d,2),f=b[0],p=b[1],m=!!r&&f;return Object(u.createElement)(h.Popover,Object(l.a)({className:"block-editor-url-popover",focusOnMount:a,position:c},s),Object(u.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(u.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(u.createElement)(h.Button,{className:"block-editor-url-popover__settings-toggle",icon:co.a,label:Object(g.__)("Link settings"),onClick:function(){p(!f)},"aria-expanded":f})),m&&Object(u.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!m&&Object(u.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}nf.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(ye.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(u.createElement)("form",Object(l.a)({className:b()("block-editor-url-popover__link-editor",n)},c),Object(u.createElement)(Cb,{value:o,onChange:r,autocompleteRef:t}),Object(u.createElement)(h.Button,{icon:Ob.a,label:Object(g.__)("Apply"),type:"submit"}))},nf.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,i=Object(ye.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(u.createElement)("div",Object(l.a)({className:b()("block-editor-url-popover__link-viewer",t)},i),Object(u.createElement)(tf,{url:o,urlLabel:c,className:n}),r&&Object(u.createElement)(h.Button,{icon:ef.a,label:Object(g.__)("Edit"),onClick:r}))};var rf=nf,of=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(u.createElement)(rf,{onClose:o},Object(u.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(u.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(g.__)("URL"),placeholder:Object(g.__)("Paste or type URL"),onChange:n,value:t}),Object(u.createElement)(h.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Ob.a,label:Object(g.__)("Apply"),type:"submit"})))},cf=Object(h.withFilters)("editor.MediaPlaceholder")((function(e){var t=e.value,n=void 0===t?{}:t,r=e.allowedTypes,o=e.className,c=e.icon,i=e.labels,a=void 0===i?{}:i,l=e.mediaPreview,s=e.notices,d=e.isAppender,p=e.accept,m=e.addToGallery,O=e.multiple,j=void 0!==O&&O,y=e.dropZoneUIOnly,k=e.disableDropZone,_=e.disableMediaButtons,E=e.onError,w=e.onSelect,C=e.onCancel,S=e.onSelectURL,I=e.onDoubleClick,x=e.onFilesPreUpload,B=void 0===x?f.noop:x,P=e.onHTMLDrop,T=void 0===P?f.noop:P,N=e.children,D=Object(v.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().mediaUpload}),[]),R=Object(u.useState)(""),A=Object(oe.a)(R,2),M=A[0],L=A[1],F=Object(u.useState)(!1),V=Object(oe.a)(F,2),H=V[0],z=V[1];Object(u.useEffect)((function(){var e;L(null!==(e=null==n?void 0:n.src)&&void 0!==e?e:"")}),[null==n?void 0:n.src]);var U=function(e){L(e.target.value)},G=function(){z(!0)},W=function(){z(!1)},K=function(e){e.preventDefault(),M&&S&&(S(M),W())},q=function(e){var t;if(B(e),j)if(m){var o=[];t=function(e){var t=(null!=n?n:[]).filter((function(e){return e.id?!o.some((function(t){var n=t.id;return Number(n)===Number(e.id)})):!o.some((function(t){var n=t.urlSlug;return e.url.includes(n)}))}));w(t.concat(e)),o=e.map((function(e){var t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else t=w;else t=function(e){var t=Object(oe.a)(e,1)[0];return w(t)};D({allowedTypes:r,filesList:e,onFileChange:t,onError:E})},$=function(e){q(e.target.files)},Y=function(e,t){var n=a.instructions,i=a.title;if(D||S||(n=Object(g.__)("To edit this block, you need permission to upload media.")),void 0===n||void 0===i){var f=null!=r?r:[],p=Object(oe.a)(f,1)[0],m=1===f.length,v=m&&"audio"===p,O=m&&"image"===p,j=m&&"video"===p;void 0===n&&D&&(n=Object(g.__)("Upload a media file or pick one from your media library."),v?n=Object(g.__)("Upload an audio file, pick one from your media library, or add one with a URL."):O?n=Object(g.__)("Upload an image file, pick one from your media library, or add one with a URL."):j&&(n=Object(g.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===i&&(i=Object(g.__)("Media"),v?i=Object(g.__)("Audio"):O?i=Object(g.__)("Image"):j&&(i=Object(g.__)("Video")))}var y=b()("block-editor-media-placeholder",o,{"is-appender":d});return Object(u.createElement)(h.Placeholder,{icon:c,label:i,instructions:n,className:y,notices:s,onClick:t,onDoubleClick:I,preview:l},e,N)},X=function(){return k?null:Object(u.createElement)(h.DropZone,{onFilesDrop:q,onHTMLDrop:T})},Q=function(){return C&&Object(u.createElement)(h.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(g.__)("Cancel"),isLink:!0,onClick:C},Object(g.__)("Cancel"))},Z=function(){return S&&Object(u.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(u.createElement)(h.Button,{className:"block-editor-media-placeholder__button",onClick:G,isPressed:H,isTertiary:!0},Object(g.__)("Insert from URL")),H&&Object(u.createElement)(of,{src:M,onChange:U,onSubmit:K,onClose:W}))};return y||_?(y&&xo()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(u.createElement)(Zb,null,X())):Object(u.createElement)(Zb,{fallback:Y(Z())},function(){var e=Object(u.createElement)(Qb,{addToGallery:m,gallery:j&&!(!r||0===r.length)&&r.every((function(e){return"image"===e||e.startsWith("image/")})),multiple:j,onSelect:w,allowedTypes:r,value:Array.isArray(n)?n.map((function(e){return e.id})):n.id,render:function(e){var t=e.open;return Object(u.createElement)(h.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(g.__)("Media Library"))}});if(D&&d)return Object(u.createElement)(u.Fragment,null,X(),Object(u.createElement)(h.FormFileUpload,{onChange:$,accept:p,multiple:j,render:function(t){var n=t.openFileDialog,r=Object(u.createElement)(u.Fragment,null,Object(u.createElement)(h.Button,{isPrimary:!0,className:b()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(g.__)("Upload")),e,Z(),Q());return Y(r,n)}}));if(D){var t=Object(u.createElement)(u.Fragment,null,X(),Object(u.createElement)(h.FormFileUpload,{isPrimary:!0,className:b()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:$,accept:p,multiple:j},Object(g.__)("Upload")),e,Z(),Q());return Y(t)}return Y(e)}())})),af=Object(u.forwardRef)((function(e,t){return Object(u.createElement)(Td,Object(l.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));af.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(ye.a)(e,["value","tagName"]);return Object(u.createElement)(o,c,n)};var lf=af,sf=Object(u.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(ye.a)(e,["__experimentalVersion"]);if(2===n)return Object(u.createElement)(lf,Object(l.a)({ref:t},r));var o=r.className,c=r.onChange,i=Object(ye.a)(r,["className","onChange"]);return Object(u.createElement)(Co.a,Object(l.a)({ref:t,className:b()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},i))}));function uf(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(p.useInstanceId)(uf),c=r||Object(g.sprintf)(
|
66 |
/* translators: 1: property name. 2: viewport name. */
|
67 |
-
Object(
|
68 |
/* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
|
69 |
-
label:Object(
|
1 |
+
window.wp=window.wp||{},window.wp.blockEditor=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=387)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.lodash},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.wp.data},,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.primitives},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(37),o=n(29),c=n(38);function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(e,t)||Object(o.a)(e,t)||Object(c.a)()}},function(e,t){e.exports=window.wp.blocks},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r))e.push(o.apply(null,r));else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.compose},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(46);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(25),o=n(36),c=n(29);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(c.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t){e.exports=window.regeneratorRuntime},function(e,t){e.exports=window.wp.keycodes},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},,function(e,t){e.exports=window.wp.richText},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(40),o=n(19);function c(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},function(e,t){e.exports=window.wp.url},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(25);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t){e.exports=window.wp.dom},function(e,t,n){e.exports=n(143)()},function(e,t){e.exports=window.wp.hooks},,function(e,t){e.exports=window.wp.deprecated},,function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n,r,o,c,i){try{var a=e[c](i),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,c){var i=e.apply(t,n);function a(e){r(i,o,c,a,l,"next",e)}function l(e){r(i,o,c,a,l,"throw",e)}a(void 0)}))}}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.keyboardShortcuts},,,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return l}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(12),o=n(57);function c(e){var t=Object(r.useRef)(e);return Object(o.a)((function(){t.current=e})),t}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.blob},function(e,t,n){"use strict";var r,o;function c(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,t.a=function(e,t){var n,l;function u(){n=o?new WeakMap:i()}function s(){var n,r,o,c,i,u=arguments.length;for(c=new Array(u),o=0;o<u;o++)c[o]=arguments[o];for(i=t.apply(null,c),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!a(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(a(r.args,c,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,c)},c[0]=null,r.args=c,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=c),l=o?function(e){var t,o,c,a,l,u=n,s=!0;for(t=0;t<e.length;t++){if(!(l=o=e[t])||"object"!=typeof l){s=!1;break}u.has(o)?u=u.get(o):(c=new WeakMap,u.set(o,c),u=c)}return u.has(r)||((a=i()).isUniqueByDependants=s,u.set(r,a)),u.get(r)}:function(){return n},s.getDependants=t,s.clear=u,u(),s}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(12),o=n(61);function c(e,t){Object(r.useDebugValue)(e);var n=Object(r.useContext)(o.a);return null!=n[e]?n[e]:t}var i=n(44),a=n(53);function l(e){var t,n,o,l=(o=e.compose,Array.isArray(o)?o:void 0!==o?[o]:[]),u=function(t,n){if(e.useOptions&&(t=e.useOptions(t,n)),e.name&&(t=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var o="use"+e+"Options";Object(r.useDebugValue)(o);var a=c(o);return a?Object(i.a)(Object(i.a)({},t),a(t,n)):t}(e.name,t,n)),e.compose)for(var o,a=Object(i.c)(l);!(o=a()).done;)t=o.value.__useOptions(t,n);return t},s=function(t,n,o){if(void 0===t&&(t={}),void 0===n&&(n={}),void 0===o&&(o=!1),o||(t=u(t,n)),e.useProps&&(n=e.useProps(t,n)),e.name&&(n=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var o="use"+e+"Props";Object(r.useDebugValue)(o);var i=c(o);return i?i(t,n):n}(e.name,t,n)),e.compose)if(e.useComposeOptions&&(t=e.useComposeOptions(t,n)),e.useComposeProps)n=e.useComposeProps(t,n);else for(var a,s=Object(i.c)(l);!(a=s()).done;)n=(0,a.value)(t,n,!0);var d={},b=n||{};for(var f in b)void 0!==b[f]&&(d[f]=b[f]);return d};s.__useOptions=u;var d=l.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return s.__keys=[].concat(d,(null===(t=e.useState)||void 0===t?void 0:t.__keys)||[],e.keys||[]),s.unstable_propsAreEqual=e.propsAreEqual||(null===(n=l[0])||void 0===n?void 0:n.unstable_propsAreEqual)||a.a,s}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(12),o=n(44),c=n(77);function i(e,t){for(var n={},r={},o=0,c=Object.keys(e);o<c.length;o++){var i=c[o];t.indexOf(i)>=0?n[i]=e[i]:r[i]=e[i]}return[n,r]}var a=n(53);function l(e){var t,n=e.as,l=e.useHook,u=e.memo,s=e.propsAreEqual,d=void 0===s?null==l?void 0:l.unstable_propsAreEqual:s,b=e.keys,f=void 0===b?(null==l?void 0:l.__keys)||[]:b,p=e.useCreateElement,m=void 0===p?c.a:p,v=function(e,t){var r=e.as,c=void 0===r?n:r,a=Object(o.b)(e,["as"]);if(l){var u,s=i(a,f),d=s[0],b=s[1],p=l(d,Object(o.a)({ref:t},b)),v=p.wrapElement,O=Object(o.b)(p,["wrapElement"]),g=(null===(u=c.render)||void 0===u?void 0:u.__keys)||c.__keys,h=g&&i(a,g)[0],j=h?Object(o.a)(Object(o.a)({},O),h):O,k=m(c,j);return v?v(k):k}return m(c,Object(o.a)({ref:t},a))};return t=v,v=Object(r.forwardRef)(t),u&&(v=function(e,t){return Object(r.memo)(e,t)}(v,d)),v.__keys=f,v.unstable_propsAreEqual=d||a.a,v}},function(e,t,n){"use strict";function r(e){return e?e.ownerDocument||e:window.document}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.a11y},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var c=0,i=n;c<i.length;c++){var a=i[c];if(e[a]!==t[a])return!1}return!0}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return e.target===e.currentTarget}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return O})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return S}));var r=n(14),o=n(12),c=n(57),i=n(59),a=n(60),l=n(62);function u(e){return e.slice().reverse()}function s(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function d(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&s(t.ref.current,e.ref.current)}))}function b(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function f(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}function p(e){for(var t,n=[[]],o=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},c=Object(r.c)(e);!(t=c()).done;)o();return n}function m(e){for(var t,n=0,o=Object(r.c)(e);!(t=o()).done;){var c=t.value.length;c>n&&(n=c)}return n}function v(e){for(var t=p(e),n=m(t),o=[],c=0;c<n;c+=1)for(var i,a=Object(r.c)(t);!(i=a()).done;){var l=i.value;l[c]&&o.push(Object(r.b)(Object(r.b)({},l[c]),{},{groupId:l[c].groupId?""+c:void 0}))}return o}function O(e){for(var t,n=[],o=Object(r.c)(e);!(t=o()).done;){var c=t.value;n.push.apply(n,c)}return n}function g(e){for(var t,n=m(e),o=Object(r.c)(e);!(t=o()).done;){var c=t.value;if(c.length<n)for(var i=0;i<n;i+=1)c[i]||(c[i]={id:"__EMPTY_ITEM__",disabled:!0,ref:{current:null},groupId:c[i-1].groupId})}return e}function h(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=b(e.items||[]))||void 0===n?void 0:n.id}var j={id:null,ref:{current:null}};function k(e,t){return e.filter((function(e){return e.groupId===t}))}var y={horizontal:"vertical",vertical:"horizontal"};function _(e,t,n){return n in e?[].concat(e.slice(0,n),[t],e.slice(n)):[].concat(e,[t])}function E(e){var t=e.slice(),n=!1;return t.sort((function(e,t){var r=e.ref.current,o=t.ref.current;return r&&o&&s(r,o)?(n=!0,-1):0})),n?t:e}function w(e,t){var n=e.unstable_virtual,o=e.rtl,c=e.orientation,i=e.items,l=e.groups,s=e.currentId,m=e.loop,C=e.wrap,S=e.pastIds,I=e.unstable_moves,B=e.initialVirtual,x=e.initialRTL,P=e.initialOrientation,T=e.initialCurrentId,N=e.initialLoop,D=e.initialWrap,A=e.hasSetCurrentId;switch(t.type){case"registerGroup":var R=t.group;if(0===l.length)return Object(r.b)(Object(r.b)({},e),{},{groups:[R]});var L=d(l,R);return Object(r.b)(Object(r.b)({},e),{},{groups:_(l,R,L)});case"unregisterGroup":var M=t.id,F=l.filter((function(e){return e.id!==M}));return F.length===l.length?e:Object(r.b)(Object(r.b)({},e),{},{groups:F});case"registerItem":var V,H=t.item,z=l.find((function(e){var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(H.ref.current)})),G=Object(r.b)({groupId:null==z?void 0:z.id},H),U=d(i,G),K=Object(r.b)(Object(r.b)({},e),{},{items:_(i,G,U)});return A||I||void 0!==T?K:Object(r.b)(Object(r.b)({},K),{},{currentId:null===(V=b(K.items))||void 0===V?void 0:V.id});case"unregisterItem":var W=t.id,q=i.filter((function(e){return e.id!==W}));if(q.length===i.length)return e;var $=S.filter((function(e){return e!==W})),Y=Object(r.b)(Object(r.b)({},e),{},{pastIds:$,items:q});if(s&&s===W){var X=h(Object(r.b)(Object(r.b)({},Y),{},{currentId:$[0]}));return Object(r.b)(Object(r.b)({},Y),{},{currentId:X})}return Y;case"move":var Q=t.id;if(void 0===Q)return e;var Z=S.filter((function(e){return e!==s&&e!==Q})),J=s?[s].concat(Z):Z,ee=Object(r.b)(Object(r.b)({},e),{},{pastIds:J});if(null===Q)return Object(r.b)(Object(r.b)({},ee),{},{unstable_moves:I+1,currentId:h(ee,Q)});var te=f(i,Q);return Object(r.b)(Object(r.b)({},ee),{},{unstable_moves:te?I+1:I,currentId:h(ee,null==te?void 0:te.id)});case"next":if(null==s)return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"first"}));var ne=o&&"vertical"!==c,re=ne?u(i):i,oe=re.find((function(e){return e.id===s}));if(!oe)return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"first"}));var ce=!!oe.groupId,ie=re.indexOf(oe),ae=re.slice(ie+1),le=k(ae,oe.groupId);if(t.allTheWay){var ue=b(ne?k(re,oe.groupId):u(le));return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==ue?void 0:ue.id}))}var se=function(e){return e&&y[e]}(ce?c||"horizontal":c),de=m&&m!==se,be=ce&&C&&C!==se,fe=t.hasNullItem||!ce&&de&&null===T;if(de){var pe=b(function(e,t,n){var r=e.findIndex((function(e){return e.id===t}));return[].concat(e.slice(r+1),n?[j]:[],e.slice(0,r))}(be&&!fe?re:k(re,oe.groupId),s,fe),s);return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==pe?void 0:pe.id}))}if(be){var me=b(fe?le:ae,s),ve=fe?(null==me?void 0:me.id)||null:null==me?void 0:me.id;return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:ve}))}var Oe=b(le,s);return w(e,!Oe&&fe?Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null}):Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==Oe?void 0:Oe.id}));case"previous":var ge=!l.length&&null===T,he=w(Object(r.b)(Object(r.b)({},e),{},{items:u(i)}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:ge}));return Object(r.b)(Object(r.b)({},he),{},{items:i});case"down":var je=v(O(g(p(i)))),ke=m&&"horizontal"!==m&&null===T,ye=w(Object(r.b)(Object(r.b)({},e),{},{orientation:"vertical",items:je}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:ke}));return Object(r.b)(Object(r.b)({},ye),{},{orientation:c,items:i});case"up":var _e=v(u(O(g(p(i))))),Ee=null===T,we=w(Object(r.b)(Object(r.b)({},e),{},{orientation:"vertical",items:_e}),Object(r.b)(Object(r.b)({},t),{},{type:"next",hasNullItem:Ee}));return Object(r.b)(Object(r.b)({},we),{},{orientation:c,items:i});case"first":var Ce=b(i);return w(e,Object(r.b)(Object(r.b)({},t),{},{type:"move",id:null==Ce?void 0:Ce.id}));case"last":var Se=w(Object(r.b)(Object(r.b)({},e),{},{items:u(i)}),Object(r.b)(Object(r.b)({},t),{},{type:"first"}));return Object(r.b)(Object(r.b)({},Se),{},{items:i});case"sort":return Object(r.b)(Object(r.b)({},e),{},{items:E(i),groups:E(l)});case"setVirtual":return Object(r.b)(Object(r.b)({},e),{},{unstable_virtual:Object(a.a)(t.virtual,n)});case"setRTL":return Object(r.b)(Object(r.b)({},e),{},{rtl:Object(a.a)(t.rtl,o)});case"setOrientation":return Object(r.b)(Object(r.b)({},e),{},{orientation:Object(a.a)(t.orientation,c)});case"setCurrentId":var Ie=h(Object(r.b)(Object(r.b)({},e),{},{currentId:Object(a.a)(t.currentId,s)}));return Object(r.b)(Object(r.b)({},e),{},{currentId:Ie,hasSetCurrentId:!0});case"setLoop":return Object(r.b)(Object(r.b)({},e),{},{loop:Object(a.a)(t.loop,m)});case"setWrap":return Object(r.b)(Object(r.b)({},e),{},{wrap:Object(a.a)(t.wrap,C)});case"reset":return Object(r.b)(Object(r.b)({},e),{},{unstable_virtual:B,rtl:x,orientation:P,currentId:h(Object(r.b)(Object(r.b)({},e),{},{currentId:T})),loop:N,wrap:D,unstable_moves:0,pastIds:[]});default:throw new Error}}function C(e){return Object(o.useCallback)(e,[])}function S(e){void 0===e&&(e={});var t=Object(i.a)(e),n=t.unstable_virtual,a=void 0!==n&&n,u=t.rtl,s=void 0!==u&&u,d=t.orientation,b=t.currentId,f=t.loop,p=void 0!==f&&f,m=t.wrap,v=void 0!==m&&m,O=Object(r.a)(t,["unstable_virtual","rtl","orientation","currentId","loop","wrap"]),g=Object(o.useReducer)(w,{unstable_virtual:a,rtl:s,orientation:d,items:[],groups:[],currentId:b,loop:p,wrap:v,unstable_moves:0,pastIds:[],initialVirtual:a,initialRTL:s,initialOrientation:d,initialCurrentId:b,initialLoop:p,initialWrap:v}),h=g[0],j=(h.pastIds,h.initialVirtual,h.initialRTL,h.initialOrientation,h.initialCurrentId,h.initialLoop,h.initialWrap,h.hasSetCurrentId,Object(r.a)(h,["pastIds","initialVirtual","initialRTL","initialOrientation","initialCurrentId","initialLoop","initialWrap","hasSetCurrentId"])),k=g[1],y=Object(o.useState)(!1),_=y[0],E=y[1],S=Object(l.a)(O),I=function(){var e=Object(o.useRef)(!1);return Object(c.a)((function(){return function(){e.current=!0}}),[]),e}();return Object(r.b)(Object(r.b)(Object(r.b)({},S),j),{},{unstable_hasActiveWidget:_,unstable_setHasActiveWidget:E,registerItem:C((function(e){I.current||k({type:"registerItem",item:e})})),unregisterItem:C((function(e){I.current||k({type:"unregisterItem",id:e})})),registerGroup:C((function(e){I.current||k({type:"registerGroup",group:e})})),unregisterGroup:C((function(e){I.current||k({type:"unregisterGroup",id:e})})),move:C((function(e){return k({type:"move",id:e})})),next:C((function(e){return k({type:"next",allTheWay:e})})),previous:C((function(e){return k({type:"previous",allTheWay:e})})),up:C((function(e){return k({type:"up",allTheWay:e})})),down:C((function(e){return k({type:"down",allTheWay:e})})),first:C((function(){return k({type:"first"})})),last:C((function(){return k({type:"last"})})),unstable_sort:C((function(){return k({type:"sort"})})),unstable_setVirtual:C((function(e){return k({type:"setVirtual",virtual:e})})),setRTL:C((function(e){return k({type:"setRTL",rtl:e})})),setOrientation:C((function(e){return k({type:"setOrientation",orientation:e})})),setCurrentId:C((function(e){return k({type:"setCurrentId",currentId:e})})),setLoop:C((function(e){return k({type:"setLoop",loop:e})})),setWrap:C((function(e){return k({type:"setWrap",wrap:e})})),reset:C((function(){return k({type:"reset"})}))})}var I=[].concat(l.a.__keys,["unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","unstable_moves","unstable_hasActiveWidget","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","unstable_sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","reset","unstable_setHasActiveWidget"]);S.__keys=I},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12),o="undefined"==typeof window?r.useEffect:r.useLayoutEffect},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(51);function o(e){return Object(r.a)(e).activeElement}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12);function o(e){return Object(r.useState)(e)[0]}},function(e,t,n){"use strict";function r(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12),o=Object(r.createContext)({})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(12),o=n(59),c=n(64);function i(e){void 0===e&&(e={});var t=Object(o.a)(e).baseId,n=Object(r.useContext)(c.a),i=Object(r.useRef)(0),a=Object(r.useState)((function(){return t||n()}));return{baseId:a[0],unstable_setBaseId:a[1],unstable_idCountRef:i}}i.__keys=["baseId","unstable_setBaseId","unstable_idCountRef"]},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12),o=Object(r.createContext)((function(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(14),o=n(50),c=n(49),i=n(53),a=Object(c.a)({name:"Box",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,o=Object(r.a)(e,["unstable_system"]),c=t.unstable_system,a=Object(r.a)(t,["unstable_system"]);return!(n!==c&&!Object(i.a)(n,c))&&Object(i.a)(o,a)}});Object(o.a)({as:"div",useHook:a})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(12);function o(e,t){void 0===t&&(t=null),e&&("function"==typeof e?e(t):e.current=t)}function c(e,t){return Object(r.useMemo)((function(){return null==e&&null==t?null:function(n){o(e,n),o(t,n)}}),[e,t])}},,,function(e,t,n){e.exports=function(e,t){var n,r,o=0;function c(){var c,i,a=n,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(i=0;i<l;i++)if(a.args[i]!==arguments[i]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(c=new Array(l),i=0;i<l;i++)c[i]=arguments[i];return a={args:c,val:e.apply(null,c)},n?(n.prev=a,a.next=n):r=a,o===t.maxSize?(r=r.prev).next=null:o++,n=a,a.val}return t=t||{},c.clear=function(){n=null,r=null,o=0},c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(58);function o(e){var t=Object(r.a)(e);if(!t)return!1;if(e.contains(t))return!0;var n=t.getAttribute("aria-activedescendant");return!(!n||n!==e.id&&!e.querySelector("#"+n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=["button","color","file","image","reset","submit"];function o(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e;return-1!==r.indexOf(t.type)}return!1}},function(e,t,n){"use strict";function r(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}function o(e,t){if("closest"in e)return e.closest(t);do{if(r(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var c=n(58),i="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function a(e){return r(e,i)&&function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}(e)}function l(e){for(;e&&!a(e);)e=o(e,i);return e}function u(e){return Object(c.a)(e)===e}function s(e,t){var n=void 0===t?{}:t,r=n.isActive,o=void 0===r?u:r,c=n.preventScroll;return o(e)?-1:(e.focus({preventScroll:c}),o(e)?-1:requestAnimationFrame((function(){e.focus({preventScroll:c})})))}},function(e,t,n){"use strict";function r(e){return!((t=e.currentTarget)===(n=e.target)||t.contains(n));var t,n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(14),o=n(50),c=n(49),i=n(66),a=n(12),l=n(67),u=n(72),s=(n(81),n(45)),d=n(57),b=n(71),f=n(74),p=n(58),m=n(73);function v(e){return"undefined"!=typeof window&&-1!==window.navigator.userAgent.indexOf(e)}var O=v("Mac")&&!v("Chrome")&&(v("Safari")||v("Firefox"));function g(e){Object(b.a)(e)||e.focus()}var h=Object(c.a)({name:"Tabbable",compose:i.a,keys:["disabled","focusable"],useOptions:function(e,t){var n=t.disabled;return Object(r.b)({disabled:n},e)},useProps:function(e,t){var n=t.ref,o=t.tabIndex,c=t.onClick,i=t.onMouseDown,b=t.style,v=Object(r.a)(t,["ref","tabIndex","onClick","onMouseDown","style"]),h=Object(a.useRef)(null),j=Object(s.a)(c),k=Object(s.a)(i),y=e.disabled&&!e.focusable,_=Object(a.useState)(!0),E=_[0],w=_[1],C=E?o:o||0,S=e.disabled?Object(r.b)({pointerEvents:"none"},b):b,I=function(){if(O){var e=Object(a.useState)(null),t=e[0],n=e[1];return Object(a.useEffect)((function(){t&&(g(t),n(null))}),[t]),Object(a.useCallback)((function(e){var t=e.currentTarget;if(!Object(f.a)(e)&&Object(u.a)(t)){var r=Object(p.a)(t);if(r){var o="BODY"===r.tagName,c=Object(m.b)(t.parentElement);r===c||o&&!c?n(t):c?c.addEventListener("focusin",(function(){return n(t)}),{once:!0}):r.addEventListener("blur",(function(){return g(t)}),{once:!0})}}}),[])}}();Object(d.a)((function(){var e,t=h.current;t&&"BUTTON"!==(e=t).tagName&&"INPUT"!==e.tagName&&"SELECT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"A"!==e.tagName&&"AUDIO"!==e.tagName&&"VIDEO"!==e.tagName&&w(!1)}),[]);var B=Object(a.useCallback)((function(t){var n;if(e.disabled)return t.stopPropagation(),void t.preventDefault();null===(n=j.current)||void 0===n||n.call(j,t)}),[e.disabled]),x=Object(a.useCallback)((function(t){var n;if(e.disabled)return t.stopPropagation(),void t.preventDefault();null===(n=k.current)||void 0===n||n.call(k,t),t.defaultPrevented||null==I||I(t)}),[e.disabled,I]);return Object(r.b)({ref:Object(l.a)(h,n),style:S,tabIndex:y?void 0:C,disabled:!(!y||!E)||void 0,"aria-disabled":!!e.disabled||void 0,onClick:B,onMouseDown:x},v)}});Object(o.a)({as:"div",useHook:h})},function(e,t){e.exports=window.wp.htmlEntities},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(12),o=n(61),c=n(44),i=function(e,t,n){void 0===n&&(n=t.children);var i=Object(r.useContext)(o.a);return i.useCreateElement?i.useCreateElement(e,t,n):"string"==typeof e&&function(e){return"function"==typeof e}(n)?(t.children,n(Object(c.b)(t,["children"]))):Object(r.createElement)(e,t,n)}},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t,n){var r;!function(o){var c=/^\s+/,i=/\s+$/,a=0,l=o.round,u=o.min,s=o.max,d=o.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t,n,r,a={r:0,g:0,b:0},l=1,d=null,b=null,f=null,p=!1,m=!1;return"string"==typeof e&&(e=function(e){e=e.replace(c,"").replace(i,"").toLowerCase();var t,n=!1;if(x[e])e=x[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=G.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=G.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=G.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=G.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=G.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=G.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=G.hex8.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),a:F(t[4]),format:n?"name":"hex8"}:(t=G.hex6.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),format:n?"name":"hex"}:(t=G.hex4.exec(e))?{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=G.hex3.exec(e))&&{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(t=e.r,n=e.g,r=e.b,a={r:255*N(t,255),g:255*N(n,255),b:255*N(r,255)},p=!0,m="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(d=L(e.s),b=L(e.v),a=function(e,t,n){e=6*N(e,360),t=N(t,100),n=N(n,100);var r=o.floor(e),c=e-r,i=n*(1-t),a=n*(1-c*t),l=n*(1-(1-c)*t),u=r%6;return{r:255*[n,a,i,i,l,n][u],g:255*[l,n,n,a,i,i][u],b:255*[i,i,l,n,n,a][u]}}(e.h,d,b),p=!0,m="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(d=L(e.s),f=L(e.l),a=function(e,t,n){var r,o,c;function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=N(e,360),t=N(t,100),n=N(n,100),0===t)r=o=c=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),c=i(l,a,e-1/3)}return{r:255*r,g:255*o,b:255*c}}(e.h,d,f),p=!0,m="hsl"),e.hasOwnProperty("a")&&(l=e.a)),l=T(l),{ok:p,format:e.format||m,r:u(255,s(a.r,0)),g:u(255,s(a.g,0)),b:u(255,s(a.b,0)),a:l}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=s(e,t,n),i=u(e,t,n),a=(c+i)/2;if(c==i)r=o=0;else{var l=c-i;switch(o=a>.5?l/(2-c-i):l/(c+i),c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,l:a}}function p(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=s(e,t,n),i=u(e,t,n),a=c,l=c-i;if(o=0===c?0:l/c,c==i)r=0;else{switch(c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,v:a}}function m(e,t,n,r){var o=[R(l(e).toString(16)),R(l(t).toString(16)),R(l(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function v(e,t,n,r){return[R(M(r)),R(l(e).toString(16)),R(l(t).toString(16)),R(l(n).toString(16))].join("")}function O(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=D(n.s),b(n)}function g(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s+=t/100,n.s=D(n.s),b(n)}function h(e){return b(e).desaturate(100)}function j(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l+=t/100,n.l=D(n.l),b(n)}function k(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=s(0,u(255,n.r-l(-t/100*255))),n.g=s(0,u(255,n.g-l(-t/100*255))),n.b=s(0,u(255,n.b-l(-t/100*255))),b(n)}function y(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l-=t/100,n.l=D(n.l),b(n)}function _(e,t){var n=b(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,b(n)}function E(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function C(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function S(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function I(e,t,n){t=t||6,n=n||30;var r=b(e).toHsl(),o=360/n,c=[b(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,c.push(b(r));return c}function B(e,t){t=t||6;for(var n=b(e).toHsv(),r=n.h,o=n.s,c=n.v,i=[],a=1/t;t--;)i.push(b({h:r,s:o,v:c})),c=(c+a)%1;return i}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var c=[R(l(e).toString(16)),R(l(t).toString(16)),R(l(n).toString(16)),R(M(r))];return o&&c[0].charAt(0)==c[0].charAt(1)&&c[1].charAt(0)==c[1].charAt(1)&&c[2].charAt(0)==c[2].charAt(1)&&c[3].charAt(0)==c[3].charAt(1)?c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0):c.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=b(e);n="#"+v(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return b(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(j,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(O,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(h,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var r=b(e).toRgb(),o=b(t).toRgb(),c=n/100;return b({r:(o.r-r.r)*c+r.r,g:(o.g-r.g)*c+r.g,b:(o.b-r.b)*c+r.b,a:(o.a-r.a)*c+r.a})},b.readability=function(e,t){var n=b(e),r=b(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},b.isReadable=function(e,t,n){var r,o,c,i,a,l=b.readability(e,t);switch(o=!1,(c=n,"AA"!==(i=((c=c||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(a=(c.size||"small").toLowerCase())&&"large"!==a&&(a="small"),r={level:i,size:a}).level+r.size){case"AAsmall":case"AAAlarge":o=l>=4.5;break;case"AAlarge":o=l>=3;break;case"AAAsmall":o=l>=7}return o},b.mostReadable=function(e,t,n){var r,o,c,i,a=null,l=0;o=(n=n||{}).includeFallbackColors,c=n.level,i=n.size;for(var u=0;u<t.length;u++)(r=b.readability(e,t[u]))>l&&(l=r,a=b(t[u]));return b.isReadable(e,a,{level:c,size:i})||!o?a:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var x=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(x);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=u(t,s(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function D(e){return u(1,s(0,e))}function A(e){return parseInt(e,16)}function R(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function M(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return A(e)/255}var V,H,z,G=(H="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",z="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r)}(Math)},,function(e,t,n){"use strict";n(97),n(12)},function(e,t,n){"use strict";function r(e){var t=void 0===e?{}:e,n=t.keyMap,r=t.onKey,o=t.stopPropagation,c=t.onKeyDown,i=t.shouldKeyDown,a=void 0===i?function(){return!0}:i,l=t.preventDefault,u=void 0===l||l;return function(e){if(n){var t,i="function"==typeof n?n(e):n,l="function"==typeof u?u(e):u,s="function"==typeof o?o(e):o;if(e.key in i){var d=i[e.key];if("function"==typeof d&&a(e))return l&&e.preventDefault(),s&&e.stopPropagation(),r&&r(e),void d(e)}c&&"current"in c?null===(t=c.current)||void 0===t||t.call(c,e):null==c||c(e)}}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(14),o=n(50),c=n(49),i=n(12),a=n(72),l=(n(81),n(45)),u=n(54),s=n(75),d=Object(c.a)({name:"Clickable",compose:s.a,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,o=e.unstable_clickOnSpace,c=void 0===o||o,i=Object(r.a)(e,["unstable_clickOnEnter","unstable_clickOnSpace"]);return Object(r.b)({unstable_clickOnEnter:n,unstable_clickOnSpace:c},i)},useProps:function(e,t){var n=t.onKeyDown,o=t.onKeyUp,c=Object(r.a)(t,["onKeyDown","onKeyUp"]),s=Object(i.useState)(!1),d=s[0],b=s[1],f=Object(l.a)(n),p=Object(l.a)(o),m=Object(i.useCallback)((function(t){var n;if(null===(n=f.current)||void 0===n||n.call(f,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Object(u.a)(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(Object(a.a)(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&b(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),v=Object(i.useCallback)((function(t){var n;if(null===(n=p.current)||void 0===n||n.call(p,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;d&&r&&(b(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,d]);return Object(r.b)({"data-active":d||void 0,onKeyDown:m,onKeyUp:v},c)}});Object(o.a)({as:"button",memo:!0,useHook:d})},function(e,t){e.exports=window.wp.notices},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(103);function o(e,t,n){return e.dispatchEvent(Object(r.a)(e,t,n))}},function(e,t,n){"use strict";function r(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){e.value=t}n.d(t,"a",(function(){return r}))},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(14),o=n(50),c=n(49),i=n(12),a=n(64),l=n(62),u=Object(c.a)({useState:l.a,keys:["id"],useOptions:function(e,t){var n=Object(i.useContext)(a.a),o=Object(i.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],c=Object(i.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),l=t.id||e.id||""+c+o;return Object(r.b)(Object(r.b)({},e),{},{id:l})},useProps:function(e,t){return Object(r.b)({id:e.id},t)}});Object(o.a)({as:"div",useHook:u})},,,,function(e,t,n){},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(51);function o(e,t,n){return e.dispatchEvent(function(e,t,n){if(void 0===n&&(n={}),"function"==typeof KeyboardEvent)return new KeyboardEvent(t,n);var o=Object(r.a)(e).createEvent("KeyboardEvent");return o.initKeyboardEvent(t,n.bubbles,n.cancelable,function(e){return Object(r.a)(e).defaultView||window}(e),n.key,n.location,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),o}(e,t,n))}},,function(e,t,n){"use strict";t.__esModule=!0;var r=n(182);t.default=r.TextareaAutosize},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(51);function o(e,t,n){var o,c;if(void 0===n&&(n={}),"function"==typeof Event)return new Event(t,n);var i=Object(r.a)(e).createEvent("Event");return i.initEvent(t,null===(o=n)||void 0===o?void 0:o.bubbles,null===(c=n)||void 0===c?void 0:c.cancelable),i}},,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return _}));var r=n(14),o=n(50),c=n(49),i=n(66),a=n(12),l=n(67),u=(n(81),n(45)),s=n(54),d=n(58),b=n(75),f=n(77),p=n(82),m=n(51),v=n(88),O=n(99),g=n(55),h="undefined"!=typeof window&&"msCrypto"in window,j="undefined"!=typeof window&&"msCrypto"in window;function k(e,t,n){var r=Object(u.a)(n);return Object(a.useCallback)((function(n){var o;if(e&&function(e){return!!Object(s.a)(e)&&!e.metaKey&&"Tab"!==e.key}(n)){var c=null==t?void 0:t.ref.current;if(c&&(Object(O.a)(c,n.type,n),n.currentTarget.contains(c)))return n.stopPropagation(),void n.preventDefault()}null===(o=r.current)||void 0===o||o.call(r,n)}),[e,t])}function y(e,t){return null==e?void 0:e.some((function(e){return!!t&&e.ref.current===t}))}var _=Object(c.a)({name:"Composite",compose:[b.a],useState:g.g,useOptions:function(e){return Object(r.b)(Object(r.b)({},e),{},{currentId:Object(g.e)(e)})},useProps:function(e,t){var n=t.ref,o=t.onFocus,c=t.onBlur,i=t.onKeyDown,b=t.onKeyUp,f=Object(r.a)(t,["ref","onFocus","onBlur","onKeyDown","onKeyUp"]),O=Object(a.useRef)(null),_=Object(g.d)(e.items,e.currentId),E=Object(a.useRef)(void 0),w=Object(u.a)(o),C=Object(u.a)(c),S=j?function(e){var t=Object(a.useRef)(null);return Object(a.useEffect)((function(){var n=Object(m.a)(e.current),r=function(e){var n=e.target;t.current=n};return n.addEventListener("focus",r,!0),function(){n.removeEventListener("focus",r,!0)}}),[]),t}(O):void 0;Object(a.useEffect)((function(){var t=O.current;t&&e.unstable_moves&&!_&&t.focus()}),[e.unstable_moves,_]);var I=k(e.unstable_virtual,_,i),B=k(e.unstable_virtual,_,b),x=Object(a.useCallback)((function(t){var n;if(e.unstable_virtual){var r,o,c=(null==S?void 0:S.current)||t.relatedTarget,i=y(e.items,c);if(Object(s.a)(t)&&!i)return null===(r=w.current)||void 0===r||r.call(w,t),void(null==_||null===(o=_.ref.current)||void 0===o||o.focus());if(i)return void t.stopPropagation()}else if(Object(s.a)(t)){var a;null===(a=e.setCurrentId)||void 0===a||a.call(e,null)}null===(n=w.current)||void 0===n||n.call(w,t)}),[e.unstable_virtual,e.items,_,e.setCurrentId]),P=Object(a.useCallback)((function(t){var n;if(e.unstable_virtual){var r,o=y(e.items,t.target),c=function(e){return h?Object(d.a)(e.target):e.relatedTarget}(t),i=y(e.items,c);if(Object(s.a)(t)&&i)return(null===(r=E.current)||void 0===r?void 0:r.ref.current)&&Object(v.a)(E.current.ref.current,"blur",t),E.current=_,void t.stopPropagation();o?E.current=_:((null==_?void 0:_.ref.current)&&Object(v.a)(_.ref.current,"blur",t),E.current=void 0)}null===(n=C.current)||void 0===n||n.call(C,t)}),[e.unstable_virtual,e.items,_]),T=Object(a.useMemo)((function(){return Object(p.a)({onKeyDown:I,stopPropagation:!0,shouldKeyDown:function(t){return Object(s.a)(t)&&null===e.currentId},keyMap:function(){var t,n="horizontal"!==e.orientation,r="vertical"!==e.orientation,o=!!(null===(t=e.groups)||void 0===t?void 0:t.length),c=e.first&&function(){return e.first()},i=e.last&&function(){return e.last()};return{ArrowUp:(o||n)&&function(){if(o){var t,n=(c=e.items,Object(g.a)(Object(g.b)(Object(g.f)(Object(g.c)(c)))));(null==n?void 0:n.id)&&(null===(t=e.move)||void 0===t||t.call(e,n.id))}else{var r;null===(r=e.last)||void 0===r||r.call(e)}var c},ArrowRight:(o||r)&&c,ArrowDown:(o||n)&&c,ArrowLeft:(o||r)&&i,Home:c,End:i,PageUp:c,PageDown:i}}})}),[I,e.currentId,e.orientation,e.groups,e.items,e.move,e.last,e.first]);return Object(r.b)({ref:Object(l.a)(O,n),id:e.baseId,onFocus:x,onBlur:P,onKeyDown:T,onKeyUp:B,"aria-activedescendant":e.unstable_virtual&&(null==_?void 0:_.id)||void 0},f)},useComposeProps:function(e,t){t=Object(i.a)(e,t,!0);var n=Object(b.a)(e,t,!0);return e.unstable_virtual||null===e.currentId?n:Object(r.b)(Object(r.b)({},t),{},{ref:n.ref})}}),E=Object(o.a)({as:"div",useHook:_,useCreateElement:function(e,t,n){return Object(f.a)(e,t,n)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return k}));var r=n(14),o=n(50),c=n(49),i=n(12),a=n(67),l=(n(81),n(45)),u=n(54),s=n(71),d=n(74),b=n(73),f=n(83),p=n(82),m=n(51),v=n(55),O=n(93),g=n(89),h=n(90);function j(e){return e.querySelector("[data-composite-item-widget]")}var k=Object(c.a)({name:"CompositeItem",compose:[f.a,O.a],useState:v.g,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return f.a.unstable_propsAreEqual(e,t);var n=e.currentId,o=e.unstable_moves,c=Object(r.a)(e,["currentId","unstable_moves"]),i=t.currentId,a=t.unstable_moves,l=Object(r.a)(t,["currentId","unstable_moves"]);if(i!==n){if(t.id===i||t.id===n)return!1}else if(o!==a)return!1;return f.a.unstable_propsAreEqual(c,l)},useOptions:function(e){return Object(r.b)(Object(r.b)({},e),{},{id:e.id,currentId:Object(v.e)(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,o=t.ref,c=t.tabIndex,f=void 0===c?0:c,v=t.onFocus,O=t.onBlur,k=t.onKeyDown,y=t.onClick,_=Object(r.a)(t,["ref","tabIndex","onFocus","onBlur","onKeyDown","onClick"]),E=Object(i.useRef)(null),w=e.id,C=e.disabled&&!e.focusable,S=e.currentId===w,I=Object(l.a)(S),B=Object(i.useRef)(!1),x=function(e){return Object(i.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),P=Object(l.a)(v),T=Object(l.a)(O),N=Object(l.a)(k),D=Object(l.a)(y),A=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&S||!(null===(n=e.items)||void 0===n?void 0:n.length);Object(i.useEffect)((function(){var t;if(w)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:w,ref:E,disabled:!!C}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,w)}}),[w,C,e.registerItem,e.unregisterItem]),Object(i.useEffect)((function(){var t=E.current;t&&e.unstable_moves&&I.current&&t.focus()}),[e.unstable_moves]);var R=Object(i.useCallback)((function(t){var n,o;if(null===(n=P.current)||void 0===n||n.call(P,t),!t.defaultPrevented&&!Object(d.a)(t)&&w&&!function(e,t){if(Object(u.a)(e))return!1;for(var n,o=Object(r.c)(t);!(n=o()).done;)if(n.value.ref.current===e.target)return!0;return!1}(t,e.items)&&(null===(o=e.setCurrentId)||void 0===o||o.call(e,w),e.unstable_virtual&&e.baseId&&Object(u.a)(t))){var c=t.target,i=Object(m.a)(c).getElementById(e.baseId);i&&(B.current=!0,Object(b.a)(i))}}),[w,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),L=Object(i.useCallback)((function(t){var n;if(e.unstable_virtual&&B.current)return B.current=!1,t.preventDefault(),void t.stopPropagation();null===(n=T.current)||void 0===n||n.call(T,t)}),[e.unstable_virtual]),M=Object(i.useCallback)((function(e){var t;if(null===(t=N.current)||void 0===t||t.call(N,e),Object(u.a)(e)&&1===e.key.length&&" "!==e.key){var n=j(e.currentTarget);if(n&&Object(g.a)(n)){n.focus();var r=e.key;window.requestAnimationFrame((function(){Object(h.a)(n,r)}))}}}),[]),F=Object(i.useMemo)((function(){return Object(p.a)({onKeyDown:M,stopPropagation:!0,shouldKeyDown:u.a,keyMap:function(){var t="horizontal"!==e.orientation,n="vertical"!==e.orientation,r=!!(null==x?void 0:x.groupId),o=function(e){var t=j(e.currentTarget);t&&Object(g.a)(t)&&Object(h.a)(t,"")},c=e.up&&function(){return e.up()},i=e.next&&function(){return e.next()},a=e.down&&function(){return e.down()},l=e.previous&&function(){return e.previous()};return{Delete:o,Backspace:o,ArrowUp:(r||t)&&c,ArrowRight:(r||n)&&i,ArrowDown:(r||t)&&a,ArrowLeft:(r||n)&&l,Home:function(t){var n,o;!r||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(o=e.previous)||void 0===o||o.call(e,!0)},End:function(t){var n,o;!r||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(o=e.next)||void 0===o||o.call(e,!0)},PageUp:function(){var t,n;r?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;r?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}}})}),[M,e.orientation,x,e.up,e.next,e.down,e.previous,e.first,e.last]),V=Object(i.useCallback)((function(e){var t;if(null===(t=D.current)||void 0===t||t.call(D,e),!e.defaultPrevented){var n=j(e.currentTarget);n&&!Object(s.a)(n)&&n.focus()}}),[]);return Object(r.b)({ref:Object(a.a)(E,o),id:w,tabIndex:A?f:-1,"aria-selected":!(!e.unstable_virtual||!S)||void 0,onFocus:R,onBlur:L,onKeyDown:F,onClick:V},_)}}),y=Object(o.a)({as:"button",memo:!0,useHook:k})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(37),o=n(36),c=n(29),i=n(38);function a(e){return Object(r.a)(e)||Object(o.a)(e)||Object(c.a)(e)||Object(i.a)()}},,function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(179)),c=r(n(180)),i=n(12),a=r(i),l=r(n(150)),u=r(n(181)),s={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(s.str(e)||s.num(e))return e===t;if(s.obj(e)&&s.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!s.und(n)||e===t}};function d(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function b(e,t){return s.und(e)||s.nul(e)?t:e}function f(e){return s.und(e)?[]:s.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return s.fun(e)?e.apply(void 0,n):e}function m(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(s.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return s.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var v,O,g=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.addChild(u(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(u(t))}))},t}return l(t,e),t}(g),j=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.addChild(u(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.removeChild(u(t))}))},t}l(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof g)&&(t[n]=r instanceof g?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(g);function k(e,t){v={fn:e,transform:t}}function y(e){O=e}var _,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function C(e){_=e}var S,I=function(){return Date.now()};function B(e){S=e}var x,P,T=function(e){return e.current};function N(e){x=e}var D=Object.freeze({get applyAnimatedValues(){return v},injectApplyAnimatedValues:k,get colorNames(){return O},injectColorNames:y,get requestFrame(){return E},get cancelFrame(){return w},injectFrame:function(e,t){E=e,w=t},get interpolation(){return _},injectStringInterpolator:C,get now(){return I},injectNow:function(e){I=e},get defaultElement(){return S},injectDefaultElement:B,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),A=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:x(t.style)}):t,r.update=n,r.attach(),r}return l(t,e),t}(j),R=!1,L=new Set,M=function e(){if(!R)return!1;var t=I(),n=L,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,l=0;l<i.configs.length;l++){for(var u=i.configs[l],s=void 0,d=void 0,b=0;b<u.animatedValues.length;b++){var f=u.animatedValues[b];if(!f.done){var p=u.fromValues[b],m=u.toValues[b],v=f.lastPosition,O=m instanceof g,h=Array.isArray(u.initialVelocity)?u.initialVelocity[b]:u.initialVelocity;if(O&&(m=m.getValue()),u.immediate)f.setValue(m),f.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==u.duration)v=p+u.easing((t-f.startTime)/u.duration)*(m-p),s=t>=f.startTime+u.duration;else if(u.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(s=Math.abs(f.lastPosition-v)<.1)&&(m=v);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:u.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),k=0;k<j;++k)v+=1*(h+=(-u.tension*(v-m)+-u.friction*h)/u.mass*1/1e3)/1e3;var y=!(!u.clamp||0===u.tension)&&(p<m?v>m:v<m),_=Math.abs(h)<=u.precision,w=0===u.tension||Math.abs(m-v)<=u.precision;s=y||_&&w,f.lastVelocity=h,f.lastTime=t}O&&!u.toValues[b].done&&(s=!1),s?(f.value!==m&&(v=m),f.done=!0):a=!0,f.setValue(v),f.lastPosition=v}else f.setValue(m),f.done=!0}}i.props.onFrame&&(i.values[u.name]=u.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(L.delete(i),i.stop(!0))}return L.size?P?P():E(e):R=!1,R};function F(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return F({range:e,output:t,extrapolate:n});if(_&&"string"==typeof e.output[0])return _(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,a,l){var u=l?l(e):e;if(u<t){if("identity"===i)return u;"clamp"===i&&(u=t)}if(u>n){if("identity"===a)return u;"clamp"===a&&(u=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t),u=c(u),r===-1/0?u=-u:o===1/0?u+=r:u=u*(o-r)+r,u)}(e,c[t],c[t+1],o[t],o[t+1],l,i,a,r.map)}}var V=function(e){function t(n,r,o){var c;return(c=e.call(this)||this).calc=void 0,c.payload=n instanceof h&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],c.calc=F(r,o),c}l(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t){this.calc=F(e,t)},n.interpolate=function(e,n){return new t(this,e,n)},t}(h),H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}l(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t){return new V(this,e,t)},t}(g),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}l(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(h),G=0,U=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,a=c(t,["delay","to"]);if(s.arr(i)||s.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var l={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:p(r,n)},a),u=l[i.delay]&&l[i.delay].to;l[i.delay]=o({},l[i.delay],i,{to:o({},u,i.to)})})),this.queue=Object.values(l)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,r=void 0===n?{}:n,c=e.to,i=void 0===c?{}:c;s.obj(r)&&(t.merged=o({},r,t.merged)),s.obj(i)&&(t.merged=o({},t.merged,i))}));var n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((function(o,i){var a=o.delay,l=c(o,["delay"]),u=function(o){i===r.length-1&&n===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=s.arr(l.to)||s.fun(l.to);a?setTimeout((function(){n===t.guid&&(d?t.runAsync(l,u):t.diff(l).start(u))}),a):d?t.runAsync(l,u):t.diff(l).start(u)}))}else s.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),R||(R=!0,E(P||M));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(s.arr(r.to))for(var l=function(e){var t=e,c=o({},r,m(r.to[t]));s.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},u=0;u<r.to.length;u++)l(u);else if(s.fun(r.to)){var d,b=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(s.arr(t.config)&&(t.config=t.config[b]),b++,i===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,a=void 0===i?{}:i,l=n.config,u=void 0===l?{}:l,d=n.reverse,m=n.attach,v=n.reset,g=n.immediate;if(d){var h=[a,c];c=h[0],a=h[1]}this.merged=o({},c,this.merged,a),this.hasChanged=!1;var j=m&&m(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],a=e[r]||{},l=s.num(i),d=s.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!O[i],m=s.arr(i),h=!l&&!m&&!d,k=s.und(c[r])?i:c[r],y=l||m||d?i:1,E=p(u,r);j&&(y=j.animations[r].parent);var w,C=a.parent,S=a.interpolation,B=f(j?y.getPayload():y),x=i;h&&(x=_({range:[0,1],output:[i,i]})(1));var P,T=S&&S.getValue(),N=!s.und(C)&&a.animatedValues.some((function(e){return!e.done})),D=!s.equ(x,T),A=!s.equ(x,a.previous),R=!s.equ(E,a.config);if(v||A&&D||R){var L;if(l||d)C=S=a.parent||new H(k);else if(m)C=S=a.parent||new z(k);else if(h){var M=a.interpolation&&a.interpolation.calc(a.parent.value);M=void 0===M||v?k:M,a.parent?(C=a.parent).setValue(0,!1):C=new H(0);var F={output:[M,i]};a.interpolation?(S=a.interpolation,a.interpolation.updateConfig(F)):S=C.interpolate(F)}return B=f(j?y.getPayload():y),w=f(C.getPayload()),v&&!h&&C.setValue(k,!1),t.hasChanged=!0,w.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=I(),e.done=!1,e.animatedStyles.clear()})),p(g,r)&&C.setValue(h?y:i,!1),o({},e,((L={})[r]=o({},a,{name:r,parent:C,interpolation:S,animatedValues:w,toValues:B,previous:x,config:E,fromValues:f(C.getValue()),immediate:p(g,r),initialVelocity:b(E.velocity,0),clamp:b(E.clamp,!1),precision:b(E.precision,.01),tension:b(E.tension,170),friction:b(E.friction,26),mass:b(E.mass,1),duration:E.duration,easing:b(E.easing,(function(e){return e})),decay:E.decay}),L))}return D?e:(h&&(C.setValue(1,!1),S.updateConfig({output:[x,x]})),C.done=!0,t.hasChanged=!0,o({},e,((P={})[r]=o({},e[r],{previous:x}),P)))}),this.animations),this.hasChanged)for(var k in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[k]=this.animations[k].interpolation,this.values[k]=this.animations[k].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),K=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=s.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new U,i=o?p(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],l=c[1];r.current=a,i.useImperativeHandle(l,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var u=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?p(e,n,t):e[n]),l||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||u(t):l||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var d=r.current.map((function(e){return e.getValues()}));return o?[d,u,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},W=0,q=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},$=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:q(t,r)},i)};function Y(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,a=function(e){return e.key!==n};(s.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof g||(t=v.transform(t)),n.payload=t,n}return l(t,e),t}(j),Q={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+J(Z,Z,Z)),te=new RegExp("rgba"+J(Z,Z,Z,Z)),ne=new RegExp("hsl"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function le(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ue(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=le(o,r,e+1/3),i=le(o,r,e),a=le(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function se(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(se(n[1])<<24|se(n[2])<<16|se(n[3])<<8|255)>>>0:(n=te.exec(t))?(se(n[1])<<24|se(n[2])<<16|se(n[3])<<8|be(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ae.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|ue(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(ue(de(n[1]),fe(n[2]),fe(n[3]))|be(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ve=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Oe=new RegExp("("+Object.keys(Q).join("|")+")","g"),ge={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","Ms","Moz","O"];function je(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).reduce((function(e,t){return he.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ge);var ke={};N((function(e){return new X(e)})),B("div"),C((function(e){var t=e.output.map((function(e){return e.replace(ve,pe)})).map((function(e){return e.replace(Oe,pe)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return F(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),y(Q),k((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),l="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var u in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(u)){var s=0===u.indexOf("--"),d=je(u,n[u],s);"float"===u&&(u="cssFloat"),s?e.style.setProperty(u,d):e.style[u]=d}for(var b in a){var f=l?b:ke[b]||(ke[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,a[b])}}),(function(e){return e}));var ye,_e,Ee=(ye=function(e){return i.forwardRef((function(t,n){var r=d(),l=i.useRef(!0),u=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=u.current;u.current=new A(e,(function(){b.current&&!1===v.fn(b.current,u.current.getAnimatedValue())&&r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){l.current=!1,u.current&&u.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,l,r)})),f(t);var p=u.current.getValue(),m=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return a.createElement(e,o({},m,{ref:function(e){return b.current=(t=e,(r=n)&&(s.fun(r)?r(t):s.obj(r)&&(r.current=t)),t);var t,r}}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(s.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=ye(n),e}),ye)}),we=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=M,t.animated=we,t.a=we,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=s.fun(e),n=K(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=s.fun(t),c=p(t),a=i.useRef(),l=K(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:p(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),u=l[0],d=l[1],b=l[2],f=i.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.current[r];return o({},e,{config:p(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&f(t)})),i.useEffect((function(){n.current=!0}),[]),r?[u,f,b]:u},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=$(r),l=a.lazy,u=void 0!==l&&l,s=(a.unique,a.reset),b=void 0!==s&&s,f=(a.enter,a.leave,a.update,a.onDestroyed),m=(a.keys,a.items,a.onFrame),v=a.onRest,O=a.onStart,g=a.ref,h=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),j=d(),k=i.useRef(!1),y=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!k.current&&new Map,forceUpdate:j});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(y.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(y.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(y.current.instances).map((function(e){return e[1]}))}}})),y.current=function(e,t){for(var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=$(t),l=a.items,u=a.keys,s=a.initial,d=a.from,b=a.enter,f=a.leave,m=a.update,v=a.trail,O=void 0===v?0:v,g=a.unique,h=a.config,j=a.order,k=void 0===j?["enter","leave","update"]:j,y=$(r),_=y.keys,E=y.items,w=o({},i.current),C=[].concat(i.deleted),S=Object.keys(w),I=new Set(S),B=new Set(u),x=u.filter((function(e){return!I.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!B.has(e.originalKey)})).map((function(e){return e.originalKey})),T=u.filter((function(e){return I.has(e)})),N=-O;k.length;)switch(k.shift()){case"enter":x.forEach((function(e,t){g&&C.find((function(t){return t.originalKey===e}))&&(C=C.filter((function(t){return t.originalKey!==e})));var r=u.indexOf(e),o=l[r],c=n&&void 0!==s?"initial":"enter";w[e]={slot:c,originalKey:e,key:g?String(e):W++,item:o,trail:N+=O,config:p(h,o,c),from:p(n&&void 0!==s?s||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];C.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=O,config:p(h,n,"leave"),to:p(f,n)})),delete w[e]}));break;case"update":T.forEach((function(e){var t=u.indexOf(e),n=l[t];w[e]=o({},w[e],{item:n,slot:"update",trail:N+=O,config:p(h,n,"update"),to:p(m,n)})}))}var D=u.map((function(e){return w[e]}));return C.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=D.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),D=[].concat(D.slice(0,t),[r],D.slice(t))})),o({},i,{changed:x.length||P.length||T.length,first:n&&0===x.length,transitions:D,current:w,deleted:C,prevProps:t})}(y.current,r),y.current.changed&&y.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,l=e.item;y.current.instances.has(a)||y.current.instances.set(a,new U);var s=y.current.instances.get(a),d=o({},h,{to:r,from:n,config:c,ref:g,onRest:function(n){y.current.mounted&&(e.destroyed&&(g||u||Y(y,a),f&&f(l)),!Array.from(y.current.instances).some((function(e){return!e[1].idle}))&&(g||u)&&y.current.deleted.length>0&&Y(y),v&&v(l,t,n))},onStart:O&&function(){return O(l,t)},onFrame:m&&function(e){return m(l,t,e)},delay:i,reset:b&&"enter"===t});s.update(d),y.current.paused||s.start()})),i.useEffect((function(){return y.current.mounted=k.current=!0,function(){y.current.mounted=k.current=!1,Array.from(y.current.instances).map((function(e){return e[1].destroy()})),y.current.instances.clear()}}),[]),y.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:y.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){s.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=K},,,,,,function(e,t,n){"use strict";e.exports=n(187)},function(e,t){e.exports=window.wp.wordcount},,,function(e,t){e.exports=window.wp.shortcode},function(e,t,n){"use strict";var r=n(6),o=n(15),c=n(0);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,a=void 0===n?24:n,l=Object(o.a)(e,["icon","size"]);return Object(c.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:a,height:a},l))}},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},,,,,,,,,,function(e,t,n){"use strict";var r=n(144);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,,,,,function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},,,,,function(e,t){e.exports=window.wp.tokenList},,,function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=c},,,,,,,,,,,function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},,,,,,,,,function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var a=n(12),l=n(31),u=n(183),s=n(184),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:s(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout((function(){return e.textarea&&u(e.textarea)})):this.textarea&&u(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),u.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),o=(t.innerRef,t.children),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),u=this.state.lineHeight,s=n&&u?u*n:null;return a.createElement("textarea",c({},l,{onChange:this.onChange,style:s?c({},r,{maxHeight:s}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&u.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(d,c({},e,{innerRef:t}))}))},function(e,t,n){var r,o;void 0===(o="function"==typeof(r=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){var t=o.get(e);t&&t.destroy()}function a(e){var t=o.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,i=null,a=function(){e.clientWidth!==r&&d()},l=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:l,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function u(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function s(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){s();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(u("scroll"),s(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(u("hidden"),s(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==r){i=r;var o=c("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=l,e.exports=t.default})?r.apply(t,[e,t]):r)||(e.exports=o)},function(e,t,n){var r=n(185);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var c=e.nodeName,i=document.createElement(c);i.innerHTML=" ","TEXTAREA"===c.toUpperCase()&&i.setAttribute("rows","1");var a=r(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),n=i.offsetHeight,l.removeChild(i)}return n}},function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=c},function(e,t,n){"use strict";var r=n(188);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,c=n.onlyScrollIfNeeded,i=n.alignWithTop,a=n.alignWithLeft,l=n.offsetTop||0,u=n.offsetLeft||0,s=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var b=r.isWindow(t),f=r.offset(e),p=r.outerHeight(e),m=r.outerWidth(e),v=void 0,O=void 0,g=void 0,h=void 0,j=void 0,k=void 0,y=void 0,_=void 0,E=void 0,w=void 0;b?(y=t,w=r.height(y),E=r.width(y),_={left:r.scrollLeft(y),top:r.scrollTop(y)},j={left:f.left-_.left-u,top:f.top-_.top-l},k={left:f.left+m-(_.left+E)+d,top:f.top+p-(_.top+w)+s},h=_):(v=r.offset(t),O=t.clientHeight,g=t.clientWidth,h={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(v.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-u,top:f.top-(v.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-l},k={left:f.left+m-(v.left+g+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+p-(v.top+O+(parseFloat(r.css(t,"borderBottomWidth"))||0))+s}),j.top<0||k.top>0?!0===i?r.scrollTop(t,h.top+j.top):!1===i?r.scrollTop(t,h.top+k.top):j.top<0?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top):c||((i=void 0===i||!!i)?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top)),o&&(j.left<0||k.left>0?!0===a?r.scrollLeft(t,h.left+j.left):!1===a?r.scrollLeft(t,h.left+k.left):j.left<0?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left):c||((a=void 0===a||!!a)?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left)))}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function c(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function i(e){return c(e)}function a(e){return c(e,!0)}function l(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,c=o.body,i=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=i.clientLeft||c.clientLeft||0,top:r-=i.clientTop||c.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=i(r),t.top+=a(r),t}var u=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),s=/^(top|right|bottom|left)$/,d="left",b=void 0;function f(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,c=n||o.defaultView.getComputedStyle(e,null);return c&&(r=c.getPropertyValue(t)||c[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(u.test(n)&&!s.test(t)){var r=e.style,o=r[d],c=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],r[d]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[d]=o,e.runtimeStyle[d]=c}return""===n?"auto":n});var m=["margin","border","padding"];function v(e,t,n){var r={},o=e.style,c=void 0;for(c in t)t.hasOwnProperty(c)&&(r[c]=o[c],o[c]=t[c]);for(c in n.call(e),t)t.hasOwnProperty(c)&&(o[c]=r[c])}function O(e,t,n){var r=0,o=void 0,c=void 0,i=void 0;for(c=0;c<t.length;c++)if(o=t[c])for(i=0;i<n.length;i++){var a;a="border"===o?o+n[i]+"Width":o+n[i],r+=parseFloat(b(e,a))||0}return r}function g(e){return null!=e&&e==e.window}var h={};function j(e,t,n){if(g(e))return"width"===t?h.viewportWidth(e):h.viewportHeight(e);if(9===e.nodeType)return"width"===t?h.docWidth(e):h.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,c=(b(e),p(e)),i=0;(null==o||o<=0)&&(o=void 0,(null==(i=b(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=c?1:-1);var a=void 0!==o||c,l=o||i;if(-1===n)return a?l-O(e,["border","padding"],r):i;if(a){var u=2===n?-O(e,["border"],r):O(e,["margin"],r);return l+(1===n?0:u)}return i+O(e,m.slice(n),r)}f(["Width","Height"],(function(e){h["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],h["viewport"+e](n))},h["viewport"+e]=function(t){var n="client"+e,r=t.document,o=r.body,c=r.documentElement[n];return"CSS1Compat"===r.compatMode&&c||o&&o[n]||c}}));var k={position:"absolute",visibility:"hidden",display:"block"};function y(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=j.apply(void 0,n):v(e,k,(function(){t=j.apply(void 0,n)})),t}function _(e,t,n){var r=n;if("object"!==(void 0===t?"undefined":o(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):b(e,t);for(var c in t)t.hasOwnProperty(c)&&_(e,c,t[c])}f(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);h["outer"+t]=function(t,n){return t&&y(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];h[e]=function(t,r){return void 0===r?t&&y(t,e,-1):t?(b(t),p(t)&&(r+=O(t,["padding","border"],n)),_(t,e,r)):void 0}})),e.exports=r({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return l(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=l(e),r={},o=void 0,c=void 0;for(c in t)t.hasOwnProperty(c)&&(o=parseFloat(_(e,c))||0,r[c]=o+t[c]-n[c]);_(e,r)}(e,t)},isWindow:g,each:f,css:_,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(g(e)){if(void 0===t)return i(e);window.scrollTo(t,a(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(g(e)){if(void 0===t)return a(e);window.scrollTo(i(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},h)},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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"}));t.a=c},,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=c},,,,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-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"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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"}));t.a=c},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=function(){"use strict";return function(e){var t={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(t,e),function(e){return function(n){return function(r){var o,c,i=t[r.type],a=n(r);if(i)for(o=0;o<i.length;o++)(c=i[o](r,e))&&e.dispatch(c);return a}}}}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.dispatch;return function(e){return function(n){return Array.isArray(n)?n.filter(Boolean).map(t):e(n)}}}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.diffChars=function(e,t,n){return o.diff(e,t,n)},t.characterDiff=void 0;var o=new(((r=n(282))&&r.__esModule?r:{default:r}).default);t.characterDiff=o},function(e,t,n){"use strict";t.match=function(e,t){return l(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var o=e.expressions.every((function(e){var n=e.feature,r=e.modifier,o=e.value,c=t[n];if(!c)return!1;switch(n){case"orientation":case"scan":return c.toLowerCase()===o.toLowerCase();case"width":case"height":case"device-width":case"device-height":o=d(o),c=d(c);break;case"resolution":o=s(o),c=s(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=u(o),c=u(c);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,c=parseInt(c,10)||0}switch(r){case"min":return c>=o;case"max":return c<=o;default:return c===o}}));return o&&!n||!o&&n}))},t.parse=l;var r=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,o=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,c=/^(?:(min|max)-)?(.+)/,i=/(em|rem|px|cm|mm|in|pt|pc)?$/,a=/(dpi|dpcm|dppx)?$/;function l(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(r),n=t[1],i=t[2],a=t[3]||"",l={};return l.inverse=!!n&&"not"===n.toLowerCase(),l.type=i?i.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],l.expressions=a.map((function(e){var t=e.match(o),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),l}))}function u(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function s(e){var t=parseFloat(e);switch(String(e).match(a)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function d(e){var t=parseFloat(e);switch(String(e).match(i)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],a=!0;return function e(d){var b=n?c(d):d,f={},p=!0,m={node:b,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){m.isRoot||(m.parent.node[m.key]=e),m.node=e,t&&(p=!1)},delete:function(e){delete m.parent.node[m.key],e&&(p=!1)},remove:function(e){l(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],e&&(p=!1)},keys:null,before:function(e){f.before=e},after:function(e){f.after=e},pre:function(e){f.pre=e},post:function(e){f.post=e},stop:function(){a=!1},block:function(){p=!1}};if(!a)return m;function v(){if("object"==typeof m.node&&null!==m.node){m.keys&&m.node_===m.node||(m.keys=i(m.node)),m.isLeaf=0==m.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){m.circular=o[e];break}}else m.isLeaf=!0,m.keys=null;m.notLeaf=!m.isLeaf,m.notRoot=!m.isRoot}v();var O=t.call(m,m.node);return void 0!==O&&m.update&&m.update(O),f.before&&f.before.call(m,m.node),p?("object"!=typeof m.node||null===m.node||m.circular||(o.push(m),v(),u(m.keys,(function(t,o){r.push(t),f.pre&&f.pre.call(m,m.node[t],t);var c=e(m.node[t]);n&&s.call(m.node,t)&&(m.node[t]=c.node),c.isLast=o==m.keys.length-1,c.isFirst=0==o,f.post&&f.post.call(m,c),r.pop()})),o.pop()),f.after&&f.after.call(m,m.node),m):m}(e).node}function c(e){if("object"==typeof e&&null!==e){var t;if(l(e))t=[];else if("[object Date]"===a(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===a(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===a(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===a(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===a(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===a(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return u(i(e),(function(n){t[n]=e[n]})),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!s.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!s.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];s.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var a=c(r);return e.push(r),t.push(a),u(i(r),(function(e){a[e]=n(r[e])})),e.pop(),t.pop(),a}return r}(this.value)};var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function a(e){return Object.prototype.toString.call(e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},u=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};u(i(r.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}}));var s=Object.hasOwnProperty||function(e,t){return t in e}},,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));t.a=c},function(e,t,n){"use strict";function r(){}function o(e,t,n,r,o){for(var c=0,i=t.length,a=0,l=0;c<i;c++){var u=t[c];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,c&&t[c-1].added){var s=t[c-1];t[c-1]=t[c],t[c]=s}}else{if(!u.added&&o){var d=n.slice(a,a+u.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),u.value=e.join(d)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(l+=u.count)}}var b=t[i-1];return i>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[i-2].value+=b.value,t.pop()),t}function c(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,u=e.length,s=1,d=l+u,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=l&&f+1>=u)return a([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*s;n<=s;n+=2){var r=void 0,d=b[n-1],f=b[n+1],p=(f?f.newPos:0)-n;d&&(b[n-1]=void 0);var m=d&&d.newPos+1<l,v=f&&0<=p&&p<u;if(m||v){if(!m||v&&d.newPos<f.newPos?(r=c(f),i.pushComponent(r.components,void 0,!0)):((r=d).newPos++,i.pushComponent(r.components,!0,void 0)),p=i.extractCommon(r,t,e,n),r.newPos+1>=l&&p+1>=u)return a(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}s++}if(r)!function e(){setTimeout((function(){if(s>d)return r();p()||e()}),0)}();else for(;s<=d;){var m=p();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,c=n.length,i=e.newPos,a=i-r,l=0;i+1<o&&a+1<c&&this.equals(t[i+1],n[a+1]);)i++,a++,l++;return l&&e.components.push({count:l}),e.newPos=i,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z"}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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"}));t.a=c},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"getColorClassName",(function(){return ve})),n.d(t,"getColorObjectByAttributeValues",(function(){return pe})),n.d(t,"getColorObjectByColorValue",(function(){return me})),n.d(t,"createCustomColorsHOC",(function(){return Vn})),n.d(t,"withColors",(function(){return Hn})),n.d(t,"__experimentalUseColors",(function(){return rr})),n.d(t,"__experimentalGetGradientClass",(function(){return ke})),n.d(t,"getGradientValueBySlug",(function(){return ye})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return _e})),n.d(t,"getGradientSlugByValue",(function(){return Ee})),n.d(t,"__experimentalUseGradient",(function(){return we})),n.d(t,"getFontSize",(function(){return tn})),n.d(t,"getFontSizeClass",(function(){return rn})),n.d(t,"getFontSizeObjectByValue",(function(){return nn})),n.d(t,"FontSizePicker",(function(){return on})),n.d(t,"withFontSizes",(function(){return lr})),n.d(t,"AlignmentToolbar",(function(){return vr})),n.d(t,"Autocomplete",(function(){return Nr})),n.d(t,"BlockAlignmentToolbar",(function(){return z})),n.d(t,"__experimentalBlockFullHeightAligmentToolbar",(function(){return Ar})),n.d(t,"__experimentalBlockAlignmentMatrixToolbar",(function(){return Rr})),n.d(t,"BlockBreadcrumb",(function(){return Mr})),n.d(t,"BlockContextProvider",(function(){return zr})),n.d(t,"BlockControls",(function(){return w})),n.d(t,"BlockColorsStyleSelector",(function(){return Wr})),n.d(t,"BlockEdit",(function(){return Yr})),n.d(t,"useBlockEditContext",(function(){return h})),n.d(t,"BlockFormatControls",(function(){return eo})),n.d(t,"BlockIcon",(function(){return xr})),n.d(t,"BlockNavigationDropdown",(function(){return Id})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return pd})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return Gd})),n.d(t,"__experimentalBlockNavigationTree",(function(){return Ed})),n.d(t,"__experimentalBlockVariationPicker",(function(){return Kd})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return $d})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return nb})),n.d(t,"ButtonBlockerAppender",(function(){return Rl})),n.d(t,"ColorPalette",(function(){return ib})),n.d(t,"ColorPaletteControl",(function(){return ab})),n.d(t,"ContrastChecker",(function(){return $e})),n.d(t,"__experimentalGradientPicker",(function(){return sb})),n.d(t,"__experimentalGradientPickerControl",(function(){return db})),n.d(t,"__experimentalGradientPickerPanel",(function(){return bb})),n.d(t,"__experimentalFontAppearanceControl",(function(){return Vt})),n.d(t,"__experimentalFontFamilyControl",(function(){return $t})),n.d(t,"__experimentalColorGradientControl",(function(){return Re})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return Ke})),n.d(t,"__experimentalImageSizeControl",(function(){return pb})),n.d(t,"InnerBlocks",(function(){return Sb})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return Cb})),n.d(t,"InspectorAdvancedControls",(function(){return ee})),n.d(t,"InspectorControls",(function(){return Je})),n.d(t,"__experimentalLinkControl",(function(){return cf})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return Zb})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return Hb})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return Vb})),n.d(t,"LineHeightControl",(function(){return At})),n.d(t,"MediaReplaceFlow",(function(){return df})),n.d(t,"MediaPlaceholder",(function(){return Of})),n.d(t,"MediaUpload",(function(){return uf})),n.d(t,"MediaUploadCheck",(function(){return sf})),n.d(t,"PanelColorSettings",(function(){return Wn})),n.d(t,"PlainText",(function(){return jf})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return yf})),n.d(t,"RichText",(function(){return zd})),n.d(t,"RichTextShortcut",(function(){return _f})),n.d(t,"RichTextToolbarButton",(function(){return Ef})),n.d(t,"__unstableRichTextInputEvent",(function(){return wf})),n.d(t,"ToolSelector",(function(){return Sf})),n.d(t,"__experimentalUnitControl",(function(){return mn})),n.d(t,"URLInput",(function(){return Lb})),n.d(t,"URLInputButton",(function(){return xf})),n.d(t,"URLPopover",(function(){return mf})),n.d(t,"__experimentalImageURLInputUI",(function(){return Df})),n.d(t,"withColorContext",(function(){return cb})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return Es})),n.d(t,"__experimentalInserterMenuExtension",(function(){return Su})),n.d(t,"__experimentalPreviewOptions",(function(){return Rf})),n.d(t,"__experimentalUseResizeCanvas",(function(){return Gf})),n.d(t,"BlockInspector",(function(){return Yf})),n.d(t,"BlockList",(function(){return Ql})),n.d(t,"__experimentalBlock",(function(){return ed})),n.d(t,"useBlockProps",(function(){return Zs})),n.d(t,"BlockMover",(function(){return es})),n.d(t,"BlockPreview",(function(){return eu})),n.d(t,"BlockSelectionClearer",(function(){return Qf})),n.d(t,"__unstableUseBlockSelectionClearer",(function(){return Xf})),n.d(t,"BlockSettingsMenu",(function(){return Ns})),n.d(t,"BlockSettingsMenuControls",(function(){return xs})),n.d(t,"BlockTitle",(function(){return Lr})),n.d(t,"BlockToolbar",(function(){return Ms})),n.d(t,"CopyHandler",(function(){return Os})),n.d(t,"__unstableUseClipboardHandler",(function(){return vs})),n.d(t,"DefaultBlockAppender",(function(){return Al})),n.d(t,"__unstableUseEditorStyles",(function(){return kp})),n.d(t,"Inserter",(function(){return Hu})),n.d(t,"__experimentalLibrary",(function(){return yp})),n.d(t,"__experimentalSearchForm",(function(){return Xo})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return Ep})),n.d(t,"MultiSelectScrollIntoView",(function(){return Cp})),n.d(t,"__unstableUseScrollMultiSelectionIntoView",(function(){return wp})),n.d(t,"NavigableToolbar",(function(){return Xu})),n.d(t,"ObserveTyping",(function(){return Bp})),n.d(t,"__unstableUseTypingObserver",(function(){return Ip})),n.d(t,"PreserveScrollInReorder",(function(){return xp})),n.d(t,"SkipToSelectedBlock",(function(){return Uf})),n.d(t,"Typewriter",(function(){return Dp})),n.d(t,"__unstableUseTypewriter",(function(){return Np})),n.d(t,"Warning",(function(){return So})),n.d(t,"WritingFlow",(function(){return Ku})),n.d(t,"__unstableUseCanvasClickRedirect",(function(){return Rp})),n.d(t,"BlockEditorProvider",(function(){return Nl})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return zf})),n.d(t,"__experimentalUseEditorFeature",(function(){return he})),n.d(t,"transformStyles",(function(){return jp})),n.d(t,"validateThemeColors",(function(){return Lp})),n.d(t,"validateThemeGradients",(function(){return Mp})),n.d(t,"__experimentalGetMatchingVariation",(function(){return Wd})),n.d(t,"storeConfig",(function(){return Bl})),n.d(t,"store",(function(){return xl})),n.d(t,"SETTINGS_DEFAULTS",(function(){return Jo}));var r={};n.r(r),n.d(r,"resetBlocks",(function(){return Vc})),n.d(r,"resetSelection",(function(){return Hc})),n.d(r,"receiveBlocks",(function(){return zc})),n.d(r,"updateBlockAttributes",(function(){return Gc})),n.d(r,"updateBlock",(function(){return Uc})),n.d(r,"selectBlock",(function(){return Kc})),n.d(r,"selectPreviousBlock",(function(){return Wc})),n.d(r,"selectNextBlock",(function(){return qc})),n.d(r,"startMultiSelect",(function(){return $c})),n.d(r,"stopMultiSelect",(function(){return Yc})),n.d(r,"multiSelect",(function(){return Xc})),n.d(r,"clearSelectedBlock",(function(){return Qc})),n.d(r,"toggleSelection",(function(){return Zc})),n.d(r,"replaceBlocks",(function(){return ei})),n.d(r,"replaceBlock",(function(){return ti})),n.d(r,"moveBlocksDown",(function(){return ri})),n.d(r,"moveBlocksUp",(function(){return oi})),n.d(r,"moveBlocksToPosition",(function(){return ci})),n.d(r,"moveBlockToPosition",(function(){return ii})),n.d(r,"insertBlock",(function(){return ai})),n.d(r,"insertBlocks",(function(){return li})),n.d(r,"__unstableSetInsertionPoint",(function(){return ui})),n.d(r,"showInsertionPoint",(function(){return si})),n.d(r,"hideInsertionPoint",(function(){return di})),n.d(r,"setTemplateValidity",(function(){return bi})),n.d(r,"synchronizeTemplate",(function(){return fi})),n.d(r,"mergeBlocks",(function(){return pi})),n.d(r,"removeBlocks",(function(){return mi})),n.d(r,"removeBlock",(function(){return vi})),n.d(r,"replaceInnerBlocks",(function(){return Oi})),n.d(r,"toggleBlockMode",(function(){return gi})),n.d(r,"startTyping",(function(){return hi})),n.d(r,"stopTyping",(function(){return ji})),n.d(r,"startDraggingBlocks",(function(){return ki})),n.d(r,"stopDraggingBlocks",(function(){return yi})),n.d(r,"enterFormattedText",(function(){return _i})),n.d(r,"exitFormattedText",(function(){return Ei})),n.d(r,"selectionChange",(function(){return wi})),n.d(r,"insertDefaultBlock",(function(){return Ci})),n.d(r,"updateBlockListSettings",(function(){return Si})),n.d(r,"updateSettings",(function(){return Ii})),n.d(r,"__unstableSaveReusableBlock",(function(){return Bi})),n.d(r,"__unstableMarkLastChangeAsPersistent",(function(){return xi})),n.d(r,"__unstableMarkNextChangeAsNotPersistent",(function(){return Pi})),n.d(r,"__unstableMarkAutomaticChange",(function(){return Ti})),n.d(r,"setNavigationMode",(function(){return Ni})),n.d(r,"setBlockMovingClientId",(function(){return Di})),n.d(r,"duplicateBlocks",(function(){return Ai})),n.d(r,"insertBeforeBlock",(function(){return Ri})),n.d(r,"insertAfterBlock",(function(){return Li})),n.d(r,"toggleBlockHighlight",(function(){return Mi})),n.d(r,"flashBlock",(function(){return Fi})),n.d(r,"setHasControlledInnerBlocks",(function(){return Vi}));var o={};n.r(o),n.d(o,"getBlockName",(function(){return $i})),n.d(o,"isBlockValid",(function(){return Yi})),n.d(o,"getBlockAttributes",(function(){return Xi})),n.d(o,"getBlock",(function(){return Qi})),n.d(o,"__unstableGetBlockWithoutInnerBlocks",(function(){return Zi})),n.d(o,"getBlocks",(function(){return Ji})),n.d(o,"__unstableGetBlockWithBlockTree",(function(){return ea})),n.d(o,"__unstableGetBlockTree",(function(){return ta})),n.d(o,"getClientIdsOfDescendants",(function(){return na})),n.d(o,"getClientIdsWithDescendants",(function(){return ra})),n.d(o,"getGlobalBlockCount",(function(){return oa})),n.d(o,"getBlocksByClientId",(function(){return ca})),n.d(o,"getBlockCount",(function(){return ia})),n.d(o,"getSelectionStart",(function(){return aa})),n.d(o,"getSelectionEnd",(function(){return la})),n.d(o,"getBlockSelectionStart",(function(){return ua})),n.d(o,"getBlockSelectionEnd",(function(){return sa})),n.d(o,"getSelectedBlockCount",(function(){return da})),n.d(o,"hasSelectedBlock",(function(){return ba})),n.d(o,"getSelectedBlockClientId",(function(){return fa})),n.d(o,"getSelectedBlock",(function(){return pa})),n.d(o,"getBlockRootClientId",(function(){return ma})),n.d(o,"getBlockParents",(function(){return va})),n.d(o,"getBlockParentsByBlockName",(function(){return Oa})),n.d(o,"getBlockHierarchyRootClientId",(function(){return ga})),n.d(o,"getLowestCommonAncestorWithSelectedBlock",(function(){return ha})),n.d(o,"getAdjacentBlockClientId",(function(){return ja})),n.d(o,"getPreviousBlockClientId",(function(){return ka})),n.d(o,"getNextBlockClientId",(function(){return ya})),n.d(o,"getSelectedBlocksInitialCaretPosition",(function(){return _a})),n.d(o,"getSelectedBlockClientIds",(function(){return Ea})),n.d(o,"getMultiSelectedBlockClientIds",(function(){return wa})),n.d(o,"getMultiSelectedBlocks",(function(){return Ca})),n.d(o,"getFirstMultiSelectedBlockClientId",(function(){return Sa})),n.d(o,"getLastMultiSelectedBlockClientId",(function(){return Ia})),n.d(o,"isFirstMultiSelectedBlock",(function(){return Ba})),n.d(o,"isBlockMultiSelected",(function(){return xa})),n.d(o,"isAncestorMultiSelected",(function(){return Pa})),n.d(o,"getMultiSelectedBlocksStartClientId",(function(){return Ta})),n.d(o,"getMultiSelectedBlocksEndClientId",(function(){return Na})),n.d(o,"getBlockOrder",(function(){return Da})),n.d(o,"getBlockIndex",(function(){return Aa})),n.d(o,"isBlockSelected",(function(){return Ra})),n.d(o,"hasSelectedInnerBlock",(function(){return La})),n.d(o,"isBlockWithinSelection",(function(){return Ma})),n.d(o,"hasMultiSelection",(function(){return Fa})),n.d(o,"isMultiSelecting",(function(){return Va})),n.d(o,"isSelectionEnabled",(function(){return Ha})),n.d(o,"getBlockMode",(function(){return za})),n.d(o,"isTyping",(function(){return Ga})),n.d(o,"isDraggingBlocks",(function(){return Ua})),n.d(o,"getDraggedBlockClientIds",(function(){return Ka})),n.d(o,"isBlockBeingDragged",(function(){return Wa})),n.d(o,"isAncestorBeingDragged",(function(){return qa})),n.d(o,"isCaretWithinFormattedText",(function(){return $a})),n.d(o,"getBlockInsertionPoint",(function(){return Ya})),n.d(o,"isBlockInsertionPointVisible",(function(){return Xa})),n.d(o,"isValidTemplate",(function(){return Qa})),n.d(o,"getTemplate",(function(){return Za})),n.d(o,"getTemplateLock",(function(){return Ja})),n.d(o,"canInsertBlockType",(function(){return tl})),n.d(o,"canInsertBlocks",(function(){return nl})),n.d(o,"getInserterItems",(function(){return il})),n.d(o,"hasInserterItems",(function(){return al})),n.d(o,"__experimentalGetAllowedBlocks",(function(){return ll})),n.d(o,"getBlockListSettings",(function(){return ul})),n.d(o,"getSettings",(function(){return sl})),n.d(o,"isLastBlockChangePersistent",(function(){return dl})),n.d(o,"__experimentalGetBlockListSettingsForBlocks",(function(){return bl})),n.d(o,"__experimentalGetParsedReusableBlock",(function(){return fl})),n.d(o,"__unstableIsLastBlockChangeIgnored",(function(){return pl})),n.d(o,"__experimentalGetLastBlockAttributeChanges",(function(){return ml})),n.d(o,"isNavigationMode",(function(){return Ol})),n.d(o,"hasBlockMovingClientId",(function(){return gl})),n.d(o,"didAutomaticChange",(function(){return hl})),n.d(o,"isBlockHighlighted",(function(){return jl})),n.d(o,"areInnerBlocksControlled",(function(){return kl})),n.d(o,"__experimentalGetActiveBlockIdByBlockNames",(function(){return yl}));var c=n(22),i=(n(84),n(8)),a=n(6),l=n(0),u=n(11),s=n.n(u),d=n(2),b=n(13),f=n(32),p=n(10),m=n(4),v=n(3),O=Object(l.createContext)({name:"",isSelected:!1,focusedElement:null,setFocusedElement:d.noop,clientId:null}),g=O.Provider;function h(){return Object(l.useContext)(O)}function j(){var e=h(),t=e.isSelected,n=e.clientId,r=e.name,o=Object(m.useSelect)((function(e){if(!t){var o=e("core/block-editor"),c=o.getBlockName,i=o.isFirstMultiSelectedBlock,a=o.getMultiSelectedBlockClientIds;return!!i(n)&&a().every((function(e){return c(e)===r}))}}),[n,t,r]);return t||o}var k=Object(v.createSlotFill)("BlockControls"),y=k.Fill,_=k.Slot,E=function(e){var t=e.controls,n=e.children;return j()?Object(l.createElement)(y,null,(function(e){var r=Object(d.isEmpty)(e)?null:e;return Object(l.createElement)(v.__experimentalToolbarContext.Provider,{value:r},Object(l.createElement)(v.ToolbarGroup,{controls:t}),n)})):null};E.Slot=function(e){var t=Object(l.useContext)(v.__experimentalToolbarContext);return Object(l.createElement)(_,Object(i.a)({},e,{fillProps:t}))};var w=E,C=n(1),S=n(7),I=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),B=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),x=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),P=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),T=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),N={type:"default"},D=Object(l.createContext)(N),A=D.Provider;function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M={left:{icon:I,title:Object(C.__)("Align left")},center:{icon:B,title:Object(C.__)("Align center")},right:{icon:x,title:Object(C.__)("Align right")},wide:{icon:P,title:Object(C.__)("Wide width")},full:{icon:T,title:Object(C.__)("Full width")}},F=["left","center","right","wide","full"],V=["wide","full"],H={isAlternate:!0},z=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?F:r,c=e.isCollapsed,i=void 0===c||c,a=Object(m.useSelect)((function(e){return{wideControlsEnabled:(0,e("core/block-editor").getSettings)().alignWide}})).wideControlsEnabled,u=void 0!==a&&a,s=Object(l.useContext)(D);if("default"!==s.type)return null;var d=s.alignments,b=void 0===d?F:d,f=o.filter((function(e){return(u||!V.includes(e))&&b.includes(e)}));if(0===f.length)return null;var p=M[t],O=M.center;return Object(l.createElement)(v.ToolbarGroup,{popoverProps:H,isCollapsed:i,icon:p?p.icon:O.icon,label:Object(C.__)("Change alignment"),controls:f.map((function(e){return L(L({},M[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var K=["left","center","right","wide","full"],W=["wide","full"];function q(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?K.filter((function(t){return e.includes(t)})):!0===e?K:[],!r||!0===e&&!n?d.without.apply(void 0,[t].concat(W)):t}var $=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=q(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0));return[r.length>0&&t.isSelected&&Object(l.createElement)(w,{key:"align-controls"},Object(l.createElement)(z,{value:t.attributes.align,onChange:function(e){var n,r;e||(null===(n=Object(p.getBlockType)(t.name).attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e=""),t.setAttributes({align:e})},controls:r})),Object(l.createElement)(e,Object(i.a)({key:"edit"},t))]}}),"withToolbarControls"),Y=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Object(m.useSelect)((function(e){return!!e("core/block-editor").getSettings().alignWide}),[]);if(void 0===r)return Object(l.createElement)(e,t);var c=q(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0),o),a=t.wrapperProps;return c.includes(r)&&(a=U(U({},a),{},{"data-align":r})),Object(l.createElement)(e,Object(i.a)({},t,{wrapperProps:a}))}}));Object(f.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(d.has)(e.attributes,["align","type"])||Object(p.hasBlockSupport)(e,"align")&&(e.attributes=U(U({},e.attributes),{},{align:{type:"string",enum:[].concat(K,[""])}})),e})),Object(f.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Y),Object(f.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",$),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return q(Object(p.getBlockSupport)(t,"align"),Object(p.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=s()("align".concat(r),e.className)),e}));var X=Object(v.createSlotFill)("InspectorAdvancedControls"),Q=X.Fill,Z=X.Slot;function J(e){var t=e.children;return h().isSelected?Object(l.createElement)(Q,null,t):null}J.slotName="InspectorAdvancedControls",J.Slot=Z;var ee=J;function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=/[\s#]/g,oe=Object(b.createHigherOrderComponent)((function(e){return function(t){return Object(p.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),Object(l.createElement)(ee,null,Object(l.createElement)(v.TextControl,{className:"html-anchor-control",label:Object(C.__)("HTML anchor"),help:Object(l.createElement)(l.Fragment,null,Object(C.__)("Enter a word or two — without spaces — to make a unique web address just for this heading, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(l.createElement)(v.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(C.__)("Learn more about anchors"))),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(re,"-"),t.setAttributes({anchor:e})},autoComplete:"off"}))):Object(l.createElement)(e,t)}}),"withInspectorControl");function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(f.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(d.has)(e.attributes,["anchor","type"])||Object(p.hasBlockSupport)(e,"anchor")&&(e.attributes=ne(ne({},e.attributes),{},{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",oe),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));var ae=Object(b.createHigherOrderComponent)((function(e){return function(t){return Object(p.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),Object(l.createElement)(ee,null,Object(l.createElement)(v.TextControl,{autoComplete:"off",label:Object(C.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(C.__)("Separate multiple classes with spaces.")}))):Object(l.createElement)(e,t)}}),"withInspectorControl");function le(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(p.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(f.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(p.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=ie(ie({},e.attributes),{},{className:{type:"string"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",ae),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=s()(e.className,n.className)),e})),Object(f.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(p.hasBlockSupport)(t,"customClassName",!0)){var r=Object(d.omit)(e,["className"]),o=Object(p.getSaveContent)(t,r),c=le(o),i=le(n),a=Object(d.difference)(i,c);a.length?e.className=a.join(" "):o&&delete e.className}return e}));var ue=n(16);Object(f.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(p.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(d.uniq)([Object(p.getBlockDefaultClassName)(t.name)].concat(Object(ue.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(p.getBlockDefaultClassName)(t.name)),e}));var se=n(9),de=n(117),be=n(79),fe=n.n(be),pe=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{color:n}},me=function(e,t){return Object(d.find)(e,{color:t})};function ve(e,t){if(e&&t)return"has-".concat(Object(d.kebabCase)(t),"-").concat(e)}var Oe={"color.palette":function(e){return void 0===e.colors?void 0:e.colors},"color.gradients":function(e){return void 0===e.gradients?void 0:e.gradients},"color.custom":function(e){return void 0===e.disableCustomColors?void 0:!e.disableCustomColors},"color.customGradient":function(e){return void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients},"typography.fontSizes":function(e){return void 0===e.fontSizes?void 0:e.fontSizes},"typography.customFontSize":function(e){return void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes},"typography.customLineHeight":function(e){return e.enableCustomLineHeight},"spacing.units":function(e){if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw"]:e.enableCustomUnits}};function ge(e,t){for(var n in t)if(t[n]!==e[n])return!1;return!0}function he(e){var t=h(),n=t.name,r=t.clientId;return Object(m.useSelect)((function(t){var o,c=t("core/block-editor"),i=c.getBlockAttributes,a=(0,c.getSettings)(),l=t(p.store).getBlockType(n),u=n,s=Object(d.get)(l,["supports","__experimentalSelector"]);if(Object(d.isObject)(s)){var b=i(r);for(var f in s)if(ge(b,s[f].attributes)){u=f;break}}var m="__experimentalFeatures.global.".concat(e),v="__experimentalFeatures.".concat(u,".").concat(e),O=null!==(o=Object(d.get)(a,v))&&void 0!==o?o:Object(d.get)(a,m);if(void 0!==O)return O;var g=Oe[e]?Oe[e](a):void 0;return void 0!==g?g:"typography.dropCap"===e||void 0}),[n,r,e])}var je=[];function ke(e){if(e)return"has-".concat(e,"-gradient-background")}function ye(e,t){var n=Object(d.find)(e,["slug",t]);return n&&n.gradient}function _e(e,t){return Object(d.find)(e,["gradient",t])}function Ee(e,t){var n=_e(e,t);return n&&n.slug}function we(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.gradientAttribute,n=void 0===t?"gradient":t,r=e.customGradientAttribute,o=void 0===r?"customGradient":r,c=h(),i=c.clientId,u=he("color.gradients")||je,s=Object(m.useSelect)((function(e){var t=(0,e("core/block-editor").getBlockAttributes)(i);return{customGradient:t[o],gradient:t[n]}}),[i,n,o]),d=s.gradient,b=s.customGradient,f=Object(m.useDispatch)("core/block-editor"),p=f.updateBlockAttributes,v=Object(l.useCallback)((function(e){var t,r,c=Ee(u,e);p(i,c?(r={},Object(a.a)(r,n,c),Object(a.a)(r,o,void 0),r):(t={},Object(a.a)(t,n,void 0),Object(a.a)(t,o,e),t))}),[u,i,p]),O=ke(d);return{gradientClass:O,gradientValue:d?ye(u,d):b,setGradient:v}}var Ce=function e(t){if(!Object(d.isObject)(t))return t;var n=Object(d.pickBy)(Object(d.mapValues)(t,e),d.identity);return Object(d.isEqual)(n,{})?void 0:n},Se=n(15);function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
|
2 |
// translators: first %s: the color name or value (e.g. red or #ff0000)
|
3 |
+
var xe=Object(C.__)("(Color: %s)"),Pe=Object(C.__)("(Gradient: %s)"),Te=["colors","disableCustomColors","gradients","disableCustomGradients"];// translators: first %s: the gradient name or value (e.g. red to green or linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)
|
4 |
+
function Ne(e){var t,n,r=e.colors,o=e.gradients,c=e.label,i=e.currentTab,a=e.colorValue,u=e.gradientValue;if("color"===i){if(a){var s=me(r,t=a),d=s&&s.name;n=Object(C.sprintf)(xe,d||t)}}else if("gradient"===i&&u){var b=_e(o,t=u),f=b&&b.name;n=Object(C.sprintf)(Pe,f||t)}return Object(l.createElement)(l.Fragment,null,c,!!t&&Object(l.createElement)(v.ColorIndicator,{colorValue:t,"aria-label":n}))}function De(e){var t=e.colors,n=e.gradients,r=e.disableCustomColors,o=e.disableCustomGradients,c=e.className,a=e.label,u=e.onColorChange,b=e.onGradientChange,f=e.colorValue,p=e.gradientValue,m=e.clearable,O=u&&(!Object(d.isEmpty)(t)||!r),g=b&&(!Object(d.isEmpty)(n)||!o),h=Object(l.useState)(p?"gradient":!!O&&"color"),j=Object(se.a)(h,2),k=j[0],y=j[1];return O||g?Object(l.createElement)(v.BaseControl,{className:s()("block-editor-color-gradient-control",c)},Object(l.createElement)("fieldset",null,Object(l.createElement)("legend",null,Object(l.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},Object(l.createElement)(v.BaseControl.VisualLabel,null,Object(l.createElement)(Ne,{currentTab:k,label:a,colorValue:f,gradientValue:p})))),O&&g&&Object(l.createElement)(v.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},Object(l.createElement)(v.Button,{isSmall:!0,isPressed:"color"===k,onClick:function(){return y("color")}},Object(C.__)("Solid")),Object(l.createElement)(v.Button,{isSmall:!0,isPressed:"gradient"===k,onClick:function(){return y("gradient")}},Object(C.__)("Gradient"))),("color"===k||!g)&&Object(l.createElement)(v.ColorPalette,Object(i.a)({value:f,onChange:g?function(e){u(e),b()}:u},{colors:t,disableCustomColors:r},{clearable:m})),("gradient"===k||!O)&&Object(l.createElement)(v.__experimentalGradientPicker,Object(i.a)({value:p,onChange:O?function(e){b(e),u()}:b},{gradients:n,disableCustomGradients:o},{clearable:m})))):null}function Ae(e){var t={};return t.colors=he("color.palette"),t.gradients=he("color.gradients"),t.disableCustomColors=!he("color.custom"),t.disableCustomGradients=!he("color.customGradient"),Object(l.createElement)(De,Be(Be({},t),e))}var Re=function(e){return Object(d.every)(Te,(function(t){return e.hasOwnProperty(t)}))?Object(l.createElement)(De,e):Object(l.createElement)(Ae,e)};function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
|
5 |
// translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
|
6 |
+
var Fe=Object(C.__)("(%s: color %s)"),Ve=Object(C.__)("(%s: gradient %s)"),He=["colors","disableCustomColors","gradients","disableCustomGradients"],ze=function(e){var t=e.colors,n=e.gradients;return e.settings.map((function(e,r){var o,c=e.colorValue,i=e.gradientValue,a=e.label,u=e.colors,s=e.gradients;if(!c&&!i)return null;if(c){var d=me(u||t,c);o=Object(C.sprintf)(Fe,a.toLowerCase(),d&&d.name||c)}else{var b=_e(s||n,c);o=Object(C.sprintf)(Ve,a.toLowerCase(),b&&b.name||i)}return Object(l.createElement)(v.ColorIndicator,{key:r,colorValue:c||i,"aria-label":o})}))},Ge=function(e){var t=e.className,n=e.colors,r=e.gradients,o=e.disableCustomColors,c=e.disableCustomGradients,a=e.children,u=e.settings,b=e.title,f=Object(Se.a)(e,["className","colors","gradients","disableCustomColors","disableCustomGradients","children","settings","title"]);if(Object(d.isEmpty)(n)&&Object(d.isEmpty)(r)&&o&&c&&Object(d.every)(u,(function(e){return Object(d.isEmpty)(e.colors)&&Object(d.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)})))return null;var p=Object(l.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},b,Object(l.createElement)(ze,{colors:n,gradients:r,settings:u}));return Object(l.createElement)(v.PanelBody,Object(i.a)({className:s()("block-editor-panel-color-gradient-settings",t),title:p},f),u.map((function(e,t){return Object(l.createElement)(Re,Object(i.a)({key:t},Me({colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:c},e)))})),a)},Ue=function(e){var t={};return t.colors=he("color.palette"),t.gradients=he("color.gradients"),t.disableCustomColors=!he("color.custom"),t.disableCustomGradients=!he("color.customGradient"),Object(l.createElement)(Ge,Me(Me({},t),e))},Ke=function(e){return Object(d.every)(He,(function(t){return e.hasOwnProperty(t)}))?Object(l.createElement)(Ge,e):Object(l.createElement)(Ue,e)},We=n(52);// translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
|
7 |
+
function qe(e){var t=e.tinyBackgroundColor,n=e.tinyTextColor,r=e.backgroundColor,o=e.textColor,c=t.getBrightness()<n.getBrightness()?Object(C.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):Object(C.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return Object(l.useEffect)((function(){Object(We.speak)(Object(C.__)("This color combination may be hard for people to read."))}),[r,o]),Object(l.createElement)("div",{className:"block-editor-contrast-checker"},Object(l.createElement)(v.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},c))}var $e=function(e){var t=e.backgroundColor,n=e.fallbackBackgroundColor,r=e.fallbackTextColor,o=e.fontSize,c=e.isLargeText,i=e.textColor;if(!t&&!n||!i&&!r)return null;var a=fe()(t||n),u=fe()(i||r);return 1!==a.getAlpha()||1!==u.getAlpha()||fe.a.isReadable(a,u,{level:"AA",size:c||!1!==c&&o>=24?"large":"small"})?null:Object(l.createElement)(qe,{backgroundColor:t,textColor:i,tinyBackgroundColor:a,tinyTextColor:u})},Ye=Object(v.createSlotFill)("InspectorControls"),Xe=Ye.Fill,Qe=Ye.Slot;function Ze(e){var t=e.children;return j()?Object(l.createElement)(Xe,null,t):null}Ze.Slot=Qe;var Je=Ze;function et(e,t){return t.getElementById("block-"+e)}function tt(e,t){return t.closest(".block-editor-block-list__block")===e}function nt(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(e){var t=e.closest(".block-editor-block-list__block");if(t)return t.id.slice("block-".length)}}function rt(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function ot(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,c=Object(l.useState)(),i=Object(se.a)(c,2),a=i[0],u=i[1],s=Object(l.useState)(),d=Object(se.a)(s,2),b=d[0],f=d[1];return Object(l.useEffect)((function(){if(o){var e=et(n,document);if(e){f(rt(e).color);for(var t=e,r=rt(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)r=rt(t=t.parentNode).backgroundColor;u(r)}}})),Object(l.createElement)(Je,null,Object(l.createElement)(Ke,{title:Object(C.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(l.createElement)($e,{backgroundColor:a,textColor:b})))}function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var at=[],lt=function(e){var t=Object(p.getBlockSupport)(e,"color");return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},ut=function(e){if("web"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.link},st=function(e){if("web"!==l.Platform.OS)return!1;var t=Object(p.getBlockSupport)(e,"color");return Object(d.isObject)(t)&&!!t.gradients},dt=function(e){var t=Object(p.getBlockSupport)(e,"color");return t&&!1!==t.text};function bt(e,t,n){var r,o,c,i,l,u;if(!lt(t))return e;var d=st(t),b=n.backgroundColor,f=n.textColor,p=n.gradient,m=n.style,v=ve("background-color",b),O=ke(p),g=ve("color",f),h=s()(e.className,g,O,(u={},Object(a.a)(u,v,!(d&&(null==m||null===(r=m.color)||void 0===r?void 0:r.gradient)||!v)),Object(a.a)(u,"has-text-color",f||(null==m||null===(o=m.color)||void 0===o?void 0:o.text)),Object(a.a)(u,"has-background",b||(null==m||null===(c=m.color)||void 0===c?void 0:c.background)||d&&(p||(null==m||null===(i=m.color)||void 0===i?void 0:i.gradient))),Object(a.a)(u,"has-link-color",null==m||null===(l=m.color)||void 0===l?void 0:l.link),u));return e.className=h||void 0,e}var ft=function(e,t){var n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?pe(e,n[1]).color:t};function pt(e){var t,n,r,o,c,i,u=e.name,s=e.attributes,d=he("color.link"),b=he("color.palette")||at,f=he("color.gradients")||at,m=Object(l.useRef)(s);if(Object(l.useEffect)((function(){m.current=s}),[s]),!lt(u)||"web"!==l.Platform.OS)return null;var v,O,g,h=(v=u,(O=Object(p.getBlockSupport)(v,"color"))&&!1!==O.background),j=st(u),k=s.style,y=s.textColor,_=s.backgroundColor,E=s.gradient;if(j&&E)g=ye(f,E);else if(j){var w;g=null==k||null===(w=k.color)||void 0===w?void 0:w.gradient}var S=function(t){return function(n){var r,o,c=me(b,n),i=t+"Color",l=it(it({},m.current.style),{},{color:it(it({},null===(r=m.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color),{},Object(a.a)({},t,(null==c?void 0:c.slug)?void 0:n))}),u=(null==c?void 0:c.slug)?c.slug:void 0,s=Object(a.a)({style:Ce(l)},i,u);e.setAttributes(s),m.current=it(it({},m.current),s)}};return Object(l.createElement)(ot,{enableContrastChecking:"web"===l.Platform.OS&&!E&&!(null==k||null===(t=k.color)||void 0===t?void 0:t.gradient),clientId:e.clientId,settings:[].concat(Object(ue.a)(dt(u)?[{label:Object(C.__)("Text Color"),onColorChange:S("text"),colorValue:pe(b,y,null==k||null===(n=k.color)||void 0===n?void 0:n.text).color}]:[]),Object(ue.a)(h||j?[{label:Object(C.__)("Background Color"),onColorChange:h?S("background"):void 0,colorValue:pe(b,_,null==k||null===(r=k.color)||void 0===r?void 0:r.background).color,gradientValue:g,onGradientChange:j?function(t){var n,r=Ee(f,t);if(r){var o,c,i,a=it(it({},null===(o=m.current)||void 0===o?void 0:o.style),{},{color:it(it({},null===(c=m.current)||void 0===c||null===(i=c.style)||void 0===i?void 0:i.color),{},{gradient:void 0})});n={style:Ce(a),gradient:r}}else{var l,u,s,d=it(it({},null===(l=m.current)||void 0===l?void 0:l.style),{},{color:it(it({},null===(u=m.current)||void 0===u||null===(s=u.style)||void 0===s?void 0:s.color),{},{gradient:t})});n={style:Ce(d),gradient:void 0}}e.setAttributes(n),m.current=it(it({},m.current),n)}:void 0}]:[]),Object(ue.a)(d&&ut(u)?[{label:Object(C.__)("Link Color"),onColorChange:function(t){var n,r=me(b,t);e.setAttributes({style:it(it({},e.attributes.style),{},{color:it(it({},null===(n=e.attributes.style)||void 0===n?void 0:n.color),{},{link:(null==r?void 0:r.slug)?"var:preset|color|".concat(r.slug):t})})})},colorValue:ft(b,null==k||null===(o=k.color)||void 0===o?void 0:o.link),clearable:!!(null===(c=e.attributes.style)||void 0===c||null===(i=c.color)||void 0===i?void 0:i.link)}]:[]))})}var mt=Object(b.createHigherOrderComponent)((function(e){return function(t){var n,r,o,c=t.name,a=t.attributes,u=a.backgroundColor,s=a.textColor,d=he("color.palette")||at;if(!lt(c))return Object(l.createElement)(e,t);var b={color:s?null===(n=pe(d,s))||void 0===n?void 0:n.color:void 0,backgroundColor:u?null===(r=pe(d,u))||void 0===r?void 0:r.color:void 0},f=t.wrapperProps;return f=it(it({},t.wrapperProps),{},{style:it(it({},b),null===(o=t.wrapperProps)||void 0===o?void 0:o.style)}),Object(l.createElement)(e,Object(i.a)({},t,{wrapperProps:f}))}}));Object(f.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return lt(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),st(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",bt),Object(f.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!lt(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),bt(r,e,n)},e})),Object(f.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",mt);var vt=n(278),Ot=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"}));function gt(e){var t=e.value,n=e.textDecorations,r=e.onChange,o={strikethrough:vt.a,underline:Ot};return Object(l.createElement)("fieldset",{className:"block-editor-text-decoration-control"},Object(l.createElement)("legend",null,Object(C.__)("Decoration")),Object(l.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},n.map((function(e){return Object(l.createElement)(v.Button,{key:e.slug,icon:o[e.slug],isSmall:!0,isPressed:t===e.slug,onClick:function(){return function(e){var o=t===e?void 0:e,c=n.find((function(e){return e.slug===o})),i=c?"var:preset|text-decoration|".concat(c.slug):void 0;r(i)}(e.slug)}},!o[e.slug]&&e.name)}))))}function ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ht(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ht(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kt(e){var t,n=e.attributes.style,r=e.setAttributes,o=he("typography.textDecorations");if(yt(e))return null;var c=_t(o,null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration);return Object(l.createElement)(gt,{value:c,textDecorations:o,onChange:function(e){r({style:Ce(jt(jt({},n),{},{typography:jt(jt({},null==n?void 0:n.typography),{},{textDecoration:e})}))})}})}function yt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextDecoration"),r=he("typography.textDecorations"),o=!!(null==r?void 0:r.length);return n||!o}var _t=function(e,t){var n,r=/var:preset\|text-decoration\|(.+)/.exec(t);return r&&r[1]?null===(n=e.find((function(e){return e.slug===r[1]})))||void 0===n?void 0:n.slug:t},Et=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})),wt=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M10.8 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.1-.4-.3-.9-.4-1.6-.4-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.3 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.5.1-.7 0-.8-.1zM9.1 16c-.2.3-.5.6-.9.8-.4.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.5-3.9c-.3-.6-.7-1.1-1.2-1.5-.5-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1 0-.6-.2-1.3-.5-1.9zm-1.6 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.5-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),Ct=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"}));function St(e){var t=e.value,n=e.textTransforms,r=e.onChange,o={capitalize:Et,lowercase:wt,uppercase:Ct};return Object(l.createElement)("fieldset",{className:"block-editor-text-transform-control"},Object(l.createElement)("legend",null,Object(C.__)("Letter case")),Object(l.createElement)("div",{className:"block-editor-text-transform-control__buttons"},n.map((function(e){return Object(l.createElement)(v.Button,{key:e.slug,icon:o[e.slug],isSmall:!0,isPressed:t===e.slug,onClick:function(){return function(e){var o=t===e?void 0:e,c=n.find((function(e){return e.slug===o})),i=c?"var:preset|text-transform|".concat(c.slug):void 0;r(i)}(e.slug)}},!o[e.slug]&&e.name)}))))}function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?It(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xt(e){var t,n=e.attributes.style,r=e.setAttributes,o=he("typography.textTransforms");if(Pt(e))return null;var c=Tt(o,null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform);return Object(l.createElement)(St,{value:c,textTransforms:o,onChange:function(e){r({style:Ce(Bt(Bt({},n),{},{typography:Bt(Bt({},null==n?void 0:n.typography),{},{textTransform:e})}))})}})}function Pt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!Object(p.hasBlockSupport)(t,"__experimentalTextTransform"),r=he("typography.textTransforms"),o=!!(null==r?void 0:r.length);return n||!o}var Tt=function(e,t){var n,r=/var:preset\|text-transform\|(.+)/.exec(t);return r&&r[1]?null===(n=e.find((function(e){return e.slug===r[1]})))||void 0===n?void 0:n.slug:t};function Nt(e){var t=!yt(e),n=!Pt(e);return t||n?Object(l.createElement)("div",{className:"block-editor-text-decoration-and-transform"},t&&Object(l.createElement)(kt,e),n&&Object(l.createElement)(xt,e)):null}var Dt=n(18);function At(e){var t=e.value,n=e.onChange,r=function(e){return void 0!==e&&""!==e}(t),o=r?t:"";return Object(l.createElement)("div",{className:"block-editor-line-height-control"},Object(l.createElement)(v.TextControl,{autoComplete:"off",onKeyDown:function(e){e.keyCode!==Dt.ZERO||r||(e.preventDefault(),n("0"))},onChange:function(e){if(r)n(e);else{var t=e;switch(e){case"".concat(.1):t=1.6;break;case"0":t=1.4}n(t)}},label:Object(C.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}function Rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rt(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mt(e){var t,n=e.attributes.style;return Ft(e)?null:Object(l.createElement)(At,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:function(t){var r=Lt(Lt({},n),{},{typography:Lt(Lt({},null==n?void 0:n.typography),{},{lineHeight:t})});e.setAttributes({style:Ce(r)})}})}function Ft(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=!he("typography.customLineHeight");return!Object(p.hasBlockSupport)(t,"lineHeight")||n}function Vt(e){var t=e.onChange,n=e.options,r=n.fontStyles,o=void 0===r?[]:r,c=n.fontWeights,i=void 0===c?[]:c,a=e.value,u=a.fontStyle,s=a.fontWeight,d=!!o.length,b=!!i.length,f=d||b,p={key:"default",name:Object(C.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},m=Object(l.useMemo)((function(){return d&&b?(e=[p],o.forEach((function(t){var n=t.name,r=t.slug;i.forEach((function(t){var o=t.name,c=t.slug,i="normal"===r?o:Object(C.sprintf)(
|
8 |
+
/* translators: 1: Font weight name. 2: Font style name. */
|
9 |
+
Object(C.__)("%1$s %2$s"),o,n);e.push({key:"".concat(c,"-").concat(r),name:i,style:{fontStyle:r,fontWeight:c}})}))})),e):d?function(){var e=[p];return o.forEach((function(t){var n=t.name,r=t.slug;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e}():function(){var e=[p];return i.forEach((function(t){var n=t.name,r=t.slug;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e}();var e}),[e.options]),O=m.find((function(e){return e.style.fontStyle===u&&e.style.fontWeight===s}));return Object(l.createElement)("fieldset",{className:"components-font-appearance-control"},f&&Object(l.createElement)(v.CustomSelectControl,{className:"components-font-appearance-control__select",label:d?b?Object(C.__)("Appearance"):Object(C.__)("Font style"):Object(C.__)("Font weight"),options:m,value:O,onChange:function(e){var n=e.selectedItem;return t(n.style)}}))}function Ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ht(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ht(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gt(e){var t,n,r=e.attributes.style,o=e.setAttributes,c=he("typography.fontStyles"),i=he("typography.fontWeights"),a=Ut(e),u=Kt(e);if(a&&u)return null;var s=qt(c,null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle),d=qt(i,null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight);return Object(l.createElement)(Vt,{onChange:function(e){var t=c.find((function(t){return t.slug===e.fontStyle})),n=t?"var:preset|font-style|".concat(t.slug):void 0,a=i.find((function(t){return t.slug===e.fontWeight})),l=a?"var:preset|font-weight|".concat(a.slug):void 0;o({style:Ce(zt(zt({},r),{},{typography:zt(zt({},null==r?void 0:r.typography),{},{fontStyle:n,fontWeight:l})}))})},options:{fontStyles:a?void 0:c,fontWeights:u?void 0:i},value:{fontStyle:s,fontWeight:d}})}function Ut(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontStyle"),r=he("typography.fontStyles");return!n||!(null==r?void 0:r.length)}function Kt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(p.hasBlockSupport)(t,"__experimentalFontWeight"),r=he("typography.fontWeights");return!n||!(null==r?void 0:r.length)}function Wt(e){var t=Ut(e),n=Kt(e);return t&&n}var qt=function(e,t){if(t){var n=t.slice(t.lastIndexOf("|")+1),r=e.find((function(e){return e.slug===n}));return(null==r?void 0:r.slug)||t}};function $t(e){var t=e.value,n=void 0===t?"":t,r=e.onChange,o=e.fontFamilies,c=Object(Se.a)(e,["value","onChange","fontFamilies"]),a=he("typography.fontFamilies");if(o||(o=a),Object(d.isEmpty)(o))return null;var u=[{value:"",label:Object(C.__)("Default")}].concat(Object(ue.a)(o.map((function(e){var t=e.fontFamily;return{value:t,label:e.name||t}}))));return Object(l.createElement)(v.SelectControl,Object(i.a)({label:Object(C.__)("Font family"),options:u,value:n,onChange:r,labelPosition:"top"},c))}function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yt(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qt(e){var t,n=e.name,r=e.setAttributes,o=e.attributes.style,c=void 0===o?{}:o,i=he("typography.fontFamilies");if(Zt({name:n}))return null;var a=function(e,t){var n=/var:preset\|font-family\|(.+)/.exec(t);return n&&n[1]?Object(d.find)(e,(function(e){return e.slug===n[1]})).fontFamily:t}(i,null===(t=c.typography)||void 0===t?void 0:t.fontFamily);return Object(l.createElement)($t,{className:"block-editor-hooks-font-family-control",fontFamilies:i,value:a,onChange:function(e){var t=Object(d.find)(i,(function(t){return t.fontFamily===e}));r({style:Ce(Xt(Xt({},c),{},{typography:Xt(Xt({},c.typography||{}),{},{fontFamily:t?"var:preset|font-family|".concat(t.slug):e||void 0})}))})}})}function Zt(e){var t=e.name,n=he("typography.fontFamilies");return!n||0===n.length||!Object(p.hasBlockSupport)(t,"__experimentalFontFamily")}var Jt=n(155),en=n.n(Jt),tn=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{size:n}};function nn(e,t){return Object(d.find)(e,{size:t})||{size:t}}function rn(e){if(e)return"has-".concat(Object(d.kebabCase)(e),"-font-size")}var on=function(e){var t=he("typography.fontSizes"),n=!he("typography.customFontSize");return Object(l.createElement)(v.FontSizePicker,Object(i.a)({},e,{fontSizes:t,disableCustomFontSizes:n}))};function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ln(e,t,n){if(!Object(p.hasBlockSupport)(t,"fontSize"))return e;var r=new en.a(e.className);r.add(rn(n.fontSize));var o=r.value;return e.className=o||void 0,e}function un(e){var t,n=e.attributes,r=n.fontSize,o=n.style,c=e.setAttributes,i=sn(e),a=he("typography.fontSizes");if(i)return null;var u=tn(a,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize);return Object(l.createElement)(on,{value:u.size,onChange:function(e){var t=nn(a,e).slug;c({style:Ce(an(an({},o),{},{typography:an(an({},null==o?void 0:o.typography),{},{fontSize:t?void 0:e})})),fontSize:t})}})}function sn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=he("typography.fontSizes"),r=!!(null==n?void 0:n.length);return!Object(p.hasBlockSupport)(t,"fontSize")||!r}var dn=Object(b.createHigherOrderComponent)((function(e){return function(t){var n,r=he("typography.fontSizes"),o=t.name,c=t.attributes,i=c.fontSize,a=c.style,u=t.wrapperProps,s=an({},t);if(Object(p.hasBlockSupport)(o,"fontSize")&&i&&!(null==a||null===(n=a.typography)||void 0===n?void 0:n.fontSize)){var d,b=tn(r,i,null==a||null===(d=a.typography)||void 0===d?void 0:d.fontSize).size;s.wrapperProps=an(an({},u),{},{style:an({fontSize:b},null==u?void 0:u.style)})}return Object(l.createElement)(e,s)}}),"withFontSizeInlineStyles");Object(f.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Object(p.hasBlockSupport)(e,"fontSize")?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",ln),Object(f.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Object(p.hasBlockSupport)(e,"fontSize"))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),ln(r,e,n)},e})),Object(f.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",dn);var bn=["lineHeight","fontSize","__experimentalFontStyle","__experimentalFontWeight","__experimentalFontFamily","__experimentalTextDecoration","__experimentalTextTransform"];function fn(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[Wt(e),sn(e),Ft(e),Zt(e),yt(e),Pt(e)];return t.filter(Boolean).length===t.length}(e),n=pn(e.name);return t||!n?null:Object(l.createElement)(Je,null,Object(l.createElement)(v.PanelBody,{title:Object(C.__)("Typography")},Object(l.createElement)(Qt,e),Object(l.createElement)(un,e),Object(l.createElement)(Gt,e),Object(l.createElement)(Mt,e),Object(l.createElement)(Nt,e)))}var pn=function(e){return"web"===l.Platform.OS&&bn.some((function(t){return Object(p.hasBlockSupport)(e,t)}))};function mn(e){var t=e.units,n=Object(Se.a)(e,["units"]),r=vn(t);return Object(l.createElement)(v.__experimentalUnitControl,Object(i.a)({units:r},n))}function vn(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.filter((function(t){return e.includes(t.value)}))}(he("spacing.units")||[],e);return 0!==t.length&&t}function On(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?On(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):On(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hn(e){var t,n=e.name,r=e.attributes.style,o=e.setAttributes,c=vn();return function(e){var t=Object(p.getBlockSupport)(e,"spacing");return t&&!1!==t.padding}(n)?l.Platform.select({web:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:function(e){var t=gn(gn({},r),{},{spacing:{padding:e}});o({style:Ce(t)})},onChangeShowVisualizer:function(e){var t=gn(gn({},r),{},{visualizers:{padding:e}});o({style:Ce(t)})},label:Object(C.__)("Padding"),units:c})),native:null}):null}function jn(e){var t=e.children,n=Object(Se.a)(e,["children"]);return he("spacing.customPadding")?Object(l.createElement)(Je,n,Object(l.createElement)(v.PanelBody,{title:Object(C.__)("Spacing")},t)):null}function kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kn(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _n=[].concat(Object(ue.a)(bn),["color","spacing"]),En=function(e){return _n.some((function(t){return Object(p.hasBlockSupport)(e,t)}))};function wn(e){if(Object(d.startsWith)(e,"var:")){var t=e.slice("var:".length).split("|").join("--");return"var(--wp--".concat(t,")")}return e}function Cn(e,t,n){if(!En(t))return e;var r=n.style;return e.style=yn(yn({},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=Object(d.mapValues)(p.__EXPERIMENTAL_STYLE_PROPERTY,(function(e){return e.value}));return Object.entries(n).forEach((function(n){var r=Object(de.a)(n),o=r[0],c=r.slice(1),i=Object(se.a)(c,1)[0];Object(d.has)(e,i)&&(t[o]=wn(Object(d.get)(e,i)))})),t}(r)),e.style),e}var Sn=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Object(p.hasBlockSupport)(n,"spacing");return[Object(l.createElement)(fn,Object(i.a)({key:"typography"},t)),Object(l.createElement)(pt,Object(i.a)({key:"colors"},t)),Object(l.createElement)(e,Object(i.a)({key:"edit"},t)),r&&Object(l.createElement)(jn,{key:"spacing"},Object(l.createElement)(hn,t))]}}),"withToolbarControls");Object(f.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return En(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Cn),Object(f.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!En(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),Cn(r,e,n)},e})),Object(f.addFilter)("editor.BlockEdit","core/style/with-block-controls",Sn);var In=n(23),Bn=n(24),xn=n(19),Pn=n(26),Tn=n(27),Nn=n(20);function Dn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function An(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dn(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Rn=[],Ln=function(e){return Object(b.createHigherOrderComponent)((function(t){return function(n){return Object(l.createElement)(t,Object(i.a)({},n,{colors:e}))}}),"withCustomColorPalette")},Mn=function(){return Object(b.createHigherOrderComponent)((function(e){return function(t){var n=he("color.palette")||Rn;return Object(l.createElement)(e,Object(i.a)({},t,{colors:n}))}}),"withEditorColorPalette")};function Fn(e,t){var n=Object(d.reduce)(e,(function(e,t){return An(An({},e),Object(d.isString)(t)?Object(a.a)({},t,Object(d.kebabCase)(t)):t)}),{});return Object(b.compose)([t,function(e){return function(t){Object(Pn.a)(i,t);var r,o,c=(r=i,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Object(Nn.a)(r);if(o){var n=Object(Nn.a)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Object(Tn.a)(this,e)});function i(e){var t;return Object(In.a)(this,i),(t=c.call(this,e)).setters=t.createSetters(),t.colorUtils={getMostReadableColor:t.getMostReadableColor.bind(Object(xn.a)(t))},t.state={},t}return Object(Bn.a)(i,[{key:"getMostReadableColor",value:function(e){return function(e,t){return fe.a.mostReadable(t,Object(d.map)(e,"color")).toHexString()}(this.props.colors,e)}},{key:"createSetters",value:function(){var e=this;return Object(d.reduce)(n,(function(t,n,r){var o=Object(d.upperFirst)(r),c="custom".concat(o);return t["set".concat(o)]=e.createSetColor(r,c),t}),{})}},{key:"createSetColor",value:function(e,t){var n=this;return function(r){var o,c=me(n.props.colors,r);n.props.setAttributes((o={},Object(a.a)(o,e,c&&c.slug?c.slug:void 0),Object(a.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(l.createElement)(e,An(An(An(An({},this.props),{},{colors:void 0},this.state),this.setters),{},{colorUtils:this.colorUtils}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.attributes,o=e.colors;return Object(d.reduce)(n,(function(e,n,c){var i=pe(o,r[c],r["custom".concat(Object(d.upperFirst)(c))]),a=t[c];return(null==a?void 0:a.color)===i.color&&a?e[c]=a:e[c]=An(An({},i),{},{class:ve(n,i.slug)}),e}),{})}}]),i}(l.Component)}])}function Vn(e){return function(){for(var t=Ln(e),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Object(b.createHigherOrderComponent)(Fn(r,t),"withCustomColors")}}function Hn(){for(var e=Mn(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Object(b.createHigherOrderComponent)(Fn(n,e),"withColors")}var zn=n(70),Gn=n.n(zn);function Un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Un(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Un(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wn=function(e){var t=e.colorSettings,n=Object(Se.a)(e,["colorSettings"]),r=t.map((function(e){var t=e.value,n=e.onChange;return Kn(Kn({},Object(Se.a)(e,["value","onChange"])),{},{colorValue:t,onColorChange:n})}));return Object(l.createElement)(Ke,Object(i.a)({settings:r,gradients:[],disableCustomGradients:!0},n))},qn=function(e,t,n){return"function"==typeof e?e(t):!0===e?n:e};function $n(e){var t=e.title,n=e.colorSettings,r=e.colorPanelProps,o=e.contrastCheckers,c=e.detectedBackgroundColor,a=e.detectedColor,u=e.panelChildren,s=e.initialOpen;return Object(l.createElement)(Wn,Object(i.a)({title:t,initialOpen:s,colorSettings:Object.values(n)},r),o&&(Array.isArray(o)?o.map((function(e){var t=e.backgroundColor,r=e.textColor,o=Object(Se.a)(e,["backgroundColor","textColor"]);return t=qn(t,n,c),r=qn(r,n,a),Object(l.createElement)($e,Object(i.a)({key:"".concat(t,"-").concat(r),backgroundColor:t,textColor:r},o))})):Object(d.map)(n,(function(e){var t=e.value,r=o.backgroundColor,u=o.textColor;return r=qn(r||t,n,c),u=qn(u||t,n,a),Object(l.createElement)($e,Object(i.a)({},o,{key:"".concat(r,"-").concat(u),backgroundColor:r,textColor:u}))}))),"function"==typeof u?u(n):u)}function Yn(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Xn(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xn(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qn(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Jn(e){return e.ownerDocument.defaultView.getComputedStyle(e)}var er=[],tr={textColor:Object(C.__)("Text Color"),backgroundColor:Object(C.__)("Background Color")},nr=function(e){return Object(l.createElement)(Je,null,Object(l.createElement)($n,e))};function rr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(C.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(C.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,u=t.colorDetector,b=(u=void 0===u?{}:u).targetRef,f=u.backgroundColorTargetRef,p=void 0===f?b:f,v=u.textColorTargetRef,O=void 0===v?b:v,g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],j=h(),k=j.clientId,y=he("color.palette")||er,_=Object(m.useSelect)((function(e){return{attributes:(0,e("core/block-editor").getBlockAttributes)(k)}}),[k]),E=_.attributes,w=Object(m.useDispatch)("core/block-editor"),S=w.updateBlockAttributes,I=Object(l.useCallback)((function(e){return S(k,e)}),[S,k]),B=Object(l.useMemo)((function(){return Gn()((function(e,t,n,r,o,c){return function(i){var u,b=i.children,f=i.className,p=void 0===f?"":f,m=i.style,v=void 0===m?{}:m,O={};r?O=Object(a.a)({},t,o):c&&(O=Object(a.a)({},t,c));var g={className:s()(p,(u={},Object(a.a)(u,"has-".concat(Object(d.kebabCase)(r),"-").concat(Object(d.kebabCase)(t)),r),Object(a.a)(u,n||"has-".concat(Object(d.kebabCase)(e)),r||c),u)),style:Zn(Zn({},O),v)};return Object(d.isFunction)(b)?b(g):l.Children.map(b,(function(e){return Object(l.cloneElement)(e,{className:s()(e.props.className,g.className),style:Zn(Zn({},g.style),e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),x=Object(l.useMemo)((function(){return Gn()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));I(Object(a.a)({},r?Object(d.camelCase)("custom ".concat(e)):e,void 0)),I(Object(a.a)({},r?e:Object(d.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[I,e.length]),P=Object(l.useState)(),T=Object(se.a)(P,2),N=T[0],D=T[1],A=Object(l.useState)(),R=Object(se.a)(A,2),L=R[0],M=R[1];return Object(l.useEffect)((function(){if(c){var e,t=!1,n=!1,r=Yn(Object(d.castArray)(c));try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.backgroundColor,a=o.textColor;if(t||(t=!0===i),n||(n=!0===a),t&&n)break}}catch(e){r.e(e)}finally{r.f()}if(n&&M(Jn(O.current).color),t){for(var l=p.current,u=Jn(l).backgroundColor;"rgba(0, 0, 0, 0)"===u&&l.parentNode&&l.parentNode.nodeType===l.parentNode.ELEMENT_NODE;)u=Jn(l=l.parentNode).backgroundColor;D(u)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(E[t.name]," | ").concat(E[Object(d.camelCase)("custom ".concat(t.name))])}),"")].concat(Object(ue.a)(g))),Object(l.useMemo)((function(){var t={},n=e.reduce((function(e,n){"string"==typeof n&&(n={name:n});var r=Zn(Zn({},n),{},{color:E[n.name]}),o=r.name,c=r.property,i=void 0===c?o:c,a=r.className,l=r.panelLabel,u=void 0===l?n.label||tr[o]||Object(d.startCase)(o):l,s=r.componentName,b=void 0===s?Object(d.startCase)(o).replace(/\s/g,""):s,f=r.color,p=void 0===f?n.color:f,m=r.colors,v=void 0===m?y:m,O=E[Object(d.camelCase)("custom ".concat(o))],g=O?void 0:v.find((function(e){return e.slug===p}));return e[b]=B(o,i,a,p,g&&g.color,O),e[b].displayName=b,e[b].color=O||g&&g.color,e[b].slug=p,e[b].setColor=x(o,v),t[b]={value:g?g.color:E[Object(d.camelCase)("custom ".concat(o))],onChange:e[b].setColor,label:u,colors:v},v||delete t[b].colors,e}),{}),a={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:N,detectedColor:L,panelChildren:i};return Zn(Zn({},n),{},{ColorPanel:Object(l.createElement)($n,a),InspectorControlsColorPanel:Object(l.createElement)(nr,a)})}),[E,I,L,N].concat(Object(ue.a)(g)))}function or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?or(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ir(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Nn.a)(e);if(t){var o=Object(Nn.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Tn.a)(this,n)}}var ar=[],lr=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(d.reduce)(t,(function(e,t){return e[t]="custom".concat(Object(d.upperFirst)(t)),e}),{});return Object(b.createHigherOrderComponent)(Object(b.compose)([Object(b.createHigherOrderComponent)((function(e){return function(t){var n=he("typography.fontSizes")||ar;return Object(l.createElement)(e,Object(i.a)({},t,{fontSizes:n}))}}),"withFontSizes"),function(e){return function(t){Object(Pn.a)(o,t);var n=ir(o);function o(e){var t;return Object(In.a)(this,o),(t=n.call(this,e)).setters=t.createSetters(),t.state={},t}return Object(Bn.a)(o,[{key:"createSetters",value:function(){var e=this;return Object(d.reduce)(r,(function(t,n,r){var o=Object(d.upperFirst)(r);return t["set".concat(o)]=e.createSetFontSize(r,n),t}),{})}},{key:"createSetFontSize",value:function(e,t){var n=this;return function(r){var o,c=Object(d.find)(n.props.fontSizes,{size:Number(r)});n.props.setAttributes((o={},Object(a.a)(o,e,c&&c.slug?c.slug:void 0),Object(a.a)(o,t,c&&c.slug?void 0:r),o))}}},{key:"render",value:function(){return Object(l.createElement)(e,cr(cr(cr({},this.props),{},{fontSizes:void 0},this.state),this.setters))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.attributes,o=e.fontSizes,c=function(e,r){return!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e])};if(!Object(d.some)(r,c))return null;var i=Object(d.reduce)(Object(d.pickBy)(r,c),(function(e,t,r){var c=n[r],i=tn(o,c,n[t]);return e[r]=cr(cr({},i),{},{class:rn(c)}),e}),{});return cr(cr({},t),i)}}]),o}(l.Component)}]),"withFontSizes")},ur=n(279),sr=n(280),dr=n(281);function br(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?br(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):br(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pr=[{icon:ur.a,title:Object(C.__)("Align text left"),align:"left"},{icon:sr.a,title:Object(C.__)("Align text center"),align:"center"},{icon:dr.a,title:Object(C.__)("Align text right"),align:"right"}],mr={position:"bottom right",isAlternate:!0},vr=function(e){var t=e.value,n=e.onChange,r=e.alignmentControls,o=void 0===r?pr:r,c=e.label,i=void 0===c?Object(C.__)("Change text alignment"):c,a=e.isCollapsed,u=void 0===a||a,s=e.isRTL;function b(e){return function(){return n(t===e?void 0:e)}}var f=Object(d.find)(o,(function(e){return e.align===t}));return Object(l.createElement)(v.ToolbarGroup,{isCollapsed:u,icon:f?f.icon:s?dr.a:ur.a,label:i,popoverProps:mr,controls:o.map((function(e){var n=e.align,r=t===n;return fr(fr({},e),{},{isActive:r,role:u?"menuitemradio":void 0,onClick:b(n)})}))})},Or=function(e){return e.name||""},gr=function(e){return e.title},hr=function(e){return e.keywords||[]},jr=function(e){return e.category},kr=function(){return null};function yr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(e=(e=Object(d.deburr)(e)).replace(/^\//,"")).toLowerCase()}var _r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(d.words)(yr(e))},Er=function(e,t){return Object(d.differenceWith)(e,_r(t),(function(e,t){return t.includes(e)}))},wr=function(e,t,n,r){return 0===_r(r).length?e:Cr(e,r,{getCategory:function(e){var n;return null===(n=Object(d.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:function(e){var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title},getVariations:function(e){var t=e.variations,n=void 0===t?[]:t;return Array.from(n.reduce((function(e,t){var n=t.title,r=t.keywords,o=void 0===r?[]:r;return e.add(n),o.forEach((function(t){return e.add(t)})),e}),new Set))}})},Cr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=_r(t);if(0===r.length)return e;var o=e.map((function(e){return[e,Sr(e,t,n)]})).filter((function(e){return Object(se.a)(e,2)[1]>0}));return o.sort((function(e,t){var n=Object(se.a)(e,2)[1];return Object(se.a)(t,2)[1]-n})),o.map((function(e){return Object(se.a)(e,1)[0]}))};function Sr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getName,o=void 0===r?Or:r,c=n.getTitle,i=void 0===c?gr:c,a=n.getKeywords,l=void 0===a?hr:a,u=n.getCategory,s=void 0===u?jr:u,b=n.getCollection,f=void 0===b?kr:b,p=o(e),m=i(e),v=l(e),O=s(e),g=f(e),h=yr(t),j=yr(m),k=0;if(h===j)k+=30;else if(j.startsWith(h))k+=20;else{var y=[p,m].concat(Object(ue.a)(v),[O,g]).join(" "),_=Object(d.words)(h),E=Er(_,y);0===E.length&&(k+=10)}return 0!==k&&p.startsWith("core/")&&k++,k}var Ir=function(e,t){var n=Object(m.useSelect)((function(t){var n=t("core/block-editor").getInserterItems,r=t(p.store),o=r.getCategories,c=r.getCollections;return{categories:o(),collections:c(),items:n(e)}}),[e]),r=n.categories,o=n.collections;return[n.items,r,o,function(e){var n=e.name,r=e.initialAttributes,o=e.innerBlocks,c=Object(p.createBlock)(n,r,Object(p.createBlocksFromInnerBlocksTemplate)(o));t(c)}]},Br=n(158);function xr(e){var t,n=e.icon,r=e.showColors,o=void 0!==r&&r,c=e.className;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Br.a});var i=Object(l.createElement)(v.Icon,{icon:n&&n.src?n.src:n}),a=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return Object(l.createElement)("span",{style:a,className:s()("block-editor-block-icon",c,{"has-colors":o})},i)}var Pr={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems:function(e){var t=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getBlockName,o=t.getBlockInsertionPoint,c=n();return{selectedBlockName:c?r(c):null,rootClientId:o().rootClientId}}),[]),n=t.rootClientId,r=t.selectedBlockName,o=Ir(n,d.noop),c=Object(se.a)(o,3),i=c[0],a=c[1],u=c[2],s=Object(l.useMemo)((function(){return(e.trim()?wr(i,a,u,e):Object(d.orderBy)(i,["frecency"],["desc"])).filter((function(e){return e.name!==r})).slice(0,9)}),[e,r,i,a,u]);return[Object(l.useMemo)((function(){return s.map((function(e){var t=e.title,n=e.icon,r=e.isDisabled;return{key:"block-".concat(e.id),value:e,label:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(xr,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))}),[s])]},allowContext:function(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes,r=e.innerBlocks;return{action:"replace",value:Object(p.createBlock)(t,n,Object(p.createBlocksFromInnerBlocksTemplate)(r))}}},Tr=[],Nr=function(e){var t=h().name,n=e.completers,r=void 0===n?Tr:n;return r=Object(l.useMemo)((function(){var e=r;return t===Object(p.getDefaultBlockName)()&&(e=e.concat([Pr])),Object(f.hasFilter)("editor.Autocomplete.completers")&&(e===r&&(e=e.map(d.clone)),e=Object(f.applyFilters)("editor.Autocomplete.completers",e,t)),e}),[r,t]),Object(l.createElement)(v.Autocomplete,Object(i.a)({},e,{completers:r}))},Dr=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"})),Ar=function(e){var t=e.isActive,n=e.label,r=void 0===n?Object(C.__)("Toggle full height"):n,o=e.onToggle;return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{isActive:t,icon:Dr,label:r,onClick:function(){return o(!t)}}))},Rr=function(e){var t=e.label,n=void 0===t?Object(C.__)("Change matrix alignment"):t,r=e.onChange,o=void 0===r?d.noop:r,c=e.value,i=void 0===c?"center":c,a=Object(l.createElement)(v.__experimentalAlignmentMatrixControl.Icon,{value:i}),u="block-editor-block-alignment-matrix-toolbar",s="".concat(u,"__popover");return Object(l.createElement)(v.Dropdown,{position:"bottom right",className:u,popoverProps:{className:s,isAlternate:!0},renderToggle:function(e){var t=e.onToggle,r=e.isOpen;return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":r,onKeyDown:function(e){r||e.keyCode!==Dt.DOWN||(e.preventDefault(),e.stopPropagation(),t())},label:n,icon:a,showTooltip:!0}))},renderContent:function(){return Object(l.createElement)(v.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:o,value:i})}})};function Lr(e){var t=e.clientId,n=Object(m.useSelect)((function(e){if(!t)return{};var n=e("core/block-editor"),r=n.getBlockName;return{attributes:(0,n.getBlockAttributes)(t),name:r(t)}}),[t]),r=n.attributes,o=n.name;if(!o)return null;var c=Object(p.getBlockType)(o);if(!c)return null;var i=c.title,a=Object(p.__experimentalGetBlockLabel)(c,r);return a!==i?"".concat(i,": ").concat(Object(d.truncate)(a,{length:15})):i}var Mr=function(){var e=Object(m.useDispatch)("core/block-editor"),t=e.selectBlock,n=e.clearSelectedBlock,r=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectionStart,r=t.getSelectedBlockClientId,o=t.getBlockParents,c=r();return{parents:o(c),clientId:c,hasSelection:!!n().clientId}}),[]),o=r.clientId,c=r.parents,i=r.hasSelection;return Object(l.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":Object(C.__)("Block breadcrumb")},Object(l.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&Object(l.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:n},Object(C.__)("Document")),!i&&Object(C.__)("Document")),c.map((function(e){return Object(l.createElement)("li",{key:e},Object(l.createElement)(v.Button,{className:"block-editor-block-breadcrumb__button",isTertiary:!0,onClick:function(){return t(e)}},Object(l.createElement)(Lr,{clientId:e})))})),!!o&&Object(l.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},Object(l.createElement)(Lr,{clientId:o})))};function Fr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Hr=Object(l.createContext)({});function zr(e){var t=e.value,n=e.children,r=Object(l.useContext)(Hr),o=Object(l.useMemo)((function(){return Vr(Vr({},r),t)}),[r,t]);return Object(l.createElement)(Hr.Provider,{value:o,children:n})}var Gr=Hr,Ur=function(){return Object(l.createElement)(v.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(l.createElement)(v.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"}))},Kr=function(e){var t=e.style,n=e.className;return Object(l.createElement)("div",{className:"block-library-colors-selector__icon-container"},Object(l.createElement)("div",{className:"".concat(n," block-library-colors-selector__state-selection"),style:t},Object(l.createElement)(Ur,null)))},Wr=function(e){var t,n,r,o=e.children,c=Object(Se.a)(e,["children"]);return Object(l.createElement)(v.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:(t=c,n=t.TextColor,r=t.BackgroundColor,function(e){var t=e.onToggle,o=e.isOpen;return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:Object(C.__)("Open Colors Selector"),onClick:t,onKeyDown:function(e){o||e.keyCode!==Dt.DOWN||(e.preventDefault(),e.stopPropagation(),t())},icon:Object(l.createElement)(r,null,Object(l.createElement)(n,null,Object(l.createElement)(Kr,null)))}))}),renderContent:function(){return o}})},qr={},$r=Object(v.withFilters)("editor.BlockEdit")((function(e){var t=e.attributes,n=void 0===t?{}:t,r=e.name,o=Object(p.getBlockType)(r),c=Object(l.useContext)(Gr),a=Object(l.useMemo)((function(){return o&&o.usesContext?Object(d.pick)(c,o.usesContext):qr}),[o,c]);if(!o)return null;var u=o.edit||o.save;if(o.apiVersion>1||Object(p.hasBlockSupport)(o,"lightBlockWrapper",!1))return Object(l.createElement)(u,Object(i.a)({},e,{context:a}));var b=Object(p.hasBlockSupport)(o,"className",!0)?Object(p.getBlockDefaultClassName)(r):null,f=s()(b,n.className);return Object(l.createElement)(u,Object(i.a)({},e,{context:a,className:f}))}));function Yr(e){var t={name:e.name,isSelected:e.isSelected,clientId:e.clientId,onFocus:e.onFocus,onCaretVerticalPositionChange:e.onCaretVerticalPositionChange};return Object(l.createElement)(g,{value:Object(l.useMemo)((function(){return t}),Object.values(t))},Object(l.createElement)($r,e))}var Xr=Object(v.createSlotFill)("BlockFormatControls"),Qr=Xr.Fill,Zr=Xr.Slot,Jr=function(e){return h().isSelected?Object(l.createElement)(Qr,null,(function(t){var n=Object(d.isEmpty)(t)?null:t;return Object(l.createElement)(v.__experimentalToolbarContext.Provider,{value:n},e.children)})):null};Jr.Slot=function(e){var t=Object(l.useContext)(v.__experimentalToolbarContext);return Object(l.createElement)(Zr,Object(i.a)({},e,{fillProps:t}))};var eo=Jr,to=n(41),no=n(17),ro=n.n(no),oo=n(39),co=n(209),io=n(119),ao=n(30),lo=function(e){return e+1},uo=function(e){return{top:e.offsetTop,left:e.offsetLeft}},so=function(e,t,n,r,o){var c=Object(b.useReducedMotion)()||!r,i=Object(l.useReducer)(lo,0),a=Object(se.a)(i,2),u=a[0],s=a[1],d=Object(l.useReducer)(lo,0),f=Object(se.a)(d,2),p=f[0],m=f[1],v=Object(l.useState)({x:0,y:0}),O=Object(se.a)(v,2),g=O[0],h=O[1],j=Object(l.useMemo)((function(){return e.current?uo(e.current):null}),[o]),k=Object(l.useMemo)((function(){if(!n||!e.current)return function(){};var t=Object(ao.getScrollContainer)(e.current);if(!t)return function(){};var r=e.current.getBoundingClientRect();return function(){var n=e.current.getBoundingClientRect().top-r.top;n&&(t.scrollTop+=n)}}),[o,n]);function y(n){var r=n.x,o=n.y;r=Math.round(r),o=Math.round(o),r===y.x&&o===y.y||(function(n){var r=n.x,o=n.y;if(e.current){var c=0===r&&0===o;e.current.style.transformOrigin=c?"":"center",e.current.style.transform=c?"":"translate3d(".concat(r,"px,").concat(o,"px,0)"),e.current.style.zIndex=!t||c?"":"1",k()}}({x:r,y:o}),y.x=r,y.y=o)}Object(l.useLayoutEffect)((function(){u&&m()}),[u]),Object(l.useLayoutEffect)((function(){if(j)if(c)k();else{e.current.style.transform="";var t=uo(e.current);s(),h({x:Math.round(j.left-t.left),y:Math.round(j.top-t.top)})}}),[o]),y.x=0,y.y=0,Object(io.useSpring)({from:{x:g.x,y:g.y},to:{x:0,y:0},reset:u!==p,config:{mass:5,tension:2e3,friction:200},immediate:c,onFrame:y})},bo=Object(io.animated)(v.__experimentalTreeGridRow);function fo(e){var t=e.isSelected,n=e.position,r=e.level,o=e.rowCount,c=e.children,a=e.className,u=e.path,d=Object(Se.a)(e,["isSelected","position","level","rowCount","children","className","path"]),b=Object(l.useRef)(null),f=u.join("_"),p=so(b,t,!1,!0,f);return Object(l.createElement)(bo,Object(i.a)({ref:b,style:p,className:s()("block-editor-block-navigation-leaf",a),level:r,positionInSet:n,setSize:o},d),c)}var po=n(206),mo=n(207),vo=n(208),Oo=n(186);var go=function(e,t,n){return"up"===e?"horizontal"===t?n?po.a:mo.a:vo.a:"down"===e?"horizontal"===t?n?mo.a:po.a:Oo.a:null},ho=function(e,t,n){return"up"===e?"horizontal"===t?n?Object(C.__)("Move right"):Object(C.__)("Move left"):Object(C.__)("Move up"):"down"===e?"horizontal"===t?n?Object(C.__)("Move left"):Object(C.__)("Move right"):Object(C.__)("Move down"):null},jo=Object(l.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,c=Object(Se.a)(e,["clientIds","direction","orientation"]),a=Object(b.useInstanceId)(jo),u=Object(d.castArray)(n).length,f=Object(m.useSelect)((function(e){var t=e("core/block-editor"),c=t.getBlockIndex,i=t.getBlockRootClientId,a=t.getBlockOrder,l=t.getBlock,u=t.getSettings,s=t.getBlockListSettings,b=Object(d.castArray)(n),f=Object(d.first)(b),m=i(f),v=c(f,m),O=c(Object(d.last)(b),m),g=a(m),h=l(f),j=0===v,k=O===g.length-1,y=(s(m)||{}).orientation;return{blockType:h?Object(p.getBlockType)(h.name):null,isDisabled:"up"===r?j:k,rootClientId:m,firstIndex:v,isFirst:j,isLast:k,isRTL:u().isRTL,orientation:o||y}}),[n,r]),O=f.blockType,g=f.isDisabled,h=f.rootClientId,j=f.isFirst,k=f.isLast,y=f.firstIndex,_=f.isRTL,E=f.orientation,w=void 0===E?"vertical":E,S=Object(m.useDispatch)("core/block-editor"),I=S.moveBlocksDown,B=S.moveBlocksUp,x="up"===r?B:I,P="block-editor-block-mover-button__description-".concat(a);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,Object(i.a)({ref:t,className:s()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:go(r,w,_),label:ho(r,w,_),"aria-describedby":P},c,{onClick:g?null:function(e){x(n,h),c.onClick&&c.onClick(e)},"aria-disabled":g})),Object(l.createElement)("span",{id:P,className:"block-editor-block-mover-button__description"},function(e,t,n,r,o,c,i,a){var l=n+1,u=function(e){return"up"===e?"horizontal"===i?a?"right":"left":"up":"down"===e?"horizontal"===i?a?"left":"right":"down":null};if(e>1)return function(e,t,n,r,o){var c=t+1;return o<0&&n?Object(C.__)("Blocks cannot be moved up as they are already at the top"):o>0&&r?Object(C.__)("Blocks cannot be moved down as they are already at the bottom"):o<0&&!n?Object(C.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
10 |
+
Object(C._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,c):o>0&&!r?Object(C.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
|
11 |
+
Object(C._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,c):void 0}(e,n,r,o,c);if(r&&o)return Object(C.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
|
12 |
+
Object(C.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!o){var s=u("down");if("down"===s)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
13 |
+
Object(C.__)("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===s)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
14 |
+
Object(C.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===s)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
15 |
+
Object(C.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(c>0&&o){var d=u("down");if("down"===d)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
16 |
+
Object(C.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===d)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
17 |
+
Object(C.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===d)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
18 |
+
Object(C.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(c<0&&!r){var b=u("up");if("up"===b)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
19 |
+
Object(C.__)("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===b)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
20 |
+
Object(C.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===b)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
|
21 |
+
Object(C.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(c<0&&r){var f=u("up");if("up"===f)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
22 |
+
Object(C.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===f)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
23 |
+
Object(C.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===f)return Object(C.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
|
24 |
+
Object(C.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(u,O&&O.title,y,j,k,"up"===r?-1:1,w,_)))})),ko=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(jo,Object(i.a)({direction:"up",ref:t},e))})),yo=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(jo,Object(i.a)({direction:"down",ref:t},e))}));function _o(e){var t=e.level,n=e.isLastRow,r=e.terminatedLevels;return Object(d.times)(t-1,(function(e){var o=e+2,c=o===t;return Object(l.createElement)("div",{key:e,"aria-hidden":"true",className:s()("block-editor-block-navigator-descender-line",{"has-item":c,"is-last-row":n,"is-terminated":r.includes(o)})})}))}var Eo=Object(l.createContext)({__experimentalFeatures:!1}),wo=function(){return Object(l.useContext)(Eo)},Co=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),So=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(l.createElement)("div",{className:s()(t,"block-editor-warning")},Object(l.createElement)("div",{className:"block-editor-warning__contents"},Object(l.createElement)("p",{className:"block-editor-warning__message"},r),(l.Children.count(n)>0||o)&&Object(l.createElement)("div",{className:"block-editor-warning__actions"},l.Children.count(n)>0&&l.Children.map(n,(function(e,t){return Object(l.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(l.createElement)(v.DropdownMenu,{className:"block-editor-warning__secondary",icon:Co,label:Object(C.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(function(){return Object(l.createElement)(v.MenuGroup,null,o.map((function(e,t){return Object(l.createElement)(v.MenuItem,{onClick:e.onClick,key:t},e.title)})))})))))},Io=n(255),Bo=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,c=e.actionText,i=e.className;return Object(l.createElement)("div",{className:i},Object(l.createElement)("div",{className:"block-editor-block-compare__content"},Object(l.createElement)("h2",{className:"block-editor-block-compare__heading"},t),Object(l.createElement)("div",{className:"block-editor-block-compare__html"},n),Object(l.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(l.createElement)("div",{className:"block-editor-block-compare__action"},Object(l.createElement)(v.Button,{isSecondary:!0,tabIndex:"0",onClick:o},c)))},xo=function(e){var t,n,r,o,c=e.block,i=e.onKeep,a=e.onConvert,u=e.convertor,b=e.convertButtonText,f={rawContent:c.originalContent,renderedContent:Object(p.getSaveElement)(c.name,c.attributes)},m=(t=u(c),r=(n=Object(d.castArray)(t)).map((function(e){return Object(p.getSaveContent)(e.name,e.attributes,e.innerBlocks)})),o=n.map((function(e){return Object(p.getSaveElement)(e.name,e.attributes,e.innerBlocks)})),{rawContent:r.join(""),renderedContent:o}),v=function(e,t){return Object(Io.diffChars)(e,t).map((function(e,t){var n=s()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(l.createElement)("span",{key:t,className:n},e.value)}))}(f.rawContent,m.rawContent);return Object(l.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(l.createElement)(Bo,{title:Object(C.__)("Current"),className:"block-editor-block-compare__current",action:i,actionText:Object(C.__)("Convert to HTML"),rawContent:f.rawContent,renderedContent:f.renderedContent}),Object(l.createElement)(Bo,{title:Object(C.__)("After Conversion"),className:"block-editor-block-compare__converted",action:a,actionText:b,rawContent:v,renderedContent:m.renderedContent}))},Po=function(e){return Object(p.rawHandler)({HTML:e.originalContent})},To=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}})),Object(m.withDispatch)((function(e,t){var n=t.block,r=e("core/block-editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,Po(n))},attemptBlockRecovery:function(){var e,t,o,c;r(n.clientId,(t=(e=n).name,o=e.attributes,c=e.innerBlocks,Object(p.createBlock)(t,o,c)))}}}))])((function(e){var t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,c=e.block,i=!!Object(p.getBlockType)("core/html"),a=Object(l.useState)(!1),u=Object(se.a)(a,2),s=u[0],d=u[1],b=Object(l.useCallback)((function(){return d(!0)}),[]),f=Object(l.useCallback)((function(){return d(!1)}),[]),m=Object(l.useMemo)((function(){return[{
|
25 |
// translators: Button to fix block content
|
26 |
+
title:Object(C._x)("Resolve","imperative verb"),onClick:b},i&&{title:Object(C.__)("Convert to HTML"),onClick:t},{title:Object(C.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)}),[b,t,r]);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(So,{actions:[Object(l.createElement)(v.Button,{key:"recover",onClick:o,isPrimary:!0},Object(C.__)("Attempt Block Recovery"))],secondaryActions:m},Object(C.__)("This block contains unexpected or invalid content.")),s&&Object(l.createElement)(v.Modal,{title:// translators: Dialog title to fix block content
|
27 |
+
Object(C.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},Object(l.createElement)(xo,{block:c,onKeep:t,onConvert:n,convertor:Po,convertButtonText:Object(C.__)("Convert to Blocks")})))})),No=Object(l.createElement)(So,{className:"block-editor-block-list__block-crash-warning"},Object(C.__)("This block has encountered an error and cannot be previewed.")),Do=function(){return No};var Ao=function(e){Object(Pn.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Nn.a)(t);if(n){var o=Object(Nn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Tn.a)(this,e)});function o(){var e;return Object(In.a)(this,o),(e=r.apply(this,arguments)).state={hasError:!1},e}return Object(Bn.a)(o,[{key:"componentDidCatch",value:function(e){this.props.onError(e),this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),o}(l.Component),Ro=n(101),Lo=n.n(Ro),Mo=function(e){var t=e.clientId,n=Object(l.useState)(""),r=Object(se.a)(n,2),o=r[0],c=r[1],i=Object(m.useSelect)((function(e){return e("core/block-editor").getBlock(t)}),[t]),a=Object(m.useDispatch)("core/block-editor").updateBlock;return Object(l.useEffect)((function(){c(Object(p.getBlockContent)(i))}),[i]),Object(l.createElement)(Lo.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(p.getBlockType)(i.name),n=Object(p.getBlockAttributes)(e,o,i.attributes),r=o||Object(p.getSaveContent)(e,n),l=!o||Object(p.isValidBlockContent)(e,n,r);a(t,{attributes:n,originalContent:r,isValid:l}),o||c({content:r})},onChange:function(e){return c(e.target.value)}})},Fo=n(34),Vo=n.n(Fo);function Ho(e,t){for(var n="start"===t?"firstChild":"lastChild",r="start"===t?"nextSibling":"previousSibling";e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[r];)e=e[r];return e}function zo(e){var t=e("core/block-editor"),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.getMultiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.getSelectedBlockClientId;return{isSelectionEnabled:n(),isMultiSelecting:r(),multiSelectedBlockClientIds:o(),hasMultiSelection:c(),getBlockParents:i,selectedBlockClientId:a()}}function Go(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((function(e){t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}var Uo=n(159),Ko=[Object(l.createInterpolateElement)(Object(C.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(C.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(C.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(C.__)("Drag files into the editor to automatically insert media blocks."),Object(C.__)("Change a block's type by pressing the block icon on the toolbar.")],Wo=function(){var e=Object(l.useState)(Math.floor(Math.random()*Ko.length)),t=Object(se.a)(e,1)[0];return Object(l.createElement)(v.Tip,null,Ko[t])},qo=n(131),$o=n(130),Yo=n(205),Xo=function e(t){var n=t.className,r=t.onChange,o=t.value,c=t.placeholder,i=Object(b.useInstanceId)(e),a=Object(l.useRef)();return Object(l.createElement)("div",{className:s()("block-editor-inserter__search",n)},Object(l.createElement)(v.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(i)},c),Object(l.createElement)("input",{ref:a,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(i),type:"search",placeholder:c,autoFocus:!0,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(l.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(l.createElement)(v.Button,{icon:qo.a,label:Object(C.__)("Reset search"),onClick:function(){r(""),a.current.focus()}}),!o&&Object(l.createElement)($o.a,{icon:Yo.a})))},Qo=function(e){var t=e.blockType,n=t.icon,r=t.title,o=t.description;return Object(l.createElement)("div",{className:"block-editor-block-card"},Object(l.createElement)(xr,{icon:n,showColors:!0}),Object(l.createElement)("div",{className:"block-editor-block-card__content"},Object(l.createElement)("h2",{className:"block-editor-block-card__title"},r),Object(l.createElement)("span",{className:"block-editor-block-card__description"},o)))},Zo={insertUsage:{}},Jo={alignWide:!1,colors:[{name:Object(C.__)("Black"),slug:"black",color:"#000000"},{name:Object(C.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(C.__)("White"),slug:"white",color:"#ffffff"},{name:Object(C.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(C.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(C.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(C.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(C.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(C.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(C.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(C.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(C.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(C._x)("Small","font size name"),size:13,slug:"small"},{name:Object(C._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(C._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(C._x)("Large","font size name"),size:36,slug:"large"},{name:Object(C._x)("Huge","font size name"),size:42,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(C.__)("Thumbnail")},{slug:"medium",name:Object(C.__)("Medium")},{slug:"large",name:Object(C.__)("Large")},{slug:"full",name:Object(C.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,availableLegacyWidgets:{},__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:Object(C.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:Object(C.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:Object(C.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:Object(C.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:Object(C.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:Object(C.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:Object(C.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(C.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:Object(C.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:Object(C.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:Object(C.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(C.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function ec(e,t,n){return[].concat(Object(ue.a)(e.slice(0,n)),Object(ue.a)(Object(d.castArray)(t)),Object(ue.a)(e.slice(n)))}function tc(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(ue.a)(e);return o.splice(t,r),ec(o,e.slice(t,t+r),n)}function nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nc(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(a.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,oc(o,r))})),n}function cc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(a.a)({},n.clientId,t),cc(n.innerBlocks,n.clientId))}),{})}function ic(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.identity,n={},r=Object(ue.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(Se.a)(o,["innerBlocks"]);r.push.apply(r,Object(ue.a)(c)),n[i.clientId]=t(i)}return n}function ac(e){return ic(e,(function(e){return Object(d.omit)(e,"attributes")}))}function lc(e){return ic(e,(function(e){return e.attributes}))}function uc(e,t){return e===t?rc({},e):t}function sc(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(d.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(d.isEqual)(Object(d.keys)(n),Object(d.keys)(r)));var n,r}var dc=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})},bc=Object(d.flow)(m.combineReducers,(function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var r=n.id,o=n.updatedId;if(r===o)return t;(t=rc({},t)).attributes=Object(d.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?rc(rc({},e),{},{ref:o}):e}))}return e(t,n)}}),(function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=e(t,n);if(r===t)return t;r.cache=t.cache?t.cache:{};var o=function(e){return e.reduce((function(e,n){var r=n;do{e.push(r),r=t.parents[r]}while(r&&!t.controlledInnerBlocks[r]);return e}),[])};switch(n.type){case"RESET_BLOCKS":r.cache=Object(d.mapValues)(ic(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(d.keys)(ic(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=rc(rc({},r.cache),dc(o(c)));break;case"UPDATE_BLOCK":r.cache=rc(rc({},r.cache),dc(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=rc(rc({},r.cache),dc(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=dc(o(n.replacedClientIds));r.cache=rc(rc(rc({},Object(d.omit)(r.cache,n.replacedClientIds)),Object(d.omit)(i,n.replacedClientIds)),dc(Object(d.keys)(ic(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=rc(rc({},Object(d.omit)(r.cache,n.removedClientIds)),dc(Object(d.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var a=Object(ue.a)(n.clientIds);n.fromRootClientId&&a.push(n.fromRootClientId),n.toRootClientId&&a.push(n.toRootClientId),r.cache=rc(rc({},r.cache),dc(o(a)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var l=[];n.rootClientId&&l.push(n.rootClientId),r.cache=rc(rc({},r.cache),dc(o(l)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var u=Object(d.keys)(Object(d.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=rc(rc({},r.cache),dc(o(u)))}return r}}),(function(e){return function(t,n){var r=function(e){for(var r=e,o=0;o<r.length;o++){var c;!t.order[r[o]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=Object(ue.a)(r)),(c=r).push.apply(c,Object(ue.a)(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=rc(rc({},n),{},{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=rc(rc({},n),{},{type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(n.clientIds)})}return e(t,n)}}),(function(e){return function(t,n){if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);var r={};if(Object.keys(t.controlledInnerBlocks).length)for(var o=Object(ue.a)(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,a=Object(Se.a)(c,["innerBlocks"]);o.push.apply(o,Object(ue.a)(i)),t.controlledInnerBlocks[a.clientId]&&(r[a.clientId]=!0)}var l=t;t.order[n.rootClientId]&&(l=e(l,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));var u=l;return n.blocks.length&&((u=e(u,rc(rc({},n),{},{type:"INSERT_BLOCKS",index:0}))).order=rc(rc({},u.order),Object(d.reduce)(r,(function(e,n,r){return t.order[r]&&(e[r]=t.order[r]),e}),{}))),u}}),(function(e){return function(t,n){if(t&&"RESET_BLOCKS"===n.type){var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(d.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(Object(ue.a)(n),[o],Object(ue.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(d.pickBy)(t.controlledInnerBlocks));return rc(rc({},t),{},{byClientId:rc(rc({},Object(d.omit)(t.byClientId,r)),ac(n.blocks)),attributes:rc(rc({},Object(d.omit)(t.attributes,r)),lc(n.blocks)),order:rc(rc({},Object(d.omit)(t.order,r)),Object(d.omit)(oc(n.blocks),o)),parents:rc(rc({},Object(d.omit)(t.parents,r)),cc(n.blocks)),cache:rc(rc({},Object(d.omit)(t.cache,r)),Object(d.omit)(Object(d.mapValues)(ic(n.blocks),(function(){return{}})),o))})}return e(t,n)}}),(function(e){var t,n=!1;return function(r,o){var c=e(r,o),i="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===c&&!i){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var l=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===l?r:rc(rc({},c),{},{isPersistentChange:l})}return c=rc(rc({},c),{},{isPersistentChange:i?!n:!sc(o,t)}),t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,c}}),(function(e){var t=new Set(["RECEIVE_BLOCKS"]);return function(n,r){var o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}))({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return ac(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return rc(rc({},e),ac(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(d.omit)(t.updates,"attributes");return Object(d.isEmpty)(n)?e:rc(rc({},e),{},Object(a.a)({},t.clientId,rc(rc({},e[t.clientId]),n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?rc(rc({},Object(d.omit)(e,t.replacedClientIds)),ac(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return lc(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return rc(rc({},e),lc(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?rc(rc({},e),{},Object(a.a)({},t.clientId,rc(rc({},e[t.clientId]),t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(t.clientIds.every((function(t){return!e[t]})))return e;var n=t.clientIds.reduce((function(n,r){return rc(rc({},n),{},Object(a.a)({},r,Object(d.reduce)(t.attributes,(function(t,n,o){return n!==t[o]&&((t=uc(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:rc(rc({},e),n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?rc(rc({},Object(d.omit)(e,t.replacedClientIds)),lc(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return oc(t.blocks);case"RECEIVE_BLOCKS":return rc(rc({},e),Object(d.omit)(oc(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=oc(t.blocks,r),i=t.index,l=void 0===i?o.length:i;return rc(rc(rc({},e),c),{},Object(a.a)({},r,ec(o,c[r],l)));case"MOVE_BLOCKS_TO_POSITION":var u,s=t.fromRootClientId,b=void 0===s?"":s,f=t.toRootClientId,p=void 0===f?"":f,m=t.clientIds,v=t.index,O=void 0===v?e[p].length:v;if(b===p){var g=e[p],h=g.indexOf(m[0]);return rc(rc({},e),{},Object(a.a)({},p,tc(e[p],h,O,m.length)))}return rc(rc({},e),{},(u={},Object(a.a)(u,b,d.without.apply(void 0,[e[b]].concat(Object(ue.a)(m)))),Object(a.a)(u,p,ec(e[p],m,O)),u));case"MOVE_BLOCKS_UP":var j=t.clientIds,k=t.rootClientId,y=void 0===k?"":k,_=Object(d.first)(j),E=e[y];if(!E.length||_===Object(d.first)(E))return e;var w=E.indexOf(_);return rc(rc({},e),{},Object(a.a)({},y,tc(E,w,w-1,j.length)));case"MOVE_BLOCKS_DOWN":var C=t.clientIds,S=t.rootClientId,I=void 0===S?"":S,B=Object(d.first)(C),x=Object(d.last)(C),P=e[I];if(!P.length||x===Object(d.last)(P))return e;var T=P.indexOf(B);return rc(rc({},e),{},Object(a.a)({},I,tc(P,T,T+1,C.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var N=t.clientIds;if(!t.blocks)return e;var D=oc(t.blocks);return Object(d.flow)([function(e){return Object(d.omit)(e,t.replacedClientIds)},function(e){return rc(rc({},e),Object(d.omit)(D,""))},function(e){return Object(d.mapValues)(e,(function(e){return Object(d.reduce)(e,(function(e,t){return t===N[0]?[].concat(Object(ue.a)(e),Object(ue.a)(D[""])):(-1===N.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.flow)([function(e){return Object(d.omit)(e,t.removedClientIds)},function(e){return Object(d.mapValues)(e,(function(e){return d.without.apply(void 0,[e].concat(Object(ue.a)(t.removedClientIds)))}))}])(e)}return e},parents:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return cc(t.blocks);case"RECEIVE_BLOCKS":return rc(rc({},e),cc(t.blocks));case"INSERT_BLOCKS":return rc(rc({},e),cc(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return rc(rc({},e),t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return rc(rc({},Object(d.omit)(e,t.replacedClientIds)),cc(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.clientId,o=t.hasControlledInnerBlocks;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===n?rc(rc({},e),{},Object(a.a)({},r,o)):e}});function fc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.clientId))return e;var n=t.indexToSelect||t.blocks.length-1,r=t.blocks[n];if(!r)return{};if(r.clientId===e.clientId)return e;var o={clientId:r.clientId};return"number"==typeof t.initialPosition&&(o.initialPosition=t.initialPosition),o}return e}function pc(e,t,n){switch(t.type){case"CLEAR_SELECTED_BLOCK":case"SELECT_BLOCK":case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":return n}return e}var mc=Object(m.combineReducers)({blocks:bc,isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selectionStart:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset};case"RESET_SELECTION":return t.selectionStart;case"MULTI_SELECT":return{clientId:t.start}}return fc(e,t)},selectionEnd:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset};case"RESET_SELECTION":return t.selectionEnd;case"MULTI_SELECT":return{clientId:t.end}}return fc(e,t)},isMultiSelecting:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(e,t){return"REPLACE_BLOCKS"===t.type&&"number"==typeof t.initialPosition||"SELECT_BLOCK"===t.type?t.initialPosition:"REMOVE_BLOCKS"===t.type||"START_TYPING"===t.type?e:void 0},blocksMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){var n=t.clientId;return rc(rc({},e),{},Object(a.a)({},n,e[n]&&"html"===e[n]?"visual":"html"))}return e},blockListSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(d.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(d.isEqual)(e[n],t.settings)?e:rc(rc({},e),{},Object(a.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(d.omit)(e,n):e}return e},insertionPoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_INSERTION_POINT":case"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r}}return pc(e,t,null)},insertionPointVisibility:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":return!0;case"HIDE_INSERTION_POINT":return!1}return pc(e,t,!1)},template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return rc(rc({},e),{},{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jo,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return rc(rc({},e),t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Zo,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce((function(e,n){var r=n.name,o={name:n.name};return Object(p.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),rc(rc({},e),{},{insertUsage:rc(rc({},e.insertUsage),{},Object(a.a)({},r,{time:t.time,count:e.insertUsage[r]?e.insertUsage[r].count+1:1,insert:o}))})}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return Object(a.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return rc(rc({},e),{},Object(a.a)({},n,t.attributes))}),{})}return null},isNavigationMode:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":var n=t.clientId;return t.isHighlighted?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e}}),vc=n(253),Oc=n.n(vc),gc=n(254),hc=n.n(gc),jc=n(40);function kc(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return yc(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yc(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function yc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ec(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_c(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wc=ro.a.mark(Fc),Cc=ro.a.mark(Wc),Sc=ro.a.mark(qc),Ic=ro.a.mark(ei),Bc=ro.a.mark(ci),xc=ro.a.mark(ii),Pc=ro.a.mark(li),Tc=ro.a.mark(mi),Nc=ro.a.mark(Ni),Dc=ro.a.mark(Di),Ac=ro.a.mark(Ai),Rc=ro.a.mark(Ri),Lc=ro.a.mark(Li),Mc=ro.a.mark(Fi);function Fc(){return ro.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.controls.select("core/block-editor","getBlockCount");case 2:if(0!==e.sent){e.next=7;break}return e.next=6,Ci();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),wc)}function Vc(e){return{type:"RESET_BLOCKS",blocks:e}}function Hc(e,t){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t}}function zc(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Gc(e,t){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(d.castArray)(e),attributes:t}}function Uc(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Kc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Wc(e){var t;return ro.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,m.controls.select("core/block-editor","getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,Kc(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Cc)}function qc(e){var t;return ro.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,m.controls.select("core/block-editor","getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,Kc(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Sc)}function $c(){return{type:"START_MULTI_SELECT"}}function Yc(){return{type:"STOP_MULTI_SELECT"}}function Xc(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function Qc(){return{type:"CLEAR_SELECTED_BLOCK"}}function Zc(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Jc(e,t){var n,r,o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((function(e){var t,n=e.name;if(!Object(p.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!o[n])return e;var r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null==r?void 0:r.includes("is-style-"))return e;var c=e.attributes,i=void 0===c?{}:c,a=o[n];return Ec(Ec({},e),{},{attributes:Ec(Ec({},i),{},{className:"".concat(r||""," is-style-").concat(a).trim()})})}))}function ei(e,t,n,r,o){var c,i,a;return ro.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return e=Object(d.castArray)(e),l.t0=Jc,l.t1=Object(d.castArray)(t),l.next=5,m.controls.select("core/block-editor","getSettings");case 5:return l.t2=l.sent,t=(0,l.t0)(l.t1,l.t2),l.next=9,m.controls.select("core/block-editor","getBlockRootClientId",Object(d.first)(e));case 9:c=l.sent,i=0;case 11:if(!(i<t.length)){l.next=21;break}return a=t[i],l.next=15,m.controls.select("core/block-editor","canInsertBlockType",a.name,c);case 15:if(l.sent){l.next=18;break}return l.abrupt("return");case 18:i++,l.next=11;break;case 21:return l.next=23,{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o};case 23:return l.delegateYield(Fc(),"t3",24);case 24:case"end":return l.stop()}}),Ic)}function ti(e,t){return ei(e,t)}function ni(e){return function(t,n){return{clientIds:Object(d.castArray)(t),type:e,rootClientId:n}}}var ri=ni("MOVE_BLOCKS_DOWN"),oi=ni("MOVE_BLOCKS_UP");function ci(e){var t,n,r,o,c,i=arguments;return ro.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=i.length>1&&void 0!==i[1]?i[1]:"",n=i.length>2&&void 0!==i[2]?i[2]:"",r=i.length>3?i[3]:void 0,a.next=5,m.controls.select("core/block-editor","getTemplateLock",t);case 5:if("all"!==(o=a.sent)){a.next=8;break}return a.abrupt("return");case 8:if(c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r},t!==n){a.next=13;break}return a.next=12,c;case 12:return a.abrupt("return");case 13:if("insert"!==o){a.next=15;break}return a.abrupt("return");case 15:return a.next=17,m.controls.select("core/block-editor","canInsertBlocks",e,n);case 17:if(!a.sent){a.next=21;break}return a.next=21,c;case 21:case"end":return a.stop()}}),Bc)}function ii(e){var t,n,r,o=arguments;return ro.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=o.length>1&&void 0!==o[1]?o[1]:"",n=o.length>2&&void 0!==o[2]?o[2]:"",r=o.length>3?o[3]:void 0,c.next=5,ci([e],t,n,r);case 5:case"end":return c.stop()}}),xc)}function ai(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return li([e],t,n,r)}function li(e,t,n){var r,o,c,i,a,l,u=arguments;return ro.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return r=!(u.length>3&&void 0!==u[3])||u[3],o=u.length>4?u[4]:void 0,s.t0=Jc,s.t1=Object(d.castArray)(e),s.next=6,m.controls.select("core/block-editor","getSettings");case 6:s.t2=s.sent,e=(0,s.t0)(s.t1,s.t2),c=[],i=kc(e),s.prev=10,i.s();case 12:if((a=i.n()).done){s.next=20;break}return l=a.value,s.next=16,m.controls.select("core/block-editor","canInsertBlockType",l.name,n);case 16:s.sent&&c.push(l);case 18:s.next=12;break;case 20:s.next=25;break;case 22:s.prev=22,s.t3=s.catch(10),i.e(s.t3);case 25:return s.prev=25,i.f(),s.finish(25);case 28:if(!c.length){s.next=30;break}return s.abrupt("return",{type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,meta:o});case 30:case"end":return s.stop()}}),Pc,null,[[10,22,25,28]])}function ui(e,t){return{type:"SET_INSERTION_POINT",rootClientId:e,index:t}}function si(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function di(){return{type:"HIDE_INSERTION_POINT"}}function bi(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function fi(){return{type:"SYNCHRONIZE_TEMPLATE"}}function pi(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function mi(e){var t,n,r,o,c=arguments;return ro.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t=!(c.length>1&&void 0!==c[1])||c[1],e&&e.length){i.next=3;break}return i.abrupt("return");case 3:return e=Object(d.castArray)(e),i.next=6,m.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,m.controls.select("core/block-editor","getTemplateLock",n);case 9:if(!i.sent){i.next=12;break}return i.abrupt("return");case 12:if(!t){i.next=18;break}return i.next=15,Wc(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,m.controls.select("core/block-editor","getPreviousBlockClientId",e[0]);case 20:r=i.sent;case 21:return i.next=23,{type:"REMOVE_BLOCKS",clientIds:e};case 23:return i.delegateYield(Fc(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),Tc)}function vi(e,t){return mi([e],t)}function Oi(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,time:Date.now()}}function gi(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function hi(){return{type:"START_TYPING"}}function ji(){return{type:"STOP_TYPING"}}function ki(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function yi(){return{type:"STOP_DRAGGING_BLOCKS"}}function _i(){return{type:"ENTER_FORMATTED_TEXT"}}function Ei(){return{type:"EXIT_FORMATTED_TEXT"}}function wi(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function Ci(e,t,n){var r=Object(p.getDefaultBlockName)();if(r)return ai(Object(p.createBlock)(r,e),n,t)}function Si(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Ii(e){return{type:"UPDATE_SETTINGS",settings:e}}function Bi(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function xi(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Pi(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function Ti(){return{type:"MARK_AUTOMATIC_CHANGE"}}function Ni(){var e,t=arguments;return ro.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=!(t.length>0&&void 0!==t[0])||t[0],n.next=3,{type:"SET_NAVIGATION_MODE",isNavigationMode:e};case 3:e?Object(We.speak)(Object(C.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):Object(We.speak)(Object(C.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),Nc)}function Di(){var e,t=arguments;return ro.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=t.length>0&&void 0!==t[0]?t[0]:null,n.next=3,{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e};case 3:e&&Object(We.speak)(Object(C.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."));case 4:case"end":return n.stop()}}),Dc)}function Ai(e){var t,n,r,o,c,i,a=arguments;return ro.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=!(a.length>1&&void 0!==a[1])||a[1],e||e.length){l.next=3;break}return l.abrupt("return");case 3:return l.next=5,m.controls.select("core/block-editor","getBlocksByClientId",e);case 5:return n=l.sent,l.next=8,m.controls.select("core/block-editor","getBlockRootClientId",e[0]);case 8:if(r=l.sent,!Object(d.some)(n,(function(e){return!e}))){l.next=11;break}return l.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(d.some)(o,(function(e){return!Object(p.hasBlockSupport)(e,"multiple",!0)}))){l.next=14;break}return l.abrupt("return");case 14:return l.next=16,m.controls.select("core/block-editor","getBlockIndex",Object(d.last)(Object(d.castArray)(e)),r);case 16:return c=l.sent,i=n.map((function(e){return Object(p.cloneBlock)(e)})),l.next=20,li(i,c+1,r,t);case 20:if(!(i.length>1&&t)){l.next=23;break}return l.next=23,Xc(Object(d.first)(i).clientId,Object(d.last)(i).clientId);case 23:return l.abrupt("return",i.map((function(e){return e.clientId})));case 24:case"end":return l.stop()}}),Ac)}function Ri(e){var t,n;return ro.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,m.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,m.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,m.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Ci({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),Rc)}function Li(e){var t,n;return ro.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,m.controls.select("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,m.controls.select("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,m.controls.select("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Ci({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),Lc)}function Mi(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function Fi(e){return ro.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Mi(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,Mi(e,!1);case 6:case"end":return t.stop()}}),Mc)}function Vi(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}var Hi=n(48);function zi(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Gi(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gi(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Gi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ui(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ki(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ui(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ui(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wi=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(l.createElement)(v.G,null,Object(l.createElement)(v.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),qi=[];function $i(e,t){var n=e.blocks.byClientId[t];if("web"!==l.Platform.OS&&"core/social-link"===(null==n?void 0:n.name)){var r=e.blocks.attributes[t].service;return r?"".concat("core/social-link","-").concat(r):"core/social-link"}return n?n.name:null}function Yi(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function Xi(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var Qi=Object(Hi.a)((function(e,t){var n=e.blocks.byClientId[t];return n?Ki(Ki({},n),{},{attributes:Xi(e,t),innerBlocks:kl(e,t)?qi:Ji(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),Zi=Object(Hi.a)((function(e,t){var n=e.blocks.byClientId[t];return n?Ki(Ki({},n),{},{attributes:Xi(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),Ji=Object(Hi.a)((function(e,t){return Object(d.map)(Da(e,t),(function(t){return Qi(e,t)}))}),(function(e,t){return Object(d.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),ea=Object(Hi.a)((function(e,t){var n=e.blocks.byClientId[t];return n?Ki(Ki({},n),{},{attributes:Xi(e,t),innerBlocks:ta(e,t)}):null}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),ta=Object(Hi.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(Da(e,t),(function(t){return ea(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),na=function e(t,n){return Object(d.flatMap)(n,(function(n){var r=Da(t,n);return[].concat(Object(ue.a)(r),Object(ue.a)(e(t,r)))}))},ra=Object(Hi.a)((function(e){var t=Da(e);return[].concat(Object(ue.a)(t),Object(ue.a)(na(e,t)))}),(function(e){return[e.blocks.order]})),oa=Object(Hi.a)((function(e,t){var n=ra(e);return t?Object(d.reduce)(n,(function(n,r){return e.blocks.byClientId[r].name===t?n+1:n}),0):n.length}),(function(e){return[e.blocks.order,e.blocks.byClientId]})),ca=Object(Hi.a)((function(e,t){return Object(d.map)(Object(d.castArray)(t),(function(t){return Qi(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function ia(e,t){return Da(e,t).length}function aa(e){return e.selectionStart}function la(e){return e.selectionEnd}function ua(e){return e.selectionStart.clientId}function sa(e){return e.selectionEnd.clientId}function da(e){return wa(e).length||(e.selectionStart.clientId?1:0)}function ba(e){var t=e.selectionStart,n=e.selectionEnd;return!!t.clientId&&t.clientId===n.clientId}function fa(e){var t=e.selectionStart,n=e.selectionEnd,r=t.clientId;return r&&r===n.clientId?r:null}function pa(e){var t=fa(e);return t?Qi(e,t):null}function ma(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var va=Object(Hi.a)((function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],o=t;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(function(e){return[e.blocks.parents]})),Oa=Object(Hi.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=va(e,t,r);return Object(d.map)(Object(d.filter)(Object(d.map)(o,(function(t){return{id:t,name:$i(e,t)}})),(function(e){var t=e.name;return Array.isArray(n)?n.includes(t):t===n})),(function(e){return e.id}))}),(function(e){return[e.blocks.parents]}));function ga(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function ha(e,t){for(var n,r=fa(e),o=[].concat(Object(ue.a)(va(e,t)),[t]),c=[].concat(Object(ue.a)(va(e,r)),[r]),i=Math.min(o.length,c.length),a=0;a<i&&o[a]===c[a];a++)n=o[a];return n}function ja(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=fa(e)),void 0===t&&(t=n<0?Sa(e):Ia(e)),!t)return null;var r=ma(e,t);if(null===r)return null;var o=e.blocks.order,c=o[r],i=c.indexOf(t),a=i+1*n;return a<0||a===c.length?null:c[a]}function ka(e,t){return ja(e,t,-1)}function ya(e,t){return ja(e,t,1)}function _a(e){return e.initialPosition}var Ea=Object(Hi.a)((function(e){var t=e.selectionStart,n=e.selectionEnd;if(void 0===t.clientId||void 0===n.clientId)return qi;if(t.clientId===n.clientId)return[t.clientId];var r=ma(e,t.clientId);if(null===r)return qi;var o=Da(e,r),c=o.indexOf(t.clientId),i=o.indexOf(n.clientId);return c>i?o.slice(i,c+1):o.slice(c,i+1)}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function wa(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?qi:Ea(e)}var Ca=Object(Hi.a)((function(e){var t=wa(e);return t.length?t.map((function(t){return Qi(e,t)})):qi}),(function(e){return[].concat(Object(ue.a)(Ea.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function Sa(e){return Object(d.first)(wa(e))||null}function Ia(e){return Object(d.last)(wa(e))||null}function Ba(e,t){return Sa(e)===t}function xa(e,t){return-1!==wa(e).indexOf(t)}var Pa=Object(Hi.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=xa(e,n=ma(e,n));return r}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function Ta(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:t.clientId||null}function Na(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:n.clientId||null}function Da(e,t){return e.blocks.order[t||""]||qi}function Aa(e,t,n){return Da(e,n).indexOf(t)}function Ra(e,t){var n=e.selectionStart,r=e.selectionEnd;return n.clientId===r.clientId&&n.clientId===t}function La(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(d.some)(Da(e,t),(function(t){return Ra(e,t)||xa(e,t)||n&&La(e,t,n)}))}function Ma(e,t){if(!t)return!1;var n=wa(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function Fa(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId!==n.clientId}function Va(e){return e.isMultiSelecting}function Ha(e){return e.isSelectionEnabled}function za(e,t){return e.blocksMode[t]||"visual"}function Ga(e){return e.isTyping}function Ua(e){return!!e.draggedBlocks.length}function Ka(e){return e.draggedBlocks}function Wa(e,t){return e.draggedBlocks.includes(t)}function qa(e,t){if(!Ua(e))return!1;var n=va(e,t);return Object(d.some)(n,(function(t){return Wa(e,t)}))}function $a(e){return e.isCaretWithinFormattedText}function Ya(e){var t,n,r=e.insertionPoint,o=e.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=ma(e,c)||void 0,n=Aa(e,o.clientId,t)+1):n=Da(e).length,{rootClientId:t,index:n}}function Xa(e){return e.insertionPointVisibility}function Qa(e){return e.template.isValid}function Za(e){return e.settings.template}function Ja(e,t){if(!t)return e.settings.templateLock;var n=ul(e,t);return n?n.templateLock:null}var el=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(d.isBoolean)(e)?e:Object(d.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},o=Object(p.getBlockType)(t);if(!o)return!1;var c=sl(e),i=c.allowedBlockTypes,a=r(i,t,!0);if(!a)return!1;var l=!!Ja(e,n);if(l)return!1;var u=ul(e,n);if(n&&void 0===u)return!1;var s=null==u?void 0:u.allowedBlocks,b=r(s,t),f=o.parent,m=$i(e,n),v=r(f,m);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},tl=Object(Hi.a)(el,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function nl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return tl(e,$i(e,t),n)}))}function rl(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}var ol=function(e,t,n){return!!Object(p.hasBlockSupport)(t,"inserter",!0)&&el(e,t.name,n)},cl=function(e){return function(t){return Ki(Ki({},e),{},{id:"".concat(e.id,"-").concat(t.name),icon:t.icon||e.icon,title:t.title||e.title,description:t.description||e.description,example:t.hasOwnProperty("example")?t.example:e.example,initialAttributes:Ki(Ki({},e.initialAttributes),t.attributes),innerBlocks:t.innerBlocks,keywords:t.keywords||e.keywords})}},il=Object(Hi.a)((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},o=function(t){var n=t.name,o=!1;Object(p.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(d.some)(ca(e,ra(e)),{name:t.name}));var c=rl(e,n)||{},i=c.time,a=c.count,l=void 0===a?0:a,u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return{id:n,name:t.name,initialAttributes:{},title:t.title,description:t.description,icon:t.icon,category:t.category,keywords:t.keywords,variations:u,example:t.example,isDisabled:o,utility:1,frecency:r(i,l)}},c=function(t){var n,o="core/block/".concat(t.id),c=fl(e,t.id);1===c.length&&(n=Object(p.getBlockType)(c[0].name));var i=rl(e,o)||{},a=i.time,l=i.count,u=r(a,void 0===l?0:l);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n?n.icon:Wi,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:u}},i=Object(p.getBlockTypes)().filter((function(t){return ol(e,t,n)})).map(o),a=el(e,"core/block",n)?vl(e).map(c):[],l=i.filter((function(e){var t=e.variations;return!(void 0===t?[]:t).some((function(e){return e.isDefault}))})),u=[],s=zi(i);try{for(s.s();!(t=s.n()).done;){var b=t.value,f=b.variations,m=void 0===f?[]:f;if(m.length){var v=cl(b);u.push.apply(u,Object(ue.a)(m.map(v)))}}}catch(e){s.e(e)}finally{s.f()}return[].concat(Object(ue.a)(l),u,Object(ue.a)(a))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,vl(e),Object(p.getBlockTypes)()]})),al=Object(Hi.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(d.some)(Object(p.getBlockTypes)(),(function(n){return ol(e,n,t)}));if(n)return!0;var r=el(e,"core/block",t)&&vl(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,vl(e),Object(p.getBlockTypes)()]})),ll=Object(Hi.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(d.filter)(Object(p.getBlockTypes)(),(function(n){return ol(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]}));function ul(e,t){return e.blockListSettings[t]}function sl(e){return e.settings}function dl(e){return e.blocks.isPersistentChange}var bl=Object(Hi.a)((function(e,t){return Object(d.filter)(e.blockListSettings,(function(e,n){return t.includes(n)}))}),(function(e){return[e.blockListSettings]})),fl=Object(Hi.a)((function(e,t){var n=Object(d.find)(vl(e),(function(e){return e.id===t}));return n?Object(p.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null}),(function(e){return[vl(e)]}));function pl(e){return e.blocks.isIgnoredChange}function ml(e){return e.lastBlockAttributesChange}function vl(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:qi}function Ol(e){return e.isNavigationMode}function gl(e){return e.hasBlockMovingClientId}function hl(e){return!!e.automaticChangeStatus}function jl(e,t){return e.highlightedBlock===t}function kl(e,t){return!!e.blocks.controlledInnerBlocks[t]}var yl=Object(Hi.a)((function(e,t){if(!t.length)return null;var n=fa(e);if(t.includes($i(e,n)))return n;var r=wa(e),o=Oa(e,n||r[0],t);return o?Object(d.last)(o):null}),(function(e,t){return[e.selectionStart.clientId,e.selectionEnd.clientId,t]}));function _l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function El(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_l(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wl={MERGE_BLOCKS:function(e,t){var n=t.dispatch,r=t.getState(),o=Object(se.a)(e.blocks,2),i=o[0],a=o[1],l=Qi(r,i),u=Object(p.getBlockType)(l.name);if(u.merge){var s=Qi(r,a),b=Object(p.getBlockType)(s.name),f=aa(r),m=f.clientId,v=f.attributeKey,O=f.offset,g=(m===i?u:b).attributes[v],h=(m===i||m===a)&&void 0!==v&&void 0!==O&&!!g;g||("number"==typeof v?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ".concat(Object(jc.a)(v))):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));var j=Object(p.cloneBlock)(l),k=Object(p.cloneBlock)(s);if(h){var y=m===i?j:k,_=y.attributes[v],E=g.multiline,w=g.__unstableMultilineWrapperTags,C=g.__unstablePreserveWhiteSpace,S=Object(c.insert)(Object(c.create)({html:_,multilineTag:E,multilineWrapperTags:w,preserveWhiteSpace:C}),"",O,O);y.attributes[v]=Object(c.toHTMLString)({value:S,multilineTag:E,preserveWhiteSpace:C})}var I=l.name===s.name?[k]:Object(p.switchToBlockType)(k,l.name);if(I&&I.length){var B=u.merge(j.attributes,I[0].attributes);if(h){var x=Object(d.findKey)(B,(function(e){return"string"==typeof e&&-1!==e.indexOf("")})),P=B[x],T=u.attributes[x],N=T.multiline,D=T.__unstableMultilineWrapperTags,A=T.__unstablePreserveWhiteSpace,R=Object(c.create)({html:P,multilineTag:N,multilineWrapperTags:D,preserveWhiteSpace:A}),L=R.text.indexOf(""),M=Object(c.remove)(R,L,L+1),F=Object(c.toHTMLString)({value:M,multilineTag:N,preserveWhiteSpace:A});B[x]=F,n(wi(l.clientId,x,L,L))}n(ei([l.clientId,s.clientId],[El(El({},l),{},{attributes:El(El({},l.attributes),B)})].concat(Object(ue.a)(I.slice(1)))))}}else n(Kc(l.clientId))},RESET_BLOCKS:[function(e,t){var n=t.getState(),r=Za(n),o=Ja(n),c=!r||"all"!==o||Object(p.doBlocksMatchTemplate)(e.blocks,r);if(c!==Qa(n))return bi(c)}],MULTI_SELECT:function(e,t){var n=da((0,t.getState)());Object(We.speak)(Object(C.sprintf)(
|
28 |
/* translators: %s: number of selected blocks */
|
29 |
+
Object(C._n)("%s block selected.","%s blocks selected.",n),n),"assertive")},SYNCHRONIZE_TEMPLATE:function(e,t){var n=(0,t.getState)(),r=Ji(n),o=Za(n);return Vc(Object(p.synchronizeBlocksWithTemplate)(r,o))},MARK_AUTOMATIC_CHANGE:function(e,t){var n=window,r=n.setTimeout,o=n.requestIdleCallback;(void 0===o?function(e){return r(e,100)}:o)((function(){t.dispatch({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))}},Cl=function(e){var t,n=[Oc()(wl),hc.a],r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:e.getState,dispatch:function(){return r.apply(void 0,arguments)}};return t=n.map((function(e){return e(o)})),r=d.flowRight.apply(void 0,Object(ue.a)(t))(e.dispatch),e.dispatch=r,e};function Sl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Il(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sl(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bl={reducer:mc,selectors:o,actions:r,controls:{SLEEP:function(e){var t=e.duration;return new Promise((function(e){setTimeout(e,t)}))}}},xl=Object(m.createReduxStore)("core/block-editor",Il(Il({},Bl),{},{persist:["preferences"]})),Pl=Object(m.registerStore)("core/block-editor",Il(Il({},Bl),{},{persist:["preferences"]}));function Tl(e){var t=e.clientId,n=void 0===t?null:t,r=e.value,o=e.selectionStart,c=e.selectionEnd,i=e.onChange,a=void 0===i?d.noop:i,u=e.onInput,s=void 0===u?d.noop:u,b=Object(m.useRegistry)(),f=b.dispatch("core/block-editor"),p=f.resetBlocks,v=f.resetSelection,O=f.replaceInnerBlocks,g=f.setHasControlledInnerBlocks,h=f.__unstableMarkNextChangeAsNotPersistent,j=b.select("core/block-editor"),k=j.getBlockName,y=j.getBlocks,_=Object(l.useRef)({incoming:null,outgoing:[]}),E=Object(l.useRef)(s),w=Object(l.useRef)(a);Object(l.useEffect)((function(){E.current=s,w.current=a}),[s,a]),Object(l.useEffect)((function(){var e,t=b.select("core/block-editor"),r=t.getSelectionStart,o=t.getSelectionEnd,c=t.isLastBlockChangePersistent,i=t.__unstableIsLastBlockChangeIgnored,a=c(),l=!1,u=b.subscribe((function(){if(null===n||null!==k(n)){var t=c(),u=y(n),s=u!==e;if(e=u,s&&(_.current.incoming||i()))return _.current.incoming=null,void(a=t);(s||l&&!s&&t&&!a)&&(a=t,_.current.outgoing.push(e),(a?w.current:E.current)(e,{selectionStart:r(),selectionEnd:o()})),l=s}}));return function(){return u()}}),[b,n]),Object(l.useEffect)((function(){_.current.outgoing.includes(r)?Object(d.last)(_.current.outgoing)===r&&(_.current.outgoing=[]):y(n)!==r&&(_.current.outgoing=[],_.current.incoming=r,r&&(h(),n?(g(n,!0),h(),O(n,r)):p(r)),o&&c&&v(o,c))}),[r,n])}Cl(Pl);var Nl=Object(b.createHigherOrderComponent)((function(e){return Object(m.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(Se.a)(t,["useSubRegistry","registry"]);if(!r)return Object(l.createElement)(e,Object(i.a)({registry:o},c));var a=Object(l.useState)(null),u=Object(se.a)(a,2),s=u[0],d=u[1];return Object(l.useEffect)((function(){var e=Object(m.createRegistry)({},o),t=e.registerStore("core/block-editor",Bl);Cl(t),d(e)}),[o]),s?Object(l.createElement)(m.RegistryProvider,{value:s},Object(l.createElement)(e,Object(i.a)({registry:s},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(m.useDispatch)("core/block-editor").updateSettings;return Object(l.useEffect)((function(){r(n)}),[n]),Tl(e),t})),Dl=n(76),Al=Object(b.compose)(Object(m.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getBlockCount,o=n.getBlockName,c=n.isBlockValid,i=n.getSettings,a=n.getTemplateLock,l=!r(t.rootClientId),u=o(t.lastBlockClientId)===Object(p.getDefaultBlockName)(),s=c(t.lastBlockClientId),d=i().bodyPlaceholder;return{isVisible:l||!u||!s,showPrompt:l,isLocked:!!a(t.rootClientId),placeholder:d}})),Object(m.withDispatch)((function(e,t){var n=e("core/block-editor"),r=n.insertDefaultBlock,o=n.startTyping;return{onAppend:function(){var e=t.rootClientId;r(void 0,e),o()}}})))((function(e){var t=e.isLocked,n=e.isVisible,r=e.onAppend,o=e.showPrompt,c=e.placeholder,i=e.rootClientId;if(t||!n)return null;var a=Object(Dl.decodeEntities)(c)||Object(C.__)("Start writing or type / to choose a block");return Object(l.createElement)("div",{"data-root-client-id":i||"",className:"wp-block block-editor-default-block-appender"},Object(l.createElement)(Lo.a,{role:"button","aria-label":Object(C.__)("Add block"),className:"block-editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?a:""}),Object(l.createElement)(Hu,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))})),Rl=Object(l.forwardRef)((function(e,t){var n=e.rootClientId,r=e.className,o=e.__experimentalSelectBlockOnInsert,c=e.onFocus,i=e.tabIndex;return Object(l.createElement)(Hu,{position:"bottom center",rootClientId:n,__experimentalSelectBlockOnInsert:o,__experimentalIsQuick:!0,renderToggle:function(e){var n,o=e.onToggle,a=e.disabled,u=e.isOpen,d=e.blockTitle,b=e.hasSingleBlockType;n=b?Object(C.sprintf)(// translators: %s: the name of the block when there is only one
|
30 |
+
Object(C._x)("Add %s","directly add the only allowed block"),d):Object(C._x)("Add block","Generic label for block inserter button");var f=!b,p=Object(l.createElement)(v.Button,{ref:t,onFocus:c,tabIndex:i,className:s()(r,"block-editor-button-block-appender"),onClick:o,"aria-haspopup":f?"true":void 0,"aria-expanded":f?u:void 0,disabled:a,label:n},!b&&Object(l.createElement)(v.VisuallyHidden,{as:"span"},n),Object(l.createElement)($o.a,{icon:Uo.a}));return(f||b)&&(p=Object(l.createElement)(v.Tooltip,{text:n},p)),p},isAppender:!0})})),Ll=Object(l.createContext)();function Ml(e){e.stopPropagation()}var Fl=Object(m.withSelect)((function(e,t){var n=t.rootClientId,r=e("core/block-editor"),o=r.getBlockOrder,c=r.canInsertBlockType,i=r.getTemplateLock,a=r.getSelectedBlockClientId;return{isLocked:!!i(n),blockClientIds:o(n),canInsertDefaultBlock:c(Object(p.getDefaultBlockName)(),n),selectedBlockClientId:a()}}))((function(e){var t,n=e.blockClientIds,r=e.rootClientId,o=e.canInsertDefaultBlock,c=e.isLocked,i=e.renderAppender,a=e.className,u=e.selectedBlockClientId,b=e.tagName,f=void 0===b?"div":b,p=Object(l.useContext)(Ll);if(c||!1===i)return null;if(i)t=Object(l.createElement)(i,null);else{var m=!r,v=u===r,O=u&&!n.includes(u);if(!m&&!v&&(!u||O))return null;t=o?Object(l.createElement)(Al,{rootClientId:r,lastBlockClientId:Object(d.last)(n)}):Object(l.createElement)(Rl,{rootClientId:r,className:"block-list-appender__toggle"})}return Object(l.createElement)(f,{tabIndex:-1,onFocus:Ml,className:s()("block-list-appender","wp-block",a),ref:function(e){e?p.set(r||"",e):p.delete(r||"")}},t)}));function Vl(e,t,n,r,o){return function(c){var i=function(e){var t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(c),a=i.srcRootClientId,l=i.srcClientIds;if("block"===i.type){var u=n(l[0],a);if(!(a===e&&u===t||l.includes(e)||r(l).some((function(t){return t===e})))){var s=a===e,d=l.length;o(l,a,e,s&&u<t?t-d:t)}}}}function Hl(e,t,n,r,o){return function(c){if(n){var i=Object(p.findTransform)(Object(p.getBlockTransforms)("from"),(function(e){return"files"===e.type&&e.isMatch(c)}));if(i){var a=i.transform(c,r);o(a,t,e)}}}}function zl(e,t,n){return function(r){var o=Object(p.pasteHandler)({HTML:r,mode:"BLOCKS"});o.length&&n(o,t,e)}}function Gl(e,t){var n=Object(m.useSelect)((function(e){var t=e("core/block-editor");return{getBlockIndex:t.getBlockIndex,getClientIdsOfDescendants:t.getClientIdsOfDescendants,hasUploadPermissions:(0,t.getSettings)().mediaUpload}}),[]),r=n.getBlockIndex,o=n.getClientIdsOfDescendants,c=n.hasUploadPermissions,i=Object(m.useDispatch)("core/block-editor"),a=i.insertBlocks,l=i.moveBlocksToPosition,u=i.updateBlockAttributes;return{onDrop:Vl(e,t,r,o,l),onFilesDrop:Hl(e,t,c,u,a),onHTMLDrop:zl(e,t,a)}}function Ul(e,t,n){var r,o="top"===n||"bottom"===n,c=e.x,i=e.y,a=o?c:i,l=o?i:c,u=o?t.left:t.top,s=o?t.right:t.bottom,d=t[n];return r=a>=u&&a<=s?a:a<s?u:s,Math.sqrt(Math.pow(a-r,2)+Math.pow(l-d,2))}function Kl(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((function(o){var c=Ul(e,t,o);(void 0===n||c<n)&&(n=c,r=o)})),[n,r]}function Wl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ql=new Map;function $l(e){var t=e.placeholder,n=e.rootClientId,r=e.renderAppender,o=e.__experimentalAppenderTagName,c=e.wrapperRef,i=Object(m.useSelect)((function(e){var t,r=e("core/block-editor"),o=r.getBlockOrder,c=r.getBlockListSettings,i=r.getSettings,a=r.getSelectedBlockClientId,l=r.getMultiSelectedBlockClientIds,u=r.hasMultiSelection,s=r.getGlobalBlockCount,d=r.isTyping,b=(0,r.__experimentalGetActiveBlockIdByBlockNames)(i().__experimentalSpotlightEntityBlocks);return{blockClientIds:o(n),selectedBlockClientId:a(),multiSelectedBlockClientIds:l(),orientation:null===(t=c(n))||void 0===t?void 0:t.orientation,hasMultiSelection:u(),enableAnimation:!d()&&s()<=200,activeEntityBlockId:b}}),[n]),u=i.blockClientIds,d=i.selectedBlockClientId,b=i.multiSelectedBlockClientIds,f=i.orientation,p=i.hasMultiSelection,O=i.enableAnimation,g=i.activeEntityBlockId,h=function(e){var t=e.element,n=e.rootClientId,r=void 0===n?"":n,o=Object(l.useState)(null),c=Object(se.a)(o,2),i=c[0],u=c[1],s=Object(m.useSelect)((function(e){var t,n=e("core/block-editor"),o=n.getBlockListSettings;return{isLockedAll:"all"===(0,n.getTemplateLock)(r),orientation:null===(t=o(r))||void 0===t?void 0:t.orientation}}),[r]),d=s.isLockedAll,b=s.orientation,f=Gl(r,i),p=Object(v.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wl(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:t,isDisabled:d,withPosition:!0},f)).position;if(Object(l.useEffect)((function(){if(p){var e=function(e,t,n){var r,o,c="horizontal"===n?["left","right"]:["top","bottom"];return e.forEach((function(n,i){if(n.classList.contains("wp-block")){var a=n.getBoundingClientRect(),l=Kl(t,a,c),u=Object(se.a)(l,2),s=u[0],d=u[1];if(void 0===o||s<o){var b="bottom"===d||"right"===d,f=b?1:0,p=b&&e[i+1]&&e[i+1].classList.contains("is-dragging");o=s,r=i+(f+=p?1:0)}}})),r}(Array.from(t.current.children),p,b);u(void 0===e?0:e)}}),[p]),p)return i}({element:c,rootClientId:n}),j=h===u.length;return Object(l.createElement)(l.Fragment,null,u.map((function(e,t){var r=p?b.includes(e):d===e,o=h===t;return Object(l.createElement)(m.AsyncModeProvider,{key:e,value:!r},Object(l.createElement)(ad,{rootClientId:n,clientId:e,index:t,enableAnimation:O,className:s()({"is-drop-target":o,"is-dropping-horizontally":o&&"horizontal"===f,"has-active-entity":g}),activeEntityBlockId:g}))})),u.length<1&&t,Object(l.createElement)(Fl,{tagName:o,rootClientId:n,renderAppender:r,className:s()({"is-drop-target":j,"is-dropping-horizontally":j&&"horizontal"===f})}))}function Yl(e){return Object(l.createElement)(m.AsyncModeProvider,{value:!1},Object(l.createElement)($l,e))}var Xl,Ql=Object(l.forwardRef)((function(e,t){var n=e.className,r=e.placeholder,o=e.rootClientId,c=e.renderAppender,i=o?"div":Ys,a=Object(l.useRef)(),u=t||a;return Object(l.createElement)(Ll.Provider,{value:ql},Object(l.createElement)(i,{ref:u,className:s()("block-editor-block-list__layout",n)},Object(l.createElement)(Yl,{placeholder:r,rootClientId:o,renderAppender:c,wrapperRef:u})))}));function Zl(e){var t=e.onClick;return Object(l.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(l.createElement)(v.Disabled,null,Object(l.createElement)(Ql,null)))}var Jl=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(b.useResizeObserver)(),o=Object(se.a)(r,2),c=o[0],i=o[1].width,a=Object(b.useResizeObserver)(),u=Object(se.a)(a,2),s=u[0],d=u[1].height;Xl=Xl||Object(b.pure)(Ql);var f=(i-2*n)/t;return Object(l.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:d*f+2*n}},c,Object(l.createElement)(v.Disabled,{style:{transform:"scale(".concat(f,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},s,Object(l.createElement)(Xl,null)))},eu=Object(l.memo)((function(e){var t=e.blocks,n=e.__experimentalPadding,r=void 0===n?0:n,o=e.viewportWidth,c=void 0===o?1200:o,i=e.__experimentalLive,a=void 0!==i&&i,u=e.__experimentalOnClick,s=Object(m.useSelect)((function(e){return e("core/block-editor").getSettings()}),[]),b=Object(l.useMemo)((function(){return Object(d.castArray)(t)}),[t]);return t&&0!==t.length?Object(l.createElement)(Nl,{value:b,settings:s},a?Object(l.createElement)(Zl,{onClick:u}):Object(l.createElement)(Jl,{viewportWidth:c,__experimentalPadding:r})):null}));function tu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tu(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ru=function(e){var t,n,r=e.item,o=Object(p.getBlockType)(r.name);return Object(l.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(l.createElement)("div",{className:"block-editor-inserter__preview"},Object(p.isReusableBlock)(r)||o.example?Object(l.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(l.createElement)(eu,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=o.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:o.example?Object(p.getBlockFromExample)(r.name,{attributes:nu(nu({},o.example.attributes),r.initialAttributes),innerBlocks:o.example.innerBlocks}):Object(p.createBlock)(r.name,r.initialAttributes)})):Object(l.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(C.__)("No Preview Available."))),!Object(p.isReusableBlock)(r)&&Object(l.createElement)(Qo,{blockType:r}))},ou=n(55),cu=n(115),iu=n(116),au=function(e){var t=e.icon,n=e.onClick,r=e.isDisabled,o=e.title,c=e.className,a=e.composite,u=Object(Se.a)(e,["icon","onClick","isDisabled","title","className","composite"]),d=t?{backgroundColor:t.background,color:t.foreground}:{};return Object(l.createElement)("div",{className:"block-editor-block-types-list__list-item"},Object(l.createElement)(iu.a,Object(i.a)({role:"option",as:v.Button},a,{className:s()("block-editor-block-types-list__item",c),onClick:function(e){e.preventDefault(),n()},disabled:r},u),Object(l.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:d},Object(l.createElement)(xr,{icon:t,showColors:!0})),Object(l.createElement)("span",{className:"block-editor-block-types-list__item-title"},o)))},lu=function(e){var t=e.items,n=void 0===t?[]:t,r=e.onSelect,o=e.onHover,c=void 0===o?function(){}:o,a=e.children,u=e.label,s=Object(ou.g)(),d=n.reduce((function(e,t){return e+"--"+t.id}),"");return Object(l.useEffect)((function(){s.unstable_sort()}),[s.unstable_sort,d]),Object(l.createElement)(cu.a,Object(i.a)({},s,{role:"listbox",className:"block-editor-block-types-list","aria-label":u}),n.map((function(e){return Object(l.createElement)(au,{key:e.id,className:Object(p.getBlockMenuDefaultClassName)(e.id),icon:e.icon,onClick:function(){r(e),c(null)},onFocus:function(){return c(e)},onMouseEnter:function(){return c(e)},onMouseLeave:function(){return c(null)},onBlur:function(){return c(null)},isDisabled:e.isDisabled,title:e.title,composite:s})})),a)};function uu(e){var t=e.rootClientId,n=e.children,r=Object(m.useSelect)((function(e){var n=(0,e(p.store).getBlockType)((0,e("core/block-editor").getBlockName)(t));return{rootBlockTitle:n&&n.title,rootBlockIcon:n&&n.icon}})),o=r.rootBlockTitle,c=r.rootBlockIcon;return Object(l.createElement)("div",{className:"block-editor-inserter__child-blocks"},(c||o)&&Object(l.createElement)("div",{className:"block-editor-inserter__parent-block-header"},Object(l.createElement)(xr,{icon:c,showColors:!0}),o&&Object(l.createElement)("h2",null,o)),n)}var su=function(e){var t=e.title,n=e.icon,r=e.children;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(l.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),Object(l.createElement)(v.Icon,{icon:n})),Object(l.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};function du(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var bu=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.showMostUsedBlocks,c=Ir(t,n),i=Object(se.a)(c,4),u=i[0],s=i[1],b=i[2],f=i[3],v=Object(m.useSelect)((function(e){var n=e("core/block-editor").getBlockName;return!!(0,e(p.store).getChildBlockNames)(n(t)).length}),[t]),O=Object(l.useMemo)((function(){return Object(d.orderBy)(u,["frecency"],["desc"]).slice(0,6)}),[u]),g=Object(l.useMemo)((function(){return u.filter((function(e){return!e.category}))}),[u]),h=Object(l.useMemo)((function(){var e=function(e){return Object(d.findIndex)(s,(function(t){return t.slug===e.category}))};return Object(d.flow)((function(e){return e.filter((function(e){return e.category&&"reusable"!==e.category}))}),(function(t){return Object(d.sortBy)(t,e)}),(function(e){return Object(d.groupBy)(e,"category")}))(u)}),[u,s]),j=Object(l.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?du(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):du(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},b);return Object.keys(b).forEach((function(t){e[t]=u.filter((function(e){return function(e){return e.name.split("/")[0]}(e)===t})),0===e[t].length&&delete e[t]})),e}),[u,b]);return Object(l.useEffect)((function(){return function(){return r(null)}}),[]),Object(l.createElement)("div",null,v&&Object(l.createElement)(uu,{rootClientId:t},Object(l.createElement)(lu,{items:u,onSelect:f,onHover:r,label:Object(C.__)("Child Blocks")})),o&&!v&&!!O.length&&Object(l.createElement)(su,{title:Object(C._x)("Most used","blocks")},Object(l.createElement)(lu,{items:O,onSelect:f,onHover:r,label:Object(C._x)("Most used","blocks")})),!v&&Object(d.map)(s,(function(e){var t=h[e.slug];return t&&t.length?Object(l.createElement)(su,{key:e.slug,title:e.title,icon:e.icon},Object(l.createElement)(lu,{items:t,onSelect:f,onHover:r,label:e.title})):null})),!v&&!!g.length&&Object(l.createElement)(su,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(C.__)("Uncategorized")},Object(l.createElement)(lu,{items:g,onSelect:f,onHover:r,label:Object(C.__)("Uncategorized")})),!v&&Object(d.map)(b,(function(e,t){var n=j[t];return n&&n.length?Object(l.createElement)(su,{key:t,title:e.title,icon:e.icon},Object(l.createElement)(lu,{items:n,onSelect:f,onHover:r,label:e.title})):null})))},fu=function(e){var t,n=e.selectedCategory,r=e.patternCategories,o=e.onClickCategory,c=e.children;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:s()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(l.createElement)(v.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(C.__)("Filter patterns"),hideLabelFromVision:!0,value:n.name,onChange:function(e){o(r.find((function(t){return e===t.name})))},options:(t=[],r.map((function(e){return t.push({value:e.name,label:e.label})})),t)})),Object(l.createElement)("div",{className:"block-editor-inserter__panel-content"},c))},pu=function(e){var t=Object(m.useSelect)((function(e){var t=e("core/block-editor").getSettings();return{patterns:t.__experimentalBlockPatterns,patternCategories:t.__experimentalBlockPatternCategories}}),[]),n=t.patternCategories,r=t.patterns,o=Object(m.useDispatch)("core/notices").createSuccessNotice;return[r,n,Object(l.useCallback)((function(t,n){e(Object(d.map)(n,(function(e){return Object(p.cloneBlock)(e)})),t.name),o(Object(C.sprintf)(
|
31 |
/* translators: %s: block pattern title. */
|
32 |
+
Object(C.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function mu(e){var t=e.pattern,n=e.onClick,r=t.content,o=t.viewportWidth,c=Object(l.useMemo)((function(){return Object(p.parse)(r)}),[r]),i=Object(b.useInstanceId)(mu),a="block-editor-block-patterns-list__item-description-".concat(i);return Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item",role:"button",onClick:function(){return n(t,c)},onKeyDown:function(e){Dt.ENTER!==e.keyCode&&Dt.SPACE!==e.keyCode||n(t,c)},tabIndex:0,"aria-label":t.title,"aria-describedby":t.description?a:void 0},Object(l.createElement)(eu,{blocks:c,viewportWidth:o}),Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},t.title),!!t.description&&Object(l.createElement)(v.VisuallyHidden,{id:a},t.description))}function vu(){return Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Ou=function(e){var t=e.blockPatterns,n=e.shownPatterns,r=e.onClickPattern;return t.map((function(e){return n.includes(e)?Object(l.createElement)(mu,{key:e.name,pattern:e,onClick:r}):Object(l.createElement)(vu,{key:e.name})}))};function gu(e){var t=e.onInsert,n=e.selectedCategory,r=e.onClickCategory,o=pu(t),c=Object(se.a)(o,3),i=c[0],a=c[1],u=c[2],s=Object(l.useMemo)((function(){return a.filter((function(e){return i.some((function(t){return t.categories.includes(e.name)}))}))}),[i,a]),f=n||s[0];Object(l.useEffect)((function(){i.some((function(e){return p(e)===1/0}))&&!s.find((function(e){return"uncategorized"===e.name}))&&s.push({name:"uncategorized",label:Object(C._x)("Uncategorized")})}),[s,i]);var p=Object(l.useCallback)((function(e){if(!e.categories||!e.categories.length)return 1/0;var t=Object(d.fromPairs)(s.map((function(e,t){return[e.name,t]})));return Math.min.apply(Math,Object(ue.a)(e.categories.map((function(e){return void 0!==t[e]?t[e]:1/0}))))}),[s]),m=Object(l.useMemo)((function(){return i.filter((function(e){return"uncategorized"===f.name?p(e)===1/0:e.categories&&e.categories.includes(f.name)}))}),[i,f]),v=Object(l.useMemo)((function(){return m.sort((function(e,t){return p(e)-p(t)}))}),[m,p]),O=Object(b.useAsyncList)(v);return Object(l.createElement)(l.Fragment,null,!!m.length&&Object(l.createElement)(fu,{key:f.name,title:f.title,selectedCategory:f,patternCategories:s,onClickCategory:r},Object(l.createElement)(Ou,{shownPatterns:O,blockPatterns:m,onClickPattern:u})))}var hu=function(e){var t=e.onInsert,n=e.onClickCategory,r=e.selectedCategory;return Object(l.createElement)(gu,{selectedCategory:r,onInsert:t,onClickCategory:n})},ju=n(28),ku=function(){return Object(l.createElement)("div",{className:"block-editor-inserter__no-results"},Object(l.createElement)($o.a,{className:"block-editor-inserter__no-results-icon",icon:Br.a}),Object(l.createElement)("p",null,Object(C.__)("No results found.")))};function yu(e){var t=e.onHover,n=e.onInsert,r=e.rootClientId,o=Ir(r,n),c=Object(se.a)(o,4),i=c[0],a=c[3],u=Object(l.useMemo)((function(){return i.filter((function(e){return"reusable"===e.category}))}),[i]);return 0===u.length?Object(l.createElement)(ku,null):Object(l.createElement)(su,{title:Object(C.__)("Reusable blocks")},Object(l.createElement)(lu,{items:u,onSelect:a,onHover:t,label:Object(C.__)("Reusable blocks")}))}var _u=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(yu,{onHover:r,onInsert:n,rootClientId:t}),Object(l.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(l.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object(ju.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(C.__)("Manage all reusable blocks"))))},Eu=Object(v.createSlotFill)("__experimentalInserterMenuExtension"),wu=Eu.Fill,Cu=Eu.Slot;wu.Slot=Cu;var Su=wu,Iu=function(e){var t=e.rootClientId,n=e.insertionIndex,r=e.clientId,o=e.isAppender,c=e.selectBlockOnInsert,i=e.onSelect,a=Object(m.useSelect)((function(e){var c,i,a=e("core/block-editor"),l=a.getSelectedBlock,u=a.getBlockIndex,s=a.getBlockOrder,d=a.getBlockInsertionPoint;if(t||n||r||o)c=t,i=n||(r?u(r,c):s(c).length);else{var b=d();c=b.rootClientId,i=b.index}return{selectedBlock:l(),destinationRootClientId:c,destinationIndex:i}}),[t,n,r,o]),l=a.selectedBlock,u=a.destinationRootClientId,s=a.destinationIndex,d=Object(m.useDispatch)("core/block-editor"),b=d.replaceBlocks,f=d.insertBlocks,v=d.showInsertionPoint,O=d.hideInsertionPoint;return[u,function(e,t){if(!o&&l&&Object(p.isUnmodifiedDefaultBlock)(l)?b(l.clientId,e,null,null,t):f(e,s,u,c,t),!c){
|
33 |
// translators: %d: the name of the block that has been added
|
34 |
+
var n=Object(C._n)("%d block added.","%d blocks added.",e.length);Object(We.speak)(n)}i&&i()},function(e){e?v(u,s):O()}]},Bu=function(e){var t=e.filterValue,n=e.onSelect,r=e.onHover,o=e.rootClientId,c=e.clientId,i=e.isAppender,a=e.selectBlockOnInsert,u=e.maxBlockPatterns,s=e.maxBlockTypes,f=e.showBlockDirectory,p=void 0!==f&&f,m=Object(b.useDebounce)(We.speak,500),O=Iu({onSelect:n,rootClientId:o,clientId:c,isAppender:i,selectBlockOnInsert:a}),g=Object(se.a)(O,2),h=g[0],j=g[1],k=Ir(h,j),y=Object(se.a)(k,4),_=y[0],E=y[1],w=y[2],S=y[3],I=pu(j),B=Object(se.a)(I,3),x=B[0],P=B[2],T=Object(l.useMemo)((function(){var e=wr(Object(d.orderBy)(_,["frecency"],["desc"]),E,w,t);return void 0!==s?e.slice(0,s):e}),[t,_,E,w,s]),N=Object(l.useMemo)((function(){var e=Cr(x,t);return void 0!==u?e.slice(0,u):e}),[t,x,u]);Object(l.useEffect)((function(){if(t){var e=T.length+N.length,n=Object(C.sprintf)(
|
35 |
/* translators: %d: number of results. */
|
36 |
+
Object(C._n)("%d result found.","%d results found.",e),e);m(n)}}),[t,m]);var D=Object(b.useAsyncList)(N),A=!Object(d.isEmpty)(T)||!Object(d.isEmpty)(N);return Object(l.createElement)(l.Fragment,null,!p&&!A&&Object(l.createElement)(ku,null),!!T.length&&Object(l.createElement)(su,{title:Object(l.createElement)(v.VisuallyHidden,null,Object(C.__)("Blocks"))},Object(l.createElement)(lu,{items:T,onSelect:S,onHover:r,label:Object(C.__)("Blocks")})),!!T.length&&!!N.length&&Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!N.length&&Object(l.createElement)(su,{title:Object(l.createElement)(v.VisuallyHidden,null,Object(C.__)("Block Patterns"))},Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(l.createElement)(Ou,{shownPatterns:D,blockPatterns:N,onClickPattern:P}))),p&&Object(l.createElement)(Su.Slot,{fillProps:{onSelect:S,onHover:r,filterValue:t,hasItems:A}},(function(e){return e.length?e:A?null:Object(l.createElement)(ku,null)})))},xu={name:"blocks",
|
37 |
/* translators: Blocks tab title in the block inserter. */
|
38 |
+
title:Object(C.__)("Blocks")},Pu={name:"patterns",
|
39 |
/* translators: Patterns tab title in the block inserter. */
|
40 |
+
title:Object(C.__)("Patterns")},Tu={name:"reusable",
|
41 |
/* translators: Reusable blocks tab title in the block inserter. */
|
42 |
+
title:Object(C.__)("Reusable")},Nu=function(e){var t=e.children,n=e.showPatterns,r=void 0!==n&&n,o=e.showReusableBlocks,c=void 0!==o&&o,i=e.onSelect,a=[xu];return r&&a.push(Pu),c&&a.push(Tu),Object(l.createElement)(v.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)},Du=function(e){return e.stopPropagation()},Au=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.__experimentalSelectBlockOnInsert,c=e.__experimentalInsertionIndex,i=e.onSelect,a=e.showInserterHelpPanel,u=e.showMostUsedBlocks,s=Object(l.useState)(""),d=Object(se.a)(s,2),b=d[0],f=d[1],p=Object(l.useState)(null),O=Object(se.a)(p,2),g=O[0],h=O[1],j=Object(l.useState)(null),k=Object(se.a)(j,2),y=k[0],_=k[1],E=Iu({rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o,insertionIndex:c}),w=Object(se.a)(E,3),S=w[0],I=w[1],B=w[2],x=Object(m.useSelect)((function(e){var t=e("core/block-editor").getSettings(),n=t.__experimentalBlockPatterns,r=t.__experimentalReusableBlocks;return{hasPatterns:!!(null==n?void 0:n.length),hasReusableBlocks:!!(null==r?void 0:r.length)}}),[]),P=x.hasPatterns,T=x.hasReusableBlocks,N=!S&&P,D=function(e){I(e),i()},A=function(e){B(!!e),h(e)},R=Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-inserter__block-list"},Object(l.createElement)(bu,{rootClientId:S,onInsert:D,onHover:A,showMostUsedBlocks:u})),a&&Object(l.createElement)("div",{className:"block-editor-inserter__tips"},Object(l.createElement)(v.VisuallyHidden,{as:"h2"},Object(C.__)("A tip for using the block editor")),Object(l.createElement)(Wo,null))),L=Object(l.createElement)(hu,{onInsert:function(e,t){I(e,{patternName:t}),i()},onClickCategory:function(e){_(e)},selectedCategory:y}),M=Object(l.createElement)(_u,{rootClientId:S,onInsert:D,onHover:A});return Object(l.createElement)("div",{className:"block-editor-inserter__menu",onKeyPress:Du,onKeyDown:function(e){[Dt.LEFT,Dt.DOWN,Dt.RIGHT,Dt.UP,Dt.BACKSPACE,Dt.ENTER].includes(e.keyCode)&&e.stopPropagation()}},Object(l.createElement)("div",{className:"block-editor-inserter__main-area"},Object(l.createElement)("div",{className:"block-editor-inserter__content"},Object(l.createElement)(Xo,{onChange:function(e){g&&h(null),f(e)},value:b,placeholder:Object(C.__)("Search")}),!!b&&Object(l.createElement)(Bu,{filterValue:b,onSelect:i,onHover:A,rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o,showBlockDirectory:!0}),!b&&(N||T)&&Object(l.createElement)(Nu,{showPatterns:N,showReusableBlocks:T},(function(e){return"blocks"===e.name?R:"patterns"===e.name?L:M})),!b&&!N&&!T&&R)),a&&g&&Object(l.createElement)(ru,{item:g}))},Ru=function(e){[Dt.LEFT,Dt.DOWN,Dt.RIGHT,Dt.UP,Dt.BACKSPACE,Dt.ENTER].includes(e.keyCode)&&e.stopPropagation()},Lu=function(e){return e.stopPropagation()};function Mu(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,c=e.selectBlockOnInsert,i=Object(l.useState)(""),a=Object(se.a)(i,2),u=a[0],d=a[1],b=Iu({onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:c}),f=Object(se.a)(b,2),p=f[0],O=f[1],g=Ir(p,O),h=Object(se.a)(g,1)[0],j=pu(O),k=Object(se.a)(j,1)[0],y=!p&&k.length&&!!u,_=y&&k.length>6||h.length>6,E=Object(m.useSelect)((function(e){var t=e("core/block-editor"),o=t.getSettings,c=t.getBlockIndex;return{setInserterIsOpened:o().__experimentalSetIsInserterOpened,blockIndex:c(r,n)}}),[r,n]),w=E.setInserterIsOpened,S=E.blockIndex;Object(l.useEffect)((function(){w&&w(!1)}),[w]);var I=Object(m.useDispatch)("core/block-editor").__unstableSetInsertionPoint;return Object(l.createElement)("div",{className:s()("block-editor-inserter__quick-inserter",{"has-search":_,"has-expand":w}),onKeyPress:Lu,onKeyDown:Ru},_&&Object(l.createElement)(Xo,{value:u,onChange:function(e){d(e)},placeholder:Object(C.__)("Search for a block")}),Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},Object(l.createElement)(Bu,{filterValue:u,onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:c,maxBlockPatterns:y?2:0,maxBlockTypes:6})),w&&Object(l.createElement)(v.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){I(n,S),w(!0)},"aria-label":Object(C.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(C.__)("Browse all")))}var Fu=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,a=e.hasSingleBlockType,u=e.toggleProps,s=void 0===u?{}:u;t=a?Object(C.sprintf)(// translators: %s: the name of the block when there is only one
|
43 |
+
Object(C._x)("Add %s","directly add the only allowed block"),c):Object(C._x)("Add block","Generic label for block inserter button");var d=s.onClick,b=Object(Se.a)(s,["onClick"]);return Object(l.createElement)(v.Button,Object(i.a)({icon:Uo.a,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!a&&"true","aria-expanded":!a&&o,disabled:r},b))},Vu=function(e){Object(Pn.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Nn.a)(t);if(n){var o=Object(Nn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Tn.a)(this,e)});function o(){var e;return Object(In.a)(this,o),(e=r.apply(this,arguments)).onToggle=e.onToggle.bind(Object(xn.a)(e)),e.renderToggle=e.renderToggle.bind(Object(xn.a)(e)),e.renderContent=e.renderContent.bind(Object(xn.a)(e)),e}return Object(Bn.a)(o,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,r=this.props,o=r.disabled,c=r.blockTitle,i=r.hasSingleBlockType,a=r.toggleProps,l=r.hasItems,u=r.renderToggle;return(void 0===u?Fu:u)({onToggle:t,isOpen:n,disabled:o||!l,blockTitle:c,hasSingleBlockType:i,toggleProps:a})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,r=n.rootClientId,o=n.clientId,c=n.isAppender,i=n.showInserterHelpPanel,a=n.__experimentalSelectBlockOnInsert;return n.__experimentalIsQuick?Object(l.createElement)(Mu,{onSelect:t,rootClientId:r,clientId:o,isAppender:c,selectBlockOnInsert:a}):Object(l.createElement)(Au,{onSelect:t,rootClientId:r,clientId:o,isAppender:c,showInserterHelpPanel:i,__experimentalSelectBlockOnInsert:a})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.hasSingleBlockType,r=e.insertOnlyAllowedBlock,o=e.__experimentalIsQuick;return n?this.renderToggle({onToggle:r}):Object(l.createElement)(v.Dropdown,{className:"block-editor-inserter",contentClassName:s()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(C.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),o}(l.Component),Hu=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),c=o.getBlockRootClientId,i=o.hasInserterItems,a=o.__experimentalGetAllowedBlocks,l=e(p.store).getBlockVariations,u=a(r=r||c(n)||void 0),s=1===Object(d.size)(u)&&0===Object(d.size)(l(u[0].name,"inserter")),b=!1;return s&&(b=u[0]),{hasItems:i(r),hasSingleBlockType:s,blockTitle:b?b.title:"",allowedBlockType:b,rootClientId:r}})),Object(m.withDispatch)((function(e,t,n){var r=n.select;return{insertOnlyAllowedBlock:function(){var n=t.rootClientId,o=t.clientId,c=t.isAppender,i=t.hasSingleBlockType,a=t.allowedBlockType,l=t.__experimentalSelectBlockOnInsert;if(i&&((0,e("core/block-editor").insertBlock)(Object(p.createBlock)(a.name),function(){var e=r("core/block-editor"),t=e.getBlockIndex,i=e.getBlockSelectionEnd,a=e.getBlockOrder;if(o)return t(o,n);var l=i();return!c&&l?t(l,n)+1:a(n).length}(),n,l),!l)){var u=Object(C.sprintf)(// translators: %s: the name of the block that has been added
|
44 |
+
Object(C.__)("%s block added"),a.title);Object(We.speak)(u)}}}})),Object(b.ifCondition)((function(e){var t=e.hasItems,n=e.isAppender,r=e.rootClientId,o=e.clientId;return t||!n&&!r&&!o}))])(Vu),zu=Object(l.forwardRef)((function(e,t){var n=e.selectedClientId,r=e.isReverse,o=e.containerRef,c=e.noCapture,i=e.hasMultiSelection,a=e.multiSelectionContainer,u=Object(m.useSelect)((function(e){return e("core/block-editor").isNavigationMode()})),s=Object(m.useDispatch)("core/block-editor").setNavigationMode;return Object(l.createElement)("div",{ref:t,tabIndex:u?void 0:"0",onFocus:function(){if(c.current)c.current=null;else if(n){var e=et(n,t.current.ownerDocument);if(r){var l=ao.focus.tabbable.find(e);(Object(d.last)(l)||e).focus()}else e.focus()}else{if(i)return void a.current.focus();s(!0);var u=ao.focus.tabbable.find(o.current);u.length&&(r?Object(d.last)(u).focus():Object(d.first)(u).focus())}},style:{position:"fixed"}})}));function Gu(e,t,n,r){var o,c=ao.focus.focusable.find(n);return t&&(c=Object(d.reverse)(c)),c=c.slice(c.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),Object(d.find)(c,(function t(n,c,i){if(!ao.focus.tabbable.isTabbableIndex(n))return!1;if(r){var a=n.getBoundingClientRect();if(a.left>=o.right||a.right<=o.left)return!1}if(Object(ao.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if((l=n).classList.contains("block-editor-block-list__layout")||l.querySelector(".block-editor-block-list__layout"))return!0;var l;if(n.contains(e))return!1;for(var u,s=1;(u=i[c+s])&&n.contains(u);s++)if(t(u,c+s,i))return!1;return!0}))}function Uu(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,c=t.getPreviousBlockClientId,i=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,l=t.getLastMultiSelectedBlockClientId,u=t.hasMultiSelection,s=t.getBlockOrder,d=t.isNavigationMode,b=t.hasBlockMovingClientId,f=t.getBlockIndex,p=t.getBlockRootClientId,m=t.getClientIdsOfDescendants,v=t.canInsertBlockType,O=t.getBlockName,g=t.isSelectionEnabled,h=t.getBlockSelectionStart,j=t.isMultiSelecting,k=t.getSettings,y=n(),_=r(),E=o();return{selectedBlockClientId:y,selectionStartClientId:_,selectionBeforeEndClientId:c(E||y),selectionAfterEndClientId:i(E||y),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:u(),blocks:s(),isNavigationMode:d(),hasBlockMovingClientId:b,getBlockIndex:f,getBlockRootClientId:p,getClientIdsOfDescendants:m,canInsertBlockType:v,getBlockName:O,isSelectionEnabled:g(),blockSelectionStart:h(),isMultiSelecting:j(),keepCaretInsideBlock:k().keepCaretInsideBlock}}function Ku(e){var t=e.children,n=Object(l.useRef)(),r=Object(l.useRef)(),o=Object(l.useRef)(),c=Object(l.useRef)(),i=Object(l.useRef)(),a=Object(l.useRef)(),u=Object(l.useRef)(),b=Object(m.useSelect)(Uu,[]),f=b.selectedBlockClientId,p=b.selectionStartClientId,v=b.selectionBeforeEndClientId,O=b.selectionAfterEndClientId,g=b.selectedFirstClientId,h=b.selectedLastClientId,j=b.hasMultiSelection,k=b.blocks,y=b.isNavigationMode,_=b.hasBlockMovingClientId,E=b.isSelectionEnabled,w=b.blockSelectionStart,S=b.isMultiSelecting,I=b.getBlockIndex,B=b.getBlockRootClientId,x=b.getClientIdsOfDescendants,P=b.canInsertBlockType,T=b.getBlockName,N=b.keepCaretInsideBlock,D=Object(m.useDispatch)("core/block-editor"),A=D.multiSelect,R=D.selectBlock,L=D.clearSelectedBlock,M=D.setNavigationMode,F=D.setBlockMovingClientId,V=D.moveBlockToPosition,H=Object(l.useState)(!1),z=Object(se.a)(H,2),G=z[0],U=z[1];Object(l.useEffect)((function(){j&&!S&&c.current.focus()}),[j,S]);var K=s()("block-editor-writing-flow",{"is-navigate-mode":y,"is-block-moving-mode":!!_(),"can-insert-moving-block":G});return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(zu,{ref:r,selectedClientId:f,containerRef:n,noCapture:a,hasMultiSelection:j,multiSelectionContainer:c}),Object(l.createElement)("div",{ref:n,className:K,onKeyDown:function(e){var t=e.keyCode,l=e.target,s=t===Dt.UP,b=t===Dt.DOWN,m=t===Dt.LEFT,E=t===Dt.RIGHT,w=t===Dt.TAB,C=t===Dt.ESCAPE,S=t===Dt.ENTER,D=t===Dt.SPACE,H=s||m,z=m||E,G=s||b,K=z||G,W=e.shiftKey,q=W||e.ctrlKey||e.altKey||e.metaKey,$=G?ao.isVerticalEdge:ao.isHorizontalEdge,Y=n.current.ownerDocument,X=Y.defaultView;if(y){var Q,Z=w&&W||s,J=w&&!W||b,ee=m,te=E;if(Z)Q=v;else if(J)Q=O;else if(ee){var ne;Q=null!==(ne=B(f))&&void 0!==ne?ne:f}else if(te){var re;Q=null!==(re=x([f])[0])&&void 0!==re?re:f}var oe=_();if(oe&&Q&&U(P(T(oe),B(Q))),C&&oe&&(F(null),U(!1)),(S||D)&&oe){var ce=B(oe),ie=B(f),ae=I(oe,ce),le=I(f,ie);ae<le&&ce===ie&&(le-=1),V(oe,ce,ie,le),R(oe),F(null)}if(J||Z||ee||te)if(Q)e.preventDefault(),R(Q);else if(w&&f){var ue,se=et(f,Y);(ue=J?ao.focus.tabbable.findNext(se):ao.focus.tabbable.findPrevious(se))&&(e.preventDefault(),ue.focus(),L())}}else{if(f)if(w){var de=et(f,Y);if(W){if(l===de)return a.current=!0,void r.current.focus()}else{var be=ao.focus.tabbable.find(de);if(l===(Object(d.last)(be)||de))return a.current=!0,void o.current.focus()}}else C&&M(!0);else if(j&&w&&l===c.current)return a.current=!0,void(W?r.current.focus():o.current.focus());if(G?u.current||(u.current=Object(ao.computeCaretRect)(X)):u.current=null,!K)return Dt.isKeyboardEvent.primary(e)&&(i.current=Object(ao.isEntirelySelected)(l)),void(Dt.isKeyboardEvent.primary(e,"a")&&((l.isContentEditable?i.current:Object(ao.isEntirelySelected)(l))&&(A(Object(d.first)(k),Object(d.last)(k)),e.preventDefault()),i.current=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===Dt.UP||t===Dt.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(l,t,q)){var fe,pe="rtl"===(fe=l).ownerDocument.defaultView.getComputedStyle(fe).direction?!H:H;if(W)(H&&v||!H&&O)&&(j||function(e,t){var r,o,c=Gu(e,t,n.current);return!(c&&(r=e,o=c,r.closest(".block-editor-block-list__block")===o.closest(".block-editor-block-list__block")))}(l,H)&&$(l,H))&&(function(e){var t=e?v:O;t&&A(p||f,t)}(H),e.preventDefault());else if(j)!function(e){var t=e?g:h;t&&R(t)}(H),e.preventDefault();else if(G&&Object(ao.isVerticalEdge)(l,H)&&!N){var me=Gu(l,H,n.current,!0);me&&(Object(ao.placeCaretAtVerticalEdge)(me,H,u.current),e.preventDefault())}else if(z&&X.getSelection().isCollapsed&&Object(ao.isHorizontalEdge)(l,pe)&&!N){var ve=Gu(l,pe,n.current);Object(ao.placeCaretAtHorizontalEdge)(ve,pe),e.preventDefault()}}}},onMouseDown:function(e){u.current=null;var t=e.target.ownerDocument;if(y&&f&&tt(et(f,t),e.target)?(M(!1),F(null)):y&&_()&&nt(e.target)&&U(P(T(_()),B(nt(e.target)))),E&&0===e.button){var n=nt(e.target);n&&(e.shiftKey?w!==n&&(A(w,n),e.preventDefault()):j&&R(n))}}},Object(l.createElement)("div",{ref:c,tabIndex:j?"0":void 0,"aria-label":j?Object(C.__)("Multiple selected blocks"):void 0,style:{position:"fixed"}}),t),Object(l.createElement)(zu,{ref:o,selectedClientId:f,containerRef:n,noCapture:a,hasMultiSelection:j,multiSelectionContainer:c,isReverse:!0}))}function Wu(e){var t=e.clientId,n=e.setIsInserterForced,r=e.containerRef,o=Object(l.useRef)(),c=Object(m.useSelect)((function(e){var n=e("core/block-editor"),r=n.getMultiSelectedBlockClientIds,o=n.getSelectedBlockClientId,c=n.hasMultiSelection;if((0,n.getSettings)().hasReducedUI)return!0;var i=r(),a=o();return c()?i.includes(t):t===a}),[t]);return Object(l.createElement)("div",{ref:o,onFocus:function(){return n(!0)},onBlur:function(){return n(!1)},onClick:function(e){var n=e.clientX,c=e.clientY,i=e.target;if(i===o.current){var a=r.current.ownerDocument,l=i.getBoundingClientRect(),u=c<l.top+l.height/2,s=et(t,a),d=Gu(s,!0,u?r.current:s)||s,b=new window.DOMRect(n,c,0,16);Object(ao.placeCaretAtVerticalEdge)(d,u,b,!1)}},tabIndex:-1,className:s()("block-editor-block-list__insertion-point-inserter",{"is-inserter-hidden":c})},Object(l.createElement)(Hu,{position:"bottom center",clientId:t,__experimentalIsQuick:!0}))}function qu(e){var t=e.clientId,n=e.rootClientId,r=e.isInserterShown,o=e.isInserterForced,c=e.setIsInserterForced,i=e.containerRef,a=e.showInsertionPoint,u=Object(l.useContext)(Ll),s=Object(l.useMemo)((function(){if(t){var e=i.current.ownerDocument;return et(t,e)}return u.get(n||"")}),[t,n,u]);return Object(l.createElement)(v.Popover,{noArrow:!0,animate:!1,anchorRef:s,position:"top right left",focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:"block-toolbar"},Object(l.createElement)("div",{className:"block-editor-block-list__insertion-point",style:{width:null==s?void 0:s.offsetWidth}},a&&Object(l.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),(r||o)&&Object(l.createElement)(Wu,{clientId:t,setIsInserterForced:c,containerRef:i})))}var $u=function(e){var t=e.clientId,n=e.rootClientId,r=Object(Se.a)(e,["clientId","rootClientId"]),o=Object(m.useSelect)((function(e){var r,o=e("core/block-editor"),c=o.__unstableGetBlockWithoutInnerBlocks,i=o.getBlockIndex,a=o.hasBlockMovingClientId,l=o.getBlockListSettings,u=i(t,n),s=c(t);return{index:u,name:s.name,attributes:s.attributes,blockMovingMode:a(),orientation:null===(r=l(n))||void 0===r?void 0:r.orientation}}),[t,n]),c=o.index,a=o.name,u=o.attributes,d=o.blockMovingMode,b=o.orientation,f=Object(m.useDispatch)("core/block-editor"),O=f.setNavigationMode,g=f.removeBlock,h=Object(l.useRef)();Object(l.useEffect)((function(){h.current.focus(),window.navigator.platform.indexOf("Win")>-1&&Object(We.speak)(k)}),[]);var j=Object(p.getBlockType)(a),k=Object(p.__experimentalGetAccessibleBlockLabel)(j,u,c+1,b),y=s()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!d});return Object(l.createElement)("div",Object(i.a)({className:y},r),Object(l.createElement)(v.Button,{ref:h,onClick:function(){return O(!1)},onKeyDown:function(e){var n=e.keyCode;n!==Dt.BACKSPACE&&n!==Dt.DELETE||(g(t),e.preventDefault())},label:k},Object(l.createElement)(Lr,{clientId:t})))};function Yu(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var Xu=function(e){var t=e.children,n=e.focusOnMount,r=e.__experimentalInitialIndex,o=e.__experimentalOnIndexChange,c=Object(Se.a)(e,["children","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange"]),a=Object(l.useRef)(),u=function(e){var t=Object(l.useState)(!0),n=Object(se.a)(t,2),r=n[0],o=n[1],c=Object(l.useCallback)((function(){var t=!ao.focus.tabbable.find(e.current).some((function(e){return!("toolbarItem"in e.dataset)}));t||Vo()("Using custom components as toolbar controls",{alternative:"ToolbarItem or ToolbarButton components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),o(t)}),[]);return Object(l.useLayoutEffect)((function(){var t=new window.MutationObserver(c);return t.observe(e.current,{childList:!0,subtree:!0}),function(){return t.disconnect()}}),[r]),r}(a);return function(e,t,n,r,o){var c=Object(l.useState)(t),i=Object(se.a)(c,1)[0],a=Object(l.useState)(r),u=Object(se.a)(a,1)[0],s=Object(l.useCallback)((function(){var t,n,r;t=e.current,n=ao.focus.tabbable.find(t),(r=Object(se.a)(n,1)[0])&&r.focus()}),[]);Object(to.useShortcut)("core/block-editor/focus-toolbar",s,{bindGlobal:!0,eventName:"keydown"}),Object(l.useEffect)((function(){i&&s()}),[n,i,s]),Object(l.useEffect)((function(){var t=0;return u&&!i&&(t=window.requestAnimationFrame((function(){var t,n=Yu(e.current),r=u||0;n[r]&&(t=e.current).contains(t.ownerDocument.activeElement)&&n[r].focus()}))),function(){if(window.cancelAnimationFrame(t),o){var n=Yu(e.current).findIndex((function(e){return 0===e.tabIndex}));o(n)}}}),[u,i])}(a,n,u,r,o),u?Object(l.createElement)(v.Toolbar,Object(i.a)({label:c["aria-label"],ref:a},c),t):Object(l.createElement)(v.NavigableMenu,Object(i.a)({orientation:"horizontal",role:"toolbar",ref:a},c),t)},Qu=Object(l.createElement)(S.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(l.createElement)(S.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function Zu(e){var t=e.clientIds,n=Object(m.useSelect)((function(e){var n;if(1===t.length){var r=(0,e("core/block-editor").getBlockName)(Object(se.a)(t,1)[0]);return null===(n=Object(p.getBlockType)(r))||void 0===n?void 0:n.icon}}),[t]);return Object(l.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(l.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(l.createElement)(v.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(l.createElement)(v.FlexItem,null,n?Object(l.createElement)(xr,{icon:n}):Object(C.sprintf)(
|
45 |
/* translators: %d: Number of blocks. */
|
46 |
+
Object(C._n)("%d block","%d blocks",t.length),t.length)),Object(l.createElement)(v.FlexItem,null,Object(l.createElement)(xr,{icon:Qu})))))}var Ju=function(e){var t,n,r,o,c=e.children,i=e.clientIds,a=e.cloneClassname,u=e.onDragStart,s=e.onDragEnd,d=e.elementId,b=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockRootClientId,r=t.getTemplateLock,o=n(i[0]);return{srcRootClientId:o,isDraggable:"all"!==(o?r(o):null)}}),[i]),f=b.srcRootClientId,p=b.isDraggable,O=Object(l.useRef)(!1),g=(t=Object(l.useRef)(null),n=Object(l.useRef)(null),r=Object(l.useRef)(null),o=Object(l.useRef)(null),Object(l.useEffect)((function(){return function(){o.current&&(clearInterval(o.current),o.current=null)}}),[]),[Object(l.useCallback)((function(e){t.current=e.clientY,r.current=Object(ao.getScrollContainer)(e.target),o.current=setInterval((function(){if(r.current&&n.current){var e=r.current.scrollTop+n.current;r.current.scroll({top:e})}}),25)}),[]),Object(l.useCallback)((function(e){if(r.current){var o=r.current.offsetHeight,c=t.current-r.current.offsetTop,i=e.clientY-r.current.offsetTop;if(e.clientY>c){var a=Math.max(o-c-50,0),l=Math.max(i-c-50,0)/a;n.current=25*l}else if(e.clientY<c){var u=Math.max(c-50,0),s=Math.max(c-i-50,0)/u;n.current=-25*s}else n.current=0}}),[]),function(){t.current=null,r.current=null,o.current&&(clearInterval(o.current),o.current=null)}]),h=Object(se.a)(g,3),j=h[0],k=h[1],y=h[2],_=Object(m.useDispatch)("core/block-editor"),E=_.startDraggingBlocks,w=_.stopDraggingBlocks;if(Object(l.useEffect)((function(){return function(){O.current&&w()}}),[]),!p)return c({isDraggable:!1});var C={type:"block",srcClientIds:i,srcRootClientId:f};return Object(l.createElement)(v.Draggable,{cloneClassname:a,elementId:d,transferData:C,onDragStart:function(e){E(i),O.current=!0,j(e),u&&u()},onDragOver:k,onDragEnd:function(){w(),O.current=!1,y(),s&&s()},__experimentalDragComponent:Object(l.createElement)(Zu,{clientIds:i})},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return c({isDraggable:!0,onDraggableStart:t,onDraggableEnd:n})}))},es=Object(m.withSelect)((function(e,t){var n,r=t.clientIds,o=e("core/block-editor"),c=o.getBlock,i=o.getBlockIndex,a=o.getBlockListSettings,l=o.getTemplateLock,u=o.getBlockOrder,s=o.getBlockRootClientId,b=Object(d.castArray)(r),f=Object(d.first)(b),m=c(f),v=s(Object(d.first)(b)),O=i(f,v),g=0===O,h=i(Object(d.last)(b),v)===u(v).length-1;return{blockType:m?Object(p.getBlockType)(m.name):null,isLocked:"all"===l(v),rootClientId:v,firstIndex:O,isFirst:g,isLast:h,orientation:null===(n=a(v))||void 0===n?void 0:n.orientation}}))((function(e){var t=e.isFirst,n=e.isLast,r=e.clientIds,o=e.isLocked,c=e.isHidden,a=e.rootClientId,u=e.orientation,d=e.hideDragHandle,b=Object(l.useState)(!1),f=Object(se.a)(b,2),p=f[0],m=f[1],O=function(){return m(!0)},g=function(){return m(!1)};if(o||t&&n&&!a)return null;var h=1===r.length?Object(C.__)("Drag block"):Object(C.__)("Drag blocks");return Object(l.createElement)("div",{className:s()("block-editor-block-mover",{"is-visible":p||!c,"is-horizontal":"horizontal"===u})},!d&&Object(l.createElement)(Ju,{clientIds:r,cloneClassname:"block-editor-block-mover__drag-clone"},(function(e){var t=e.isDraggable,n=e.onDraggableStart,r=e.onDraggableEnd;return Object(l.createElement)(v.Button,{icon:Qu,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:h,tabIndex:"-1",onDragStart:n,onDragEnd:r,draggable:t})})),Object(l.createElement)(v.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},Object(l.createElement)(v.ToolbarItem,{onFocus:O,onBlur:g},(function(e){return Object(l.createElement)(ko,Object(i.a)({clientIds:r},e))})),Object(l.createElement)(v.ToolbarItem,{onFocus:O,onBlur:g},(function(e){return Object(l.createElement)(yo,Object(i.a)({clientIds:r},e))}))))}));function ts(){var e=Object(m.useDispatch)("core/block-editor").selectBlock,t=Object(m.useSelect)((function(e){var t=e("core/block-editor"),r=t.getBlockName,o=t.getBlockParents,c=t.getSelectedBlockClientId,i=e(p.store).hasBlockSupport,a=o(c()),l=a[a.length-1],u=r(l);return{parentBlockType:Object(p.getBlockType)(u),firstParentClientId:l,shouldHide:!i(n,"__experimentalParentSelector",!0)}}),[]),n=t.parentBlockType,r=t.firstParentClientId;return t.shouldHide?null:void 0!==r?Object(l.createElement)("div",{className:"block-editor-block-parent-selector",key:r},Object(l.createElement)(v.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:function(){return e(r)},label:Object(C.sprintf)(
|
47 |
/* translators: %s: Name of the block's parent. */
|
48 |
+
Object(C.__)("Select parent (%s)"),n.title),showTooltip:!0,icon:Object(l.createElement)(xr,{icon:n.icon})})):null}var ns=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(S.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function rs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function os(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?os(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):os(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function is(e){var t=e.genericPreviewBlock,n=e.style,r=e.isActive,o=e.onBlur,c=e.onHover,i=e.onSelect,a=e.styleClassName,u=e.itemRole,d=Object(l.useMemo)((function(){return cs(cs({},t),{},{attributes:cs(cs({},t.attributes),{},{className:a})})}),[t,a]);return Object(l.createElement)("div",{key:n.name,className:s()("block-editor-block-styles__item",{"is-active":r}),onClick:function(){return i()},onKeyDown:function(e){Dt.ENTER!==e.keyCode&&Dt.SPACE!==e.keyCode||(e.preventDefault(),i())},onMouseEnter:c,onMouseLeave:o,role:u||"button",tabIndex:"0","aria-label":n.label||n.name},Object(l.createElement)("div",{className:"block-editor-block-styles__item-preview"},Object(l.createElement)(eu,{viewportWidth:500,blocks:d})),Object(l.createElement)("div",{className:"block-editor-block-styles__item-label"},n.label||n.name))}var as=function(e){var t=e.clientId,n=e.onSwitch,r=void 0===n?d.noop:n,o=e.onHoverClassName,c=void 0===o?d.noop:o,i=e.itemRole,a=Object(m.useSelect)((function(e){var n=e("core/block-editor").getBlock,r=e(p.store).getBlockStyles,o=n(t);return{block:o,type:Object(p.getBlockType)(o.name),styles:r(o.name),className:o.attributes.className||""}}),[t]),u=a.styles,s=a.block,b=a.type,f=a.className,v=Object(m.useDispatch)("core/block-editor").updateBlockAttributes,O=function(e,t){return Object(l.useMemo)((function(){return t.example?Object(p.getBlockFromExample)(e.name,{attributes:t.example.attributes,innerBlocks:t.example.innerBlocks}):Object(p.cloneBlock)(e)}),[t.example?e.name:e,t])}(s,b);if(!u||0===u.length)return null;var g=Object(d.find)(u,"isDefault")?u:[{name:"default",label:Object(C._x)("Default","block style"),isDefault:!0}].concat(Object(ue.a)(u)),h=function(e,t){var n,r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return rs(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rs(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(new en.a(t).values());try{for(r.s();!(n=r.n()).done;){var o=n.value;if(-1!==o.indexOf("is-style-")){var c=o.substring(9),i=Object(d.find)(e,{name:c});if(i)return i}}}catch(e){r.e(e)}finally{r.f()}return Object(d.find)(e,"isDefault")}(g,f);return Object(l.createElement)("div",{className:"block-editor-block-styles"},g.map((function(e){var n=function(e,t,n){var r=new en.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(f,h,e);return Object(l.createElement)(is,{genericPreviewBlock:O,className:f,isActive:h===e,key:e.name,onSelect:function(){v(t,{className:n}),c(null),r()},onBlur:function(){return c(null)},onHover:function(){return c(n)},style:e,styleClassName:n,itemRole:i})})))},ls=function(e){var t=e.className,n=e.possibleBlockTransformations,r=e.onSelect;return Object(l.createElement)(v.MenuGroup,{label:Object(C.__)("Transform to"),className:t},n.map((function(e){var t=e.name,n=e.icon,o=e.title;return Object(l.createElement)(v.MenuItem,{key:t,className:Object(p.getBlockMenuDefaultClassName)(t),onClick:function(e){e.preventDefault(),r(t)}},Object(l.createElement)(xr,{icon:n,showColors:!0}),o)})))};function us(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ss(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?us(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):us(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ds(e){var t=e.hoveredBlock,n=e.hoveredClassName,r=Object(p.getBlockType)(t.name);return Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(l.createElement)(v.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(C.__)("Preview")),Object(l.createElement)(eu,{viewportWidth:500,blocks:r.example?Object(p.getBlockFromExample)(t.name,{attributes:ss(ss({},r.example.attributes),{},{className:n}),innerBlocks:r.example.innerBlocks}):Object(p.cloneBlock)(t,{className:n})})))))}var bs=function(e){Object(Pn.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Nn.a)(t);if(n){var o=Object(Nn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Tn.a)(this,e)});function o(){var e;return Object(In.a)(this,o),(e=r.apply(this,arguments)).state={hoveredClassName:null},e.onHoverClassName=e.onHoverClassName.bind(Object(xn.a)(e)),e}return Object(Bn.a)(o,[{key:"onHoverClassName",value:function(e){this.setState({hoveredClassName:e})}},{key:"render",value:function(){var e=this,t=this.props,n=t.blocks,r=t.onTransform,o=t.inserterItems,c=t.hasBlockStyles,i=this.state.hoveredClassName;if(!Array.isArray(n)||!n.length)return null;var a,u=Object(se.a)(n,1)[0],s=Object(d.mapKeys)(o,(function(e){return e.name})),b=Object(d.orderBy)(Object(d.filter)(Object(p.getPossibleBlockTransformations)(n),(function(e){return e&&!!s[e.name]})),(function(e){return s[e.name].frecency}),"desc");if(1===Object(d.uniq)(Object(d.map)(n,"name")).length){var f=u.name,m=Object(p.getBlockType)(f);a=m.icon}else a=ns;var O=!!b.length;if(!c&&!O)return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:Object(C.__)("Block icon"),icon:Object(l.createElement)(xr,{icon:a,showColors:!0})}));var g=1===n.length?Object(C.__)("Change block type or style"):Object(C.sprintf)(
|
49 |
/* translators: %s: number of blocks. */
|
50 |
+
Object(C._n)("Change type of %d block","Change type of %d blocks",n.length),n.length);return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarItem,null,(function(t){return Object(l.createElement)(v.DropdownMenu,{className:"block-editor-block-switcher",label:g,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:Object(l.createElement)(xr,{icon:a,className:"block-editor-block-switcher__toggle",showColors:!0}),toggleProps:t,menuProps:{orientation:"both"}},(function(t){var o=t.onClose;return(c||O)&&Object(l.createElement)("div",{className:"block-editor-block-switcher__container"},O&&Object(l.createElement)(ls,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:b,onSelect:function(e){r(n,e),o()}}),c&&Object(l.createElement)(v.MenuGroup,{label:Object(C.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},null!==i&&Object(l.createElement)(ds,{hoveredBlock:u,hoveredClassName:i}),Object(l.createElement)(as,{clientId:u.clientId,onSwitch:o,onHoverClassName:e.onHoverClassName,itemRole:"menuitem"})))}))})))}}]),o}(l.Component),fs=Object(b.compose)(Object(m.withSelect)((function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlocksByClientId,c=r.getBlockRootClientId,i=r.getInserterItems,a=e(p.store).getBlockStyles,l=c(Object(d.castArray)(n)[0]),u=o(n),s=u&&1===u.length?u[0]:null,b=s&&a(s.name);return{blocks:u,inserterItems:i(l),hasBlockStyles:b&&b.length>0}})),Object(m.withDispatch)((function(e,t){return{onTransform:function(n,r){e("core/block-editor").replaceBlocks(t.clientIds,Object(p.switchToBlockType)(n,r))}}})))(bs),ps=n(47);function ms(){var e=Object(m.useSelect)((function(e){return e("core/block-editor")}),[]).getBlockName,t=Object(m.useSelect)((function(e){return e(p.store)}),[]).getBlockType,n=Object(m.useDispatch)("core/notices").createSuccessNotice;return Object(l.useCallback)((function(r,o){var c="";if(1===o.length){var i=o[0],a=t(e(i)).title;c="copy"===r?Object(C.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph".
|
51 |
+
Object(C.__)('Copied "%s" to clipboard.'),a):Object(C.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
|
52 |
+
Object(C.__)('Moved "%s" to clipboard.'),a)}else c="copy"===r?Object(C.sprintf)(// Translators: %d: Number of blocks being copied.
|
53 |
+
Object(C._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):Object(C.sprintf)(// Translators: %d: Number of blocks being cut.
|
54 |
+
Object(C._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(c,{type:"snackbar"})}),[])}function vs(e){var t=Object(m.useSelect)((function(e){return e("core/block-editor")}),[]),n=t.getBlocksByClientId,r=t.getSelectedBlockClientIds,o=t.hasMultiSelection,c=t.getSettings,i=Object(m.useDispatch)("core/block-editor"),a=i.flashBlock,u=i.removeBlocks,s=i.replaceBlocks,d=ms();Object(l.useEffect)((function(){function t(t){var i=r();if(0!==i.length){if(!o()){var l=t.target.ownerDocument;if("copy"===t.type||"cut"===t.type?Object(ao.documentHasUncollapsedSelection)(l):Object(ao.documentHasSelection)(l))return}if(e.current.contains(t.target)){if(t.preventDefault(),"copy"===t.type||"cut"===t.type){1===i.length&&a(i[0]),d(t.type,i);var b=n(i),f=Object(p.serialize)(b);t.clipboardData.setData("text/plain",f),t.clipboardData.setData("text/html",f)}if("cut"===t.type)u(i);else if("paste"===t.type){var m=c().__experimentalCanUserUseUnfilteredHTML,v=function(e){var t=e.clipboardData,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}var o=Object(ao.getFilesFromDataTransfer)(t).filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}));return o.length&&!r&&(r=o.map((function(e){return'<img src="'.concat(Object(ps.createBlobURL)(e),'">')})).join(""),n=""),{html:r,plainText:n}}(t),O=v.plainText,g=v.html,h=Object(p.pasteHandler)({HTML:g,plainText:O,mode:"BLOCKS",canUserUseUnfilteredHTML:m});s(i,h,h.length-1,-1)}}}}return e.current.addEventListener("copy",t),e.current.addEventListener("cut",t),e.current.addEventListener("paste",t),function(){e.current.removeEventListener("copy",t),e.current.removeEventListener("cut",t),e.current.removeEventListener("paste",t)}}),[])}var Os=function(e){var t=e.children,n=Object(l.useRef)();return vs(n),Object(l.createElement)("div",{ref:n},t)};function gs(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(m.useSelect)((function(e){return e("core/block-editor")}),[]),c=o.canInsertBlockType,i=o.getBlockRootClientId,a=o.getBlocksByClientId,l=o.getTemplateLock,u=Object(m.useSelect)((function(e){return e(p.store)}),[]),s=u.getDefaultBlockName,b=u.getGroupingBlockName,f=a(t),v=i(t[0]),O=Object(d.every)(f,(function(e){return!!e&&Object(p.hasBlockSupport)(e.name,"multiple",!0)&&c(e.name,v)})),g=c(s(),v),h=Object(m.useDispatch)("core/block-editor"),j=h.removeBlocks,k=h.replaceBlocks,y=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,w=h.flashBlock,C=h.setBlockMovingClientId,S=h.setNavigationMode,I=h.selectBlock,B=ms();return n({canDuplicate:O,canInsertDefaultBlock:g,isLocked:!!l(v),rootClientId:v,blocks:f,onDuplicate:function(){return y(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(d.first)(Object(d.castArray)(t)))},onInsertAfter:function(){_(Object(d.last)(Object(d.castArray)(t)))},onMoveTo:function(){S(!0),I(t[0]),C(t[0])},onGroup:function(){if(f.length){var e=b(),n=Object(p.switchToBlockType)(f,e);n&&k(t,n)}},onUngroup:function(){if(f.length){var e=f[0].innerBlocks;e.length&&k(t,e)}},onCopy:function(){var e=f.map((function(e){return e.clientId}));1===f.length&&w(e[0]),B("copy",e)}})}var hs=Object(b.compose)([Object(m.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlock,c=r.getBlockMode,i=r.getSettings,a=o(n),l=i().codeEditingEnabled;return{mode:c(n),blockType:a?Object(p.getBlockType)(a.name):null,isCodeEditingEnabled:l}})),Object(m.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?d.noop:n,o=t.clientId;return{onToggleMode:function(){e("core/block-editor").toggleBlockMode(o),r()}}}))])((function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,c=void 0!==o&&o,i=e.isCodeEditingEnabled,a=void 0===i||i;if(!Object(p.hasBlockSupport)(t,"html",!0)||!a)return null;var u="visual"===n?Object(C.__)("Edit as HTML"):Object(C.__)("Edit visually");return Object(l.createElement)(v.MenuItem,{onClick:r},!c&&u)})),js=Object(b.compose)(Object(m.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),Object(m.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(p.rawHandler)({HTML:Object(p.getBlockContent)(n)}))}}})))((function(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(C.__)("Convert to Blocks");return Object(l.createElement)(v.MenuItem,{onClick:n},!r&&o)})),ks=Object(v.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),ys=ks.Fill,_s=ks.Slot;ys.Slot=_s;var Es=ys;function ws(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ws(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ws(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ss=Object(v.createSlotFill)("BlockSettingsMenuControls"),Is=Ss.Fill,Bs=Ss.Slot;Is.Slot=function(e){var t=e.fillProps,n=e.clientIds,r=void 0===n?null:n,o=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlocksByClientId,o=t.getSelectedBlockClientIds,c=null!==r?r:o();return Object(d.map)(Object(d.compact)(n(c)),(function(e){return e.name}))}),[r]);return Object(l.createElement)(Bs,{fillProps:Cs(Cs({},t),{},{selectedBlocks:o})},(function(e){return!Object(d.isEmpty)(e)&&Object(l.createElement)(v.MenuGroup,null,e)}))};var xs=Is,Ps={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0},Ts=function(e){var t=e.clientIds,n=e.__experimentalSelectBlock,r=e.children,o=Object(Se.a)(e,["clientIds","__experimentalSelectBlock","children"]),c=Object(d.castArray)(t),a=c.length,u=c[0],s=Object(m.useSelect)((function(e){var t=e(to.store).getShortcutRepresentation;return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),b=Object(l.useCallback)(n?function(){var e=Object(oo.a)(ro.a.mark((function e(t){var r;return ro.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:(r=e.sent)&&r[0]&&n(r[0]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}():d.noop,[n]),f=1===a?Object(C.__)("Remove block"):Object(C.__)("Remove blocks");return Object(l.createElement)(gs,{clientIds:t,__experimentalUpdateSelection:!n},(function(e){var n=e.canDuplicate,c=e.canInsertDefaultBlock,m=e.isLocked,O=e.onDuplicate,g=e.onInsertAfter,h=e.onInsertBefore,j=e.onRemove,k=e.onCopy,y=e.onMoveTo,_=e.blocks;return Object(l.createElement)(v.DropdownMenu,Object(i.a)({icon:co.a,label:Object(C.__)("More options"),className:"block-editor-block-settings-menu",popoverProps:Ps,noIcons:!0},o),(function(e){var o=e.onClose;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(Es.Slot,{fillProps:{onClose:o}}),1===a&&Object(l.createElement)(js,{clientId:u}),Object(l.createElement)(v.ClipboardButton,{text:function(){return Object(p.serialize)(_)},role:"menuitem",className:"components-menu-item__button",onCopy:k},Object(C.__)("Copy")),n&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,O,b),shortcut:s.duplicate},Object(C.__)("Duplicate")),c&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,h),shortcut:s.insertBefore},Object(C.__)("Insert Before")),Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,g),shortcut:s.insertAfter},Object(C.__)("Insert After"))),!m&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,y)},Object(C.__)("Move To")),1===a&&Object(l.createElement)(hs,{clientId:u,onToggle:o})),Object(l.createElement)(xs.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):l.Children.map((function(e){return Object(l.cloneElement)(e,{onClose:o})})),Object(l.createElement)(v.MenuGroup,null,!m&&Object(l.createElement)(v.MenuItem,{onClick:Object(d.flow)(o,j,b),shortcut:s.remove},f)))}))}))},Ns=function(e){var t=e.clientIds,n=Object(Se.a)(e,["clientIds"]);return Object(l.createElement)(v.ToolbarGroup,null,Object(l.createElement)(v.ToolbarItem,null,(function(e){return Object(l.createElement)(Ts,Object(i.a)({clientIds:t,toggleProps:e},n))})))},Ds=window,As=Ds.clearTimeout,Rs=Ds.setTimeout;function Ls(e){var t=e.ref,n=e.isFocused,r=e.debounceTimeout,o=void 0===r?200:r,c=e.onChange,i=void 0===c?d.noop:c,a=Object(l.useState)(!1),u=Object(se.a)(a,2),s=u[0],b=u[1],f=Object(l.useRef)(),p=function(e){(null==t?void 0:t.current)&&b(e),i(e)},m=function(){var e=f.current;e&&As&&As(e)};return Object(l.useEffect)((function(){return function(){return m()}}),[]),{showMovers:s,debouncedShowMovers:function(e){e&&e.stopPropagation(),m(),s||p(!0)},debouncedHideMovers:function(e){e&&e.stopPropagation(),m(),f.current=Rs((function(){var e;e=(null==t?void 0:t.current)&&t.current.matches(":hover"),!n&&!e&&p(!1)}),o)}}}function Ms(e){var t=e.hideDragHandle,n=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getBlockMode,o=t.getSelectedBlockClientIds,c=t.isBlockValid,i=t.getBlockRootClientId,a=t.getSettings,l=o(),u=l[0],s=i(u),d=a();return{blockClientIds:l,blockClientId:u,blockType:u&&Object(p.getBlockType)(n(u)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:s,isValid:l.every((function(e){return c(e)})),isVisual:l.every((function(e){return"visual"===r(e)}))}}),[]),r=n.blockClientIds,o=n.blockClientId,c=n.blockType,a=n.hasFixedToolbar,u=n.hasReducedUI,f=n.isValid,O=n.isVisual,g=Object(m.useDispatch)("core/block-editor").toggleBlockHighlight,h=Object(l.useRef)(),j=function(e){var t=e.ref,n=e.debounceTimeout,r=void 0===n?200:n,o=e.onChange,c=void 0===o?d.noop:o,i=Object(l.useState)(!1),a=Object(se.a)(i,2),u=a[0],s=a[1],b=Ls({ref:t,debounceTimeout:r,isFocused:u,onChange:c}),f=b.showMovers,p=b.debouncedShowMovers,m=b.debouncedHideMovers,v=Object(l.useRef)(!1),O=function(){return(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement)};return Object(l.useEffect)((function(){var e=t.current,n=function(){O()&&(s(!0),p())},r=function(){O()||(s(!1),m())};return e&&!v.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),v.current=!0),function(){e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,v,s,p,m]),{showMovers:f,gestures:{onMouseMove:p,onMouseLeave:m}}}({ref:h,onChange:function(e){e&&u||g(o,e)}}),k=j.showMovers,y=j.gestures,_=Object(b.useViewportMatch)("medium","<")||a;if(c&&!Object(p.hasBlockSupport)(c,"__experimentalToolbar",!0))return null;var E=_||k;if(0===r.length)return null;var C=f&&O,S=r.length>1,I=s()("block-editor-block-toolbar",E&&"is-showing-movers");return Object(l.createElement)("div",{className:I},Object(l.createElement)("div",Object(i.a)({ref:h},y),!S&&Object(l.createElement)("div",{className:"block-editor-block-toolbar__block-parent-selector-wrapper"},Object(l.createElement)(ts,{clientIds:r})),(C||S)&&Object(l.createElement)(v.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(l.createElement)(fs,{clientIds:r}),Object(l.createElement)(es,{clientIds:r,hideDragHandle:t||u}))),C&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(w.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"}),Object(l.createElement)(eo.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"})),Object(l.createElement)(Ns,{clientIds:r}))}var Fs=function(e){var t=e.focusOnMount,n=Object(Se.a)(e,["focusOnMount"]),r=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getSelectedBlockClientIds,o=e(p.store).getBlockType,c=r()[0];return{blockType:c&&o(n(c))}}),[]).blockType;return r&&!Object(p.hasBlockSupport)(r,"__experimentalToolbar",!0)?null:Object(l.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(l.createElement)(Xu,Object(i.a)({focusOnMount:t,className:"block-editor-block-contextual-toolbar"
|
55 |
+
/* translators: accessibility text for the block toolbar */,"aria-label":Object(C.__)("Block tools")},n),Object(l.createElement)(Ms,null)))};function Vs(e){var t=e("core/block-editor"),n=t.isNavigationMode,r=t.isMultiSelecting,o=t.hasMultiSelection,c=t.isTyping,i=t.isCaretWithinFormattedText,a=t.getSettings,l=t.getLastMultiSelectedBlockClientId;return{isNavigationMode:n(),isMultiSelecting:r(),isTyping:c(),isCaretWithinFormattedText:i(),hasMultiSelection:o(),hasFixedToolbar:a().hasFixedToolbar,lastClientId:l()}}function Hs(e){var t=e.clientId,n=e.rootClientId,r=e.isValid,o=e.isEmptyDefaultBlock,c=e.capturingClientId,i=Object(m.useSelect)(Vs,[]),a=i.isNavigationMode,u=i.isMultiSelecting,d=i.isTyping,f=i.isCaretWithinFormattedText,p=i.hasMultiSelection,O=i.hasFixedToolbar,g=i.lastClientId,h=Object(b.useViewportMatch)("medium"),j=Object(l.useState)(!1),k=Object(se.a)(j,2),y=k[0],_=k[1],E=Object(l.useState)(!1),w=Object(se.a)(E,2),C=w[0],S=w[1],I=Object(l.useContext)(Ks),B=!d&&!a&&o&&r,x=a,P=!a&&!O&&h&&!B&&!u&&(!d||f),T=!(a||P||O||o);Object(to.useShortcut)("core/block-editor/focus-toolbar",Object(l.useCallback)((function(){_(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!T});var N=Object(l.useRef)();if(Object(l.useEffect)((function(){N.current=void 0}),[t]),!(x||P||y||B))return null;var D=I[t];if(!D)return null;var A=D.ownerDocument;c&&(D=et(c,A));var R=D;if(p){var L=I[g];if(!L)return null;R={top:D,bottom:L}}var M=B?"top left right":"top right left",F=B?void 0:Object(ao.getScrollContainer)(D)||A.body;return Object(l.createElement)(v.Popover,{noArrow:!0,animate:!1,position:M,focusOnMount:!1,anchorRef:R,className:"block-editor-block-list__block-popover",__unstableStickyBoundaryElement:F,__unstableSlotName:"block-toolbar",__unstableBoundaryParent:!0,__unstableObserveElement:D,onFocusOutside:function(){_(!1)},shouldAnchorIncludePadding:!0},(P||y)&&Object(l.createElement)("div",{onFocus:function(){S(!0)},onBlur:function(){S(!1)},tabIndex:-1,className:s()("block-editor-block-list__block-popover-inserter",{"is-visible":C})},Object(l.createElement)(Hu,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(P||y)&&Object(l.createElement)(Fs,{focusOnMount:y,__experimentalInitialIndex:N.current,__experimentalOnIndexChange:function(e){N.current=e}}),x&&Object(l.createElement)($u,{clientId:t,rootClientId:n}),B&&Object(l.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(l.createElement)(Hu,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function zs(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getFirstMultiSelectedBlockClientId,o=t.getBlockRootClientId,c=t.__unstableGetBlockWithoutInnerBlocks,i=t.getBlockParents,a=t.__experimentalGetBlockListSettingsForBlocks,l=n()||r();if(l){var u,s=c(l)||{},b=s.name,f=s.attributes,m=void 0===f?{}:f,v=s.isValid,O=i(l),g=a(O),h=Object(d.findIndex)(g,["__experimentalCaptureToolbars",!0]);return-1!==h&&(u=O[h]),{clientId:l,rootClientId:o(l),name:b,isValid:v,isEmptyDefaultBlock:b&&Object(p.isUnmodifiedDefaultBlock)({name:b,attributes:m}),capturingClientId:u}}}function Gs(){var e=Object(m.useSelect)(zs,[]);if(!e)return null;var t=e.clientId,n=e.rootClientId,r=e.name,o=e.isValid,c=e.isEmptyDefaultBlock,i=e.capturingClientId;return r?Object(l.createElement)(Hs,{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:c,capturingClientId:i}):null}var Us=Object(l.createContext)(),Ks=Object(l.createContext)(),Ws=Object(l.createContext)();function qs(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.hasMultiSelection;return{selectedBlockClientId:n(),hasMultiSelection:r()}}function $s(e){nt(e.target)&&e.preventDefault()}var Ys=Object(l.forwardRef)((function(e,t){var n=e.children,r=e.className,o=Object(m.useSelect)(qs,[]),c=o.selectedBlockClientId,i=o.hasMultiSelection,a=Object(m.useDispatch)("core/block-editor").selectBlock,u=function(e){var t=Object(m.useSelect)(zo,[]),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.multiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.selectedBlockClientId,u=Object(m.useDispatch)("core/block-editor"),s=u.startMultiSelect,d=u.stopMultiSelect,b=u.multiSelect,f=u.selectBlock,p=Object(l.useRef)(),v=Object(l.useRef)(),O=Object(l.useRef)();Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;if(c&&!r){var i=o.length;if(!(i<2)){var l=o[0],u=o[i-1],s=et(l,t),d=et(u,t),b=n.getSelection(),f=t.createRange();s=Ho(s,"start"),d=Ho(d,"end"),f.setStartBefore(s),f.setEndAfter(d),b.removeAllRanges(),b.addRange(f)}}else{if(!a||r)return;var p=n.getSelection();if(p.rangeCount&&!p.isCollapsed){var m=et(a,t),v=p.getRangeAt(0),O=v.startContainer,g=v.endContainer;!m||m.contains(O)&&m.contains(g)||p.removeAllRanges()}}}),[c,r,o,f,a]);var g=Object(l.useCallback)((function(t){var n=t.isSelectionEnd,r=e.current.ownerDocument.defaultView.getSelection();if(r.rangeCount&&!r.isCollapsed){var o=nt(r.focusNode);if(v.current===o){if(f(o),n&&(Go(e.current,!0),r.rangeCount)){var c=r.getRangeAt(0).commonAncestorContainer;O.current.contains(c)&&O.current.focus()}}else{var a=[].concat(Object(ue.a)(i(v.current)),[v.current]),l=[].concat(Object(ue.a)(i(o)),[o]),u=Math.min(a.length,l.length)-1;b(a[u],l[u])}}else Go(e.current,!0)}),[f,i,b]),h=Object(l.useCallback)((function(){var t=e.current.ownerDocument,n=t.defaultView;t.removeEventListener("selectionchange",g),n.removeEventListener("mouseup",h),p.current=n.requestAnimationFrame((function(){g({isSelectionEnd:!0}),d()}))}),[g,d]);return Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;return function(){t.removeEventListener("selectionchange",g),n.removeEventListener("mouseup",h),n.cancelAnimationFrame(p.current)}}),[g,h]),Object(l.useCallback)((function(t){if(n){var r=e.current.ownerDocument,o=r.defaultView;v.current=t,O.current=r.activeElement,s(),r.addEventListener("selectionchange",g),o.addEventListener("mouseup",h),Go(e.current,!1)}}),[n,s,h])}(t),d=Object(l.useState)({}),b=Object(se.a)(d,2),f=b[0],p=b[1],v=function(e){var t=Object(l.useState)(!1),n=Object(se.a)(t,2),r=n[0],o=n[1],c=Object(l.useState)(!1),i=Object(se.a)(c,2),a=i[0],u=i[1],s=Object(l.useState)(null),d=Object(se.a)(s,2),b=d[0],f=d[1],p=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.isMultiSelecting,r=t.isBlockInsertionPointVisible,o=t.getBlockInsertionPoint,c=t.getBlockOrder,i=o(),a=c(i.rootClientId);return{isMultiSelecting:n(),isInserterVisible:r(),selectedClientId:a[i.index],selectedRootClientId:i.rootClientId}}),[]),v=p.isMultiSelecting,O=p.isInserterVisible,g=p.selectedClientId,h=p.selectedRootClientId,j=Object(l.useCallback)((function(e){if(e.target.classList.contains("block-editor-block-list__layout")){var t=e.target.getBoundingClientRect(),n=e.clientY-t.top,c=Array.from(e.target.children).find((function(e){return e.offsetTop>n}));if(c&&(c.id||(c=c.firstElementChild))){var i=c.id.slice("block-".length);if(i){var a=c.getBoundingClientRect();e.clientX>a.right||e.clientX<a.left?r&&o(!1):(o(!0),f(i))}}}else r&&o(!1)}),[r,o,f]),k=!a&&!v;return Object(l.useEffect)((function(){if(k)return e.current.addEventListener("mousemove",j),function(){e.current.removeEventListener("mousemove",j)}}),[k,j]),!v&&(r||a||O)&&Object(l.createElement)(qu,{clientId:O?g:b,rootClientId:h,isInserterShown:r,isInserterForced:a,setIsInserterForced:u,containerRef:e,showInsertionPoint:O})}(t);return Object(l.createElement)(Ks.Provider,{value:f},v,Object(l.createElement)(Gs,null),Object(l.createElement)("div",{ref:t,className:s()(r,"is-root-container"),onFocus:function(e){if(!i){var t=nt(e.target);t&&t!==c&&a(t)}},onDragStart:$s},Object(l.createElement)(Ws.Provider,{value:p},Object(l.createElement)(Us.Provider,{value:u},n))))}));function Xs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xs(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.__unstableIsHtml,r=Object(l.useRef)(),o=e.ref||r,c=Object(l.useContext)(Us),i=Object(l.useContext)(Ws),u=Object(l.useContext)(rd),b=u.clientId,f=u.rootClientId,p=u.isSelected,v=u.isFirstMultiSelected,O=u.isLastMultiSelected,g=u.isPartOfMultiSelection,h=u.enableAnimation,j=u.index,k=u.className,y=u.name,_=u.mode,E=u.blockTitle,w=u.wrapperProps,S=void 0===w?{}:w,I=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlocksInitialCaretPosition,r=t.isMultiSelecting,o=t.isNavigationMode;return{shouldFocusFirstElement:p&&!r()&&!o(),initialPosition:p?n():void 0,isNavigationMode:o}}),[p]),B=I.initialPosition,x=I.shouldFocusFirstElement,P=I.isNavigationMode,T=Object(m.useDispatch)("core/block-editor"),N=T.insertDefaultBlock,D=T.removeBlock,A=Object(l.useState)(!1),R=Object(se.a)(A,2),L=R[0],M=R[1];Object(l.useEffect)((function(){if(p||v||O){var e=o.current;return i((function(t){return Qs(Qs({},t),{},Object(a.a)({},b,e))})),function(){i((function(e){return Object(d.omit)(e,b)}))}}}),[p,v,O]),Object(l.useEffect)((function(){var e=o.current;i((function(t){return t[b]&&t[b]!==e?Qs(Qs({},t),{},Object(a.a)({},b,e)):t}))}));// translators: %s: Type of block (i.e. Text, Image etc)
|
56 |
+
var F=Object(C.sprintf)(Object(C.__)("Block: %s"),E),V=function(){var e=o.current.ownerDocument;if(!e.activeElement||!tt(o.current,e.activeElement)){var t=ao.focus.tabbable.find(o.current).filter((function(e){return Object(ao.isTextField)(e)&&tt(o.current,e)&&!e.closest(".block-list-appender")})),n=-1===B,r=(n?d.last:d.first)(t)||o.current;Object(ao.placeCaretAtHorizontalEdge)(r,n)}};Object(l.useEffect)((function(){x&&V()}),[x]),so(o,p||g,p||v,h,j),Object(l.useEffect)((function(){if(p)return o.current.addEventListener("keydown",e),o.current.addEventListener("mouseleave",t),function(){o.current.removeEventListener("mouseleave",t),o.current.removeEventListener("keydown",e)};function e(e){var t=e.keyCode,n=e.target;t!==Dt.ENTER&&t!==Dt.BACKSPACE&&t!==Dt.DELETE||n!==o.current||Object(ao.isTextField)(n)||(e.preventDefault(),t===Dt.ENTER?N({},f,j+1):D(b))}function t(e){1===e.buttons&&c(b)}}),[p,c,N,D]),Object(l.useEffect)((function(){if(P)return o.current.addEventListener("mouseover",e),o.current.addEventListener("mouseout",t),function(){o.current.removeEventListener("mouseover",e),o.current.removeEventListener("mouseout",t)};function e(e){e.defaultPrevented||(e.preventDefault(),L||M(!0))}function t(e){e.defaultPrevented||(e.preventDefault(),L&&M(!1))}}),[P,L,M]);var H="html"!==_||n?"":"-visual";return Qs(Qs(Qs({},S),e),{},{ref:o,id:"block-".concat(b).concat(H),tabIndex:0,role:"group","aria-label":F,"data-block":b,"data-type":y,"data-title":E,className:s()(k,e.className,S.className,{"is-hovered":L}),style:Qs(Qs({},S.style),e.style)})}Zs.save=p.__unstableGetBlockProps;var Js=Object(l.forwardRef)((function(e,t){var n=e.children,r=e.tagName,o=void 0===r?"div":r,c=Object(Se.a)(e,["children","tagName"]);Vo()("wp.blockEditor.__experimentalBlock",{alternative:"wp.blockEditor.useBlockProps"});var i=Zs(Qs(Qs({},c),{},{ref:t}));return Object(l.createElement)(o,i,n)})),ed=["p","div","h1","h2","h3","h4","h5","h6","ol","ul","li","figure","nav","pre","header","section","aside","footer","main"].reduce((function(e,t){return e[t]=Object(l.forwardRef)((function(e,n){return Object(l.createElement)(Js,Object(i.a)({},e,{ref:n,tagName:t}))})),e}),Js);function td(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?td(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):td(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rd=Object(l.createContext)();function od(e){var t=e.children,n=e.isHtml,r=Object(Se.a)(e,["children","isHtml"]);return Object(l.createElement)("div",Zs(r,{__unstableIsHtml:n}),t)}var cd=Object(m.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),c=o.isBlockSelected,i=o.isAncestorMultiSelected,a=o.isBlockMultiSelected,l=o.isFirstMultiSelectedBlock,u=o.getLastMultiSelectedBlockClientId,s=o.isTyping,d=o.getBlockMode,b=o.isSelectionEnabled,f=o.hasSelectedInnerBlock,p=o.getTemplateLock,m=o.__unstableGetBlockWithoutInnerBlocks,v=o.getMultiSelectedBlockClientIds,O=m(n),g=c(n),h=p(r),j=f(n,!0),k=O||{},y=k.name,_=k.attributes,E=k.isValid,w=l(n);return{isMultiSelected:a(n),isPartOfMultiSelection:a(n)||i(n),isFirstMultiSelected:w,isLastMultiSelected:u()===n,multiSelectedClientIds:w?v():void 0,isTypingWithinBlock:(g||j)&&s(),mode:d(n),isSelectionEnabled:b(),isLocked:!!h,block:O,name:y,attributes:_,isValid:E,isSelected:g,isAncestorOfSelectedBlock:j}})),id=Object(m.withDispatch)((function(e,t,n){var r=n.select,o=e("core/block-editor"),c=o.updateBlockAttributes,i=o.insertBlocks,a=o.mergeBlocks,l=o.replaceBlocks,u=o.toggleSelection,s=o.__unstableMarkLastChangeAsPersistent;return{setAttributes:function(e){var n=t.clientId,r=t.isFirstMultiSelected,o=t.multiSelectedClientIds;c(r?o:[n],e)},onInsertBlocks:function(e,n){var r=t.rootClientId;i(e,n,r)},onInsertBlocksAfter:function(e){var n=t.clientId,o=t.rootClientId,c=(0,r("core/block-editor").getBlockIndex)(n,o);i(e,c+1,o)},onMerge:function(e){var n=t.clientId,o=r("core/block-editor"),c=o.getPreviousBlockClientId,i=o.getNextBlockClientId;if(e){var l=i(n);l&&a(n,l)}else{var u=c(n);u&&a(u,n)}},onReplace:function(e,n,r){e.length&&!Object(p.isUnmodifiedDefaultBlock)(e[e.length-1])&&s(),l([t.clientId],e,n,r)},toggleSelection:function(e){u(e)}}})),ad=Object(b.compose)(b.pure,cd,id,Object(b.ifCondition)((function(e){return!!e.block})),Object(v.withFilters)("editor.BlockListBlock"))((function(e){var t,n,r,o=e.mode,c=e.isLocked,a=e.clientId,u=e.rootClientId,f=e.isSelected,v=e.isMultiSelected,O=e.isPartOfMultiSelection,g=e.isFirstMultiSelected,h=e.isLastMultiSelected,j=e.isTypingWithinBlock,k=e.isAncestorOfSelectedBlock,y=e.isSelectionEnabled,_=e.className,E=e.name,w=e.isValid,C=e.attributes,S=e.wrapperProps,I=e.setAttributes,B=e.onReplace,x=e.onInsertBlocksAfter,P=e.onMerge,T=e.toggleSelection,N=e.index,D=e.enableAnimation,A=e.activeEntityBlockId,R=Object(b.useViewportMatch)("medium"),L=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.isBlockBeingDragged,r=t.isBlockHighlighted,o=t.getSettings;return{isDragging:n(a),isHighlighted:r(a),isFocusMode:o().focusMode}}),[a]),M=L.isDragging,F=L.isHighlighted,V=L.isFocusMode,H=Object(m.useDispatch)("core/block-editor").removeBlock,z=Object(l.useCallback)((function(){return H(a)}),[a]),G=Object(l.useState)(!1),U=Object(se.a)(G,2),K=U[0],W=U[1],q=Object(p.getBlockType)(E),$=q.apiVersion>1||Object(p.hasBlockSupport)(q,"lightBlockWrapper",!1),Y=E===Object(p.getUnregisteredTypeHandlerName)();q.getEditWrapperProps&&(t=S,n=q.getEditWrapperProps(C),r=nd(nd({},t),n),t&&n&&t.className&&n.className&&(r.className=s()(t.className,n.className)),t&&n&&t.style&&n.style&&(r.style=nd(nd({},t.style),n.style)),S=r);var X=$&&Object(p.hasBlockSupport)(q,"className",!0)?Object(p.getBlockDefaultClassName)(E):null,Q=$?C.className:null,Z=S&&!!S["data-align"],J=s()(X,Q,"block-editor-block-list__block",{"wp-block":!Z,"has-warning":!w||!!K||Y,"is-selected":f&&!M,"is-highlighted":F,"is-multi-selected":v,"is-reusable":Object(p.isReusableBlock)(q),"is-dragging":M,"is-typing":j,"is-focused":V&&R&&(f||k),"is-focus-mode":V&&R,"has-child-selected":k&&!M,"is-active-entity":A===a},_),ee=Object(l.createElement)(Yr,{name:E,isSelected:f,attributes:C,setAttributes:I,insertBlocksAfter:c?void 0:x,onReplace:c?void 0:B,onRemove:c?void 0:z,mergeBlocks:c?void 0:P,clientId:a,isSelectionEnabled:y,toggleSelection:T});if(Z){var te={"data-align":S["data-align"]};ee=Object(l.createElement)("div",Object(i.a)({className:"wp-block"},te),ee)}var ne,re={clientId:a,rootClientId:u,isSelected:f,isFirstMultiSelected:g,isLastMultiSelected:h,isPartOfMultiSelection:O,enableAnimation:D,index:N,className:J,isLocked:c,name:E,mode:o,blockTitle:q.title,wrapperProps:Object(d.omit)(S,["data-align"])},oe=Object(l.useMemo)((function(){return re}),Object.values(re));return ne=w?"html"===o?Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{style:{display:"none"}},ee),Object(l.createElement)(od,{isHtml:!0},Object(l.createElement)(Mo,{clientId:a}))):$?ee:Object(l.createElement)(od,S,ee):Object(l.createElement)(od,null,Object(l.createElement)(To,{clientId:a}),Object(l.createElement)("div",null,Object(p.getSaveElement)(q,C))),Object(l.createElement)(rd.Provider,{value:oe},Object(l.createElement)(Ao,{onError:function(){return W(!0)}},ne),!!K&&Object(l.createElement)(od,null,Object(l.createElement)(Do,null)))})),ld=function(e,t,n){return Object(C.sprintf)(
|
57 |
/* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
|
58 |
+
Object(C.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)},ud=Object(l.forwardRef)((function e(t,n){var r=t.className,o=t.block,c=t.isSelected,i=t.onClick,a=t.position,u=t.siblingBlockCount,d=t.level,f=t.tabIndex,m=t.onFocus,O=t.onDragStart,g=t.onDragEnd,h=t.draggable,j=o.name,k=o.attributes,y=Object(p.getBlockType)(j),_=Object(p.__experimentalGetBlockLabel)(y,k),E=Object(b.useInstanceId)(e),w="block-navigation-block-select-button__".concat(E),S=ld(a,u,d);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,{className:s()("block-editor-block-navigation-block-select-button",r),onClick:i,"aria-describedby":w,ref:n,tabIndex:f,onFocus:m,onDragStart:O,onDragEnd:g,draggable:h},Object(l.createElement)(xr,{icon:y.icon,showColors:!0}),_,c&&Object(l.createElement)(v.VisuallyHidden,null,Object(C.__)("(selected block)"))),Object(l.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:w},S))}));function sd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bd=function(e){return"BlockNavigationBlock-".concat(e)},fd=Object(l.forwardRef)((function e(t,n){var r=Object(b.useInstanceId)(e),o=t.block.clientId;return Object(l.createElement)(v.Slot,{name:bd(o)},(function(e){if(!e.length)return Object(l.createElement)(ud,Object(i.a)({ref:n},t));var o=t.className,c=t.block,a=t.isSelected,u=t.position,d=t.siblingBlockCount,b=t.level,f=t.tabIndex,m=t.onFocus,O=c.name,g=Object(p.getBlockType)(O),h="block-navigation-block-slot__".concat(r),j=ld(u,d,b),k={tabIndex:f,onFocus:m,ref:n,"aria-describedby":h};return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:s()("block-editor-block-navigation-block-slot",o)},Object(l.createElement)(xr,{icon:g.icon,showColors:!0}),l.Children.map(e,(function(e){return Object(l.cloneElement)(e,dd(dd({},e.props),k))})),a&&Object(l.createElement)(v.VisuallyHidden,null,Object(C.__)("(selected block)")),Object(l.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:h},j)))}))})),pd=function(e){var t=Object(l.useContext)(rd).clientId;return Object(l.createElement)(v.Fill,Object(i.a)({},e,{name:bd(t)}))},md=Object(l.forwardRef)((function(e,t){var n=e.onClick,r=e.block,o=e.isSelected,c=e.position,a=e.siblingBlockCount,u=e.level,d=Object(Se.a)(e,["onClick","block","isSelected","position","siblingBlockCount","level"]),b=wo(),f=b.__experimentalFeatures,p=b.blockDropTarget,v=void 0===p?{}:p,O=r.clientId,g=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockRootClientId,r=t.hasBlockMovingClientId,o=t.getSelectedBlockClientId;return{rootClientId:n(O)||"",blockMovingClientId:r(),selectedBlockInBlockEditor:o()}}),[O]),h=g.rootClientId,j=g.blockMovingClientId,k=g.selectedBlockInBlockEditor,y=j&&k===O,_=v.rootClientId,E=v.clientId,w=v.dropPosition,C=_===h&&E===O&&"top"===w,S=_===h&&E===O&&"bottom"===w,I=_===O&&"inside"===w,B=s()("block-editor-block-navigation-block-contents",{"is-dropping-before":C||y,"is-dropping-after":S,"is-dropping-to-inner-blocks":I});return Object(l.createElement)(Ju,{clientIds:[r.clientId],elementId:"block-navigation-block-".concat(r.clientId)},(function(e){var s=e.isDraggable,b=e.onDraggableStart,p=e.onDraggableEnd;return f?Object(l.createElement)(fd,Object(i.a)({ref:t,className:B,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:a,level:u,draggable:s&&f,onDragStart:b,onDragEnd:p},d)):Object(l.createElement)(ud,Object(i.a)({ref:t,className:B,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:a,level:u,draggable:s&&f,onDragStart:b,onDragEnd:p},d))}))}));function vd(e){var t=e.block,n=e.isSelected,r=e.onClick,o=e.position,c=e.level,i=e.rowCount,a=e.siblingBlockCount,u=e.showBlockMovers,d=e.terminatedLevels,b=e.path,f=Object(l.useRef)(null),p=Object(l.useState)(!1),O=Object(se.a)(p,2),g=O[0],h=O[1],j=Object(l.useState)(!1),k=Object(se.a)(j,2),y=k[0],_=k[1],E=t.clientId,w=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.isBlockBeingDragged,r=t.isAncestorBeingDragged;return n(E)||r(E)}),[E]),S=Object(m.useDispatch)("core/block-editor").selectBlock,I=u&&a>0,B=g||y,x=s()("block-editor-block-navigation-block__mover-cell",{"is-visible":B}),P=wo().__experimentalFeatures,T=s()("block-editor-block-navigation-block__menu-cell",{"is-visible":B});return Object(l.useEffect)((function(){P&&n&&f.current.focus()}),[P,n]),Object(l.createElement)(fo,{className:s()({"is-selected":n,"is-dragging":w}),onMouseEnter:function(){return h(!0)},onMouseLeave:function(){return h(!1)},onFocus:function(){return _(!0)},onBlur:function(){return _(!1)},level:c,position:o,rowCount:i,path:b,id:"block-navigation-block-".concat(E),"data-block":E},Object(l.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:I?void 0:2,ref:f},(function(e){var u=e.ref,s=e.tabIndex,b=e.onFocus;return Object(l.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(l.createElement)(_o,{level:c,isLastRow:o===i,terminatedLevels:d}),Object(l.createElement)(md,{block:t,onClick:function(){return r(t.clientId)},isSelected:n,position:o,siblingBlockCount:a,level:c,ref:u,tabIndex:s,onFocus:b}))})),I&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.__experimentalTreeGridCell,{className:x,withoutGridItem:!0},Object(l.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(ko,{orientation:"vertical",clientIds:[E],ref:t,tabIndex:n,onFocus:r})})),Object(l.createElement)(v.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(yo,{orientation:"vertical",clientIds:[E],ref:t,tabIndex:n,onFocus:r})})))),P&&Object(l.createElement)(v.__experimentalTreeGridCell,{className:T},(function(e){var t=e.ref,n=e.tabIndex,o=e.onFocus;return Object(l.createElement)(Ts,{clientIds:[E],icon:co.a,toggleProps:{ref:t,tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(function(e){var t=e.onClose;return Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(v.MenuItem,{onClick:Object(oo.a)(ro.a.mark((function e(){return ro.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S(null);case 2:return e.next=4,S(E);case 4:t();case 5:case"end":return e.stop()}}),e)})))},Object(C.__)("Go to block")))}))})))}function Od(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.terminatedLevels,i=e.path,a=Object(m.useSelect)((function(e){var n=e("core/block-editor"),r=n.isBlockBeingDragged,o=n.isAncestorBeingDragged;return r(t)||o(t)}),[t]),u=Object(b.useInstanceId)(Od),d="block-navigation-appender-row__description_".concat(u),f=Object(C.sprintf)(
|
59 |
/* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
|
60 |
+
Object(C.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(l.createElement)(fo,{className:s()({"is-dragging":a}),level:r,position:n,rowCount:o,path:i},Object(l.createElement)(v.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var i=e.ref,a=e.tabIndex,u=e.onFocus;return Object(l.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(l.createElement)(_o,{level:r,isLastRow:n===o,terminatedLevels:c}),Object(l.createElement)(Hu,{rootClientId:t,__experimentalIsQuick:!0,__experimentalSelectBlockOnInsert:!1,"aria-describedby":d,toggleProps:{ref:i,tabIndex:a,onFocus:u}}),Object(l.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:d},f))})))}function gd(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientId,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,a=e.parentBlockClientId,u=e.level,s=void 0===u?1:u,b=e.terminatedLevels,f=void 0===b?[]:b,p=e.path,m=void 0===p?[]:p,v=!a,O=Object(d.compact)(t),g=function(e){return o&&!v&&r===e},h=g(a),j=O.length,k=h?j+1:j,y=k;return Object(l.createElement)(l.Fragment,null,Object(d.map)(O,(function(e,t){var a=e.clientId,u=e.innerBlocks,d=t+1,b=k===d?[].concat(Object(ue.a)(f),[s]):f,p=[].concat(Object(ue.a)(m),[d]),v=i&&!!u&&!!u.length,O=g(a);return Object(l.createElement)(l.Fragment,{key:a},Object(l.createElement)(vd,{block:e,onClick:n,isSelected:r===a,level:s,position:d,rowCount:k,siblingBlockCount:j,showBlockMovers:c,terminatedLevels:f,path:p}),(v||O)&&Object(l.createElement)(gd,{blocks:u,selectedBlockClientId:r,selectBlock:n,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:a,level:s+1,terminatedLevels:b,path:p}))})),h&&Object(l.createElement)(Od,{parentBlockClientId:a,position:k,rowCount:y,level:s,terminatedLevels:f,path:[].concat(Object(ue.a)(m),[y])}))}function hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kd(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}gd.defaultProps={selectBlock:function(){}};var yd=["top","bottom"];function _d(e){var t=Object(l.useState)(),n=Object(se.a)(t,2),r=n[0],o=void 0===r?{}:r,c=n[1],i=Gl(o.rootClientId,o.blockIndex),u=Object(v.__unstableUseDropZone)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({element:e,withPosition:!0},i)),s=u.position,d=u.type,b=function(e,t,n){var r=Object(m.useSelect)((function(e){var t=e("core/block-editor");return{canInsertBlocks:t.canInsertBlocks,getBlockRootClientId:t.getBlockRootClientId,getBlockIndex:t.getBlockIndex,getBlockCount:t.getBlockCount,getDraggedBlockClientIds:t.getDraggedBlockClientIds}}),[]),o=r.getBlockRootClientId,c=r.getBlockIndex,i=r.getBlockCount,a=r.getDraggedBlockClientIds,u=r.canInsertBlocks,s=Object(l.useRef)(),d=!!t;return Object(l.useEffect)((function(){if(e.current&&d){var t="default"===n,r=t?a():void 0,l=Array.from(e.current.querySelectorAll("[data-block]"));s.current=l.map((function(e){var n=e.dataset.block,a=o(n);return{clientId:n,rootClientId:a,blockIndex:c(n,a),element:e,isDraggedBlock:!!t&&r.includes(n),innerBlockCount:i(n),canInsertDraggedBlocksAsSibling:!t||u(r,a),canInsertDraggedBlocksAsChild:!t||u(r,n)}}))}}),[e,d,n,u,i,c,o,a]),s}(e,s,d);if(Object(l.useEffect)((function(){if(s){var e=function(e,t){var n,r,o,c,i,a=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return jd(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jd(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;if(!l.isDraggedBlock){var u=l.element.getBoundingClientRect(),s=Kl(t,u,yd),d=Object(se.a)(s,2),b=d[0],f=d[1],p=kd(t,u);if(void 0===o||b<o||p){o=b;var m=e.indexOf(l),v=e[m-1];if("top"===f&&v&&v.rootClientId===l.rootClientId&&!v.isDraggedBlock?(r=v,n="bottom",c=v.element.getBoundingClientRect()):(r=l,n=f,c=u),p)break}}}}catch(e){a.e(e)}finally{a.f()}if(r){var O="bottom"===n;if(O&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0||function(e,t){var n=t.left+t.width/2;return e.x>n}(t,c)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(r.canInsertDraggedBlocksAsSibling){var g=O?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+g,dropPosition:n}}}}(b.current,s);e&&c(e)}}),[b,s]),s)return o}function Ed(e){var t=e.__experimentalFeatures,n=Object(Se.a)(e,["__experimentalFeatures"]),r=Object(l.useRef)(),o=_d(r);t||(o=void 0);var c=Object(l.useMemo)((function(){return{__experimentalFeatures:t,blockDropTarget:o}}),[t,o]);return Object(l.createElement)(v.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(C.__)("Block navigation structure"),ref:r},Object(l.createElement)(Eo.Provider,{value:c},Object(l.createElement)(gd,n)))}var wd=Object(b.compose)(Object(m.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getBlockHierarchyRootClientId,o=t.__unstableGetBlockWithBlockTree,c=t.__unstableGetBlockTree,i=n();return{rootBlocks:c(),rootBlock:i?o(r(i)):null,selectedBlockClientId:i}})),Object(m.withDispatch)((function(e,t){var n=t.onSelect,r=void 0===n?d.noop:n;return{selectBlock:function(t){e("core/block-editor").selectBlock(t),r(t)}}})))((function(e){var t=e.rootBlock,n=e.rootBlocks,r=e.selectedBlockClientId,o=e.selectBlock,c=e.__experimentalFeatures;if(!n||0===n.length)return null;var i=t&&(t.clientId!==r||t.innerBlocks&&0!==t.innerBlocks.length);return Object(l.createElement)("div",{className:"block-editor-block-navigation__container"},Object(l.createElement)("p",{className:"block-editor-block-navigation__label"},Object(C.__)("List view")),i&&Object(l.createElement)(Ed,{blocks:[t],selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c,showNestedBlocks:!0}),!i&&Object(l.createElement)(Ed,{blocks:n,selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c}))})),Cd=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Object(l.createElement)(v.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));function Sd(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(Se.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object(to.useShortcut)("core/edit-post/toggle-block-navigation",Object(l.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var a=Object(m.useSelect)((function(e){return e(to.store).getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(l.createElement)(v.Button,Object(i.a)({},c,{ref:o,icon:Cd,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0
|
61 |
+
/* translators: button label text should, if possible, be under 16 characters. */,label:Object(C.__)("Outline"),className:"block-editor-block-navigation",shortcut:a,"aria-disabled":!t}))}var Id=Object(l.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(Se.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(m.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[])&&!n;return Object(l.createElement)(v.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(l.createElement)(Sd,Object(i.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(l.createElement)(wd,{onSelect:t,__experimentalFeatures:r})}})})),Bd=n(129),xd=[Dt.rawShortcut.primary("z"),Dt.rawShortcut.primaryShift("z"),Dt.rawShortcut.primary("y")],Pd=Object(l.createElement)(v.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(d.fromPairs)(xd.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),Td=function(){return Pd};function Nd(e){return e.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)})).map((function(e){return'<img src="'.concat(Object(ps.createBlobURL)(e),'">')})).join("")}var Dd={position:"bottom right",isAlternate:!0},Ad=function(){return Object(l.createElement)("div",{className:"block-editor-format-toolbar"},Object(l.createElement)(v.ToolbarGroup,null,["bold","italic","link","text-color"].map((function(e){return Object(l.createElement)(v.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(l.createElement)(v.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(l.createElement)(v.ToolbarItem,null,(function(t){return Object(l.createElement)(v.DropdownMenu,{icon:Oo.a,label:Object(C.__)("More rich text controls"),toggleProps:t,controls:Object(d.orderBy)(e.map((function(e){return Object(se.a)(e,1)[0].props})),"title"),popoverProps:Dd})}))}))))},Rd=function(e){var t=e.inline,n=e.anchorRef;return t?Object(l.createElement)(v.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar"},Object(l.createElement)(Ad,null)):Object(l.createElement)(eo,null,Object(l.createElement)(Ad,null))};function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Md(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ld(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ld(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fd(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Vd(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?Vd.EMPTY_ARRAY:t||n?t||(Vo()("wp.blockEditor.RichText formattingControls prop",{alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}Vd.EMPTY_ARRAY=[];var Hd=Object(l.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,a=t.value,u=t.onChange,d=t.isSelected,f=t.multiline,v=t.inlineToolbar,O=t.wrapperClassName,g=t.autocompleters,j=t.onReplace,k=t.placeholder,y=t.keepPlaceholderOnFocus,_=t.allowedFormats,E=t.formattingControls,w=t.withoutInteractiveFormatting,C=t.onRemove,S=t.onMerge,I=t.onSplit,B=t.__unstableOnSplitAtEnd,x=t.__unstableOnSplitMiddle,P=t.identifier,T=t.preserveWhiteSpace,N=t.__unstablePastePlainText,D=t.__unstableEmbedURLOnPaste,A=t.__unstableDisableFormats,R=t.disableLineBreaks,L=t.unstableOnFocus,M=t.__unstableAllowPrefixTransformations,F=t.__unstableMultilineRootTag,V=t.__unstableMobileNoFocusOnMount,H=t.deleteEnter,z=t.placeholderTextColor,G=t.textAlign,U=t.selectionColor,K=t.tagsToEliminate,W=t.rootTagsToEliminate,q=t.disableEditingMenu,$=t.fontSize,Y=t.fontFamily,X=t.fontWeight,Q=t.fontStyle,Z=t.minWidth,J=t.maxWidth,ee=t.onBlur,te=t.setRef,ne=Object(Se.a)(t,["children","tagName","value","onChange","isSelected","multiline","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","keepPlaceholderOnFocus","allowedFormats","formattingControls","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","preserveWhiteSpace","__unstablePastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMultilineRootTag","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","setRef"]),re=Object(b.useInstanceId)(e);P=P||re;var oe=Object(l.useRef)(),ce=n||oe,ie=h(),ae=ie.clientId,le=ie.onCaretVerticalPositionChange,de=ie.isSelected,be=Object(m.useSelect)((function(e){var t,n=e("core/block-editor"),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,c=n.getSelectionEnd,i=n.getSettings,a=n.didAutomaticChange,u=n.__unstableGetBlockWithoutInnerBlocks,s=n.isMultiSelecting,b=n.hasMultiSelection,f=o(),m=c(),v=i().__experimentalUndo;void 0===d?t=f.clientId===ae&&f.attributeKey===P:d&&(t=f.clientId===ae);var O={};if("native"===l.Platform.OS){var g=ae&&u(ae);O={shouldBlurOnUnmount:g&&t&&Object(p.isUnmodifiedDefaultBlock)(g)}}return Md({isCaretWithinFormattedText:r(),selectionStart:t?f.offset:void 0,selectionEnd:t?m.offset:void 0,isSelected:t,didAutomaticChange:a(),disabled:s()||b(),undo:v},O)})),fe=be.isCaretWithinFormattedText,pe=be.selectionStart,me=be.selectionEnd,ve=be.isSelected,Oe=be.didAutomaticChange,ge=be.disabled,he=be.undo,je=be.shouldBlurOnUnmount,ke=Object(m.useDispatch)("core/block-editor"),ye=ke.__unstableMarkLastChangeAsPersistent,_e=ke.enterFormattedText,Ee=ke.exitFormattedText,we=ke.selectionChange,Ce=ke.__unstableMarkAutomaticChange,Ie=Fd(f),Be=Vd({allowedFormats:_,formattingControls:E,disableFormats:A}),xe=!Be||Be.length>0,Pe=a,Te=u;Array.isArray(a)&&(Pe=p.children.toHTML(a),Te=function(e){return u(p.children.fromDOM(Object(c.__unstableCreateElement)(document,e).childNodes))});var Ne=Object(l.useCallback)((function(e,t){we(ae,P,e,t)}),[ae,P]),De=Object(l.useCallback)((function(e){var t=e.value,n=e.isReverse;S&&S(!n),C&&Object(c.isEmpty)(t)&&n&&C(!n)}),[S,C]),Ae=Object(l.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(j&&I){var n=[],r=Object(c.split)(e),o=Object(se.a)(r,2),i=o[0],a=o[1],l=t.length>0,u=-1;l&&Object(c.isEmpty)(i)||(n.push(I(Object(c.toHTMLString)({value:i,multilineTag:Ie}))),u+=1),l?(n.push.apply(n,Object(ue.a)(t)),u+=t.length):x&&n.push(x()),(l||x)&&Object(c.isEmpty)(a)||n.push(I(Object(c.toHTMLString)({value:a,multilineTag:Ie})));var s=l?u:1,d=l?-1:null;j(n,s,d)}}),[j,I,Ie,x]),Re=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=j&&I;if(j){var i=Object(p.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),a=Object(p.findTransform)(i,(function(e){return e.regExp.test(t.text)}));a&&(j([a.transform({content:t.text})]),Ce())}if(f)r?R||n(Object(c.insert)(t,"\n")):o&&Object(c.__unstableIsEmptyLine)(t)?Ae(t):n(Object(c.__unstableInsertLineSeparator)(t));else{var l=t.text,u=t.start,s=t.end,d=B&&u===s&&s===l.length;r||!o&&!d?R||n(Object(c.insert)(t,"\n")):!o&&d?B():o&&Ae(t)}}),[j,I,Ce,f,Ae,B]),Le=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,i=e.plainText,a=e.files,l=e.activeFormats;if(N)n(Object(c.insert)(t,Object(c.create)({text:i})));else{if(a&&a.length&&!r){var u=Object(p.pasteHandler)({HTML:Nd(a),mode:"BLOCKS",tagName:o,preserveWhiteSpace:T});return window.console.log("Received items:\n\n",a),void(j&&Object(c.isEmpty)(t)?j(u):Ae(t,u))}var s,d=j&&I?"AUTO":"INLINE";"AUTO"===d&&Object(c.isEmpty)(t)&&(s=i,Object(Bd.regexp)(".*").test(s))&&(d="BLOCKS"),D&&Object(c.isEmpty)(t)&&Object(ju.isURL)(i.trim())&&(d="BLOCKS");var b=Object(p.pasteHandler)({HTML:r,plainText:i,mode:d,tagName:o,preserveWhiteSpace:T});if("string"==typeof b){var m=Object(c.create)({html:b});if(l.length)for(var v=m.formats.length;v--;)m.formats[v]=[].concat(Object(ue.a)(l),Object(ue.a)(m.formats[v]||[]));f&&(m=Object(c.replace)(m,/\n+/g,c.__UNSTABLE_LINE_SEPARATOR)),n(Object(c.insert)(t,m))}else b.length>0&&(j&&Object(c.isEmpty)(t)?j(b,b.length-1,-1):Ae(t,b))}}),[o,j,I,Ae,D,f,T,N]),Me=Object(l.useCallback)((function(e,t){if(j){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),i=Object(p.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),a=Object(p.findTransform)(i,(function(e){var t=e.prefix;return o===t}));if(a){var l=t(Object(c.slice)(e,n,r.length)),u=a.transform(l);j([u]),Ce()}}}}),[j,Ce]),Fe=Object(l.createElement)(c.__experimentalRichText,{clientId:ae,identifier:P,ref:ce,value:Pe,onChange:Te,selectionStart:pe,selectionEnd:me,onSelectionChange:Ne,tagName:o,placeholder:k,allowedFormats:Be,withoutInteractiveFormatting:w,onEnter:Re,onDelete:De,onPaste:Le,__unstableIsSelected:ve,__unstableInputRule:Me,__unstableMultilineTag:Ie,__unstableIsCaretWithinFormattedText:fe,__unstableOnEnterFormattedText:_e,__unstableOnExitFormattedText:Ee,__unstableOnCreateUndoLevel:ye,__unstableMarkAutomaticChange:Ce,__unstableDidAutomaticChange:Oe,__unstableUndo:he,__unstableDisableFormats:A,preserveWhiteSpace:T,disabled:ge,unstableOnFocus:L,__unstableAllowPrefixTransformations:M,__unstableMultilineRootTag:F,onCaretVerticalPositionChange:le,blockIsSelected:void 0!==d?d:de,shouldBlurOnUnmount:je,__unstableMobileNoFocusOnMount:V,deleteEnter:H,placeholderTextColor:z,textAlign:G,selectionColor:U,tagsToEliminate:K,rootTagsToEliminate:W,disableEditingMenu:q,fontSize:$,fontFamily:Y,fontWeight:X,fontStyle:Q,minWidth:Z,maxWidth:J,onBlur:ee,setRef:te,id:ne.id,style:ne.style},(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,a=e.editableProps,u=e.editableTagName;return Object(l.createElement)(l.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&xe&&Object(l.createElement)(Rd,{inline:v,anchorRef:ce.current}),t&&Object(l.createElement)(Td,null),Object(l.createElement)(Nr,{onReplace:j,completers:g,record:n,onChange:o,isSelected:t,contentRef:ce},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(l.createElement)(u,Object(i.a)({},a,ne,{style:ne.style?Md(Md({},ne.style),a.style):a.style,className:s()("block-editor-rich-text__editable",ne.className,a.className,{"keep-placeholder-on-focus":y}),"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,onKeyDown:function(e){r(e),a.onKeyDown(e)}}))})))}));return O?(Vo()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(l.createElement)("div",{className:s()("block-editor-rich-text",O)},Fe)):Fe}));Hd.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(Se.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=p.children.toHTML(t));var c=Fd(r);!t&&c&&(t="<".concat(c,"></").concat(c,">"));var i=Object(l.createElement)(l.RawHTML,null,t);return n?Object(l.createElement)(n,Object(d.omit)(o,["format"]),i):i},Hd.isEmpty=function(e){return!e||0===e.length},Hd.Content.defaultProps={format:"string",value:""};var zd=Hd;function Gd(e){var t=e.value,n=e.onChange;return Object(l.createElement)(pd,null,Object(l.createElement)(zd,{value:t,onChange:n,placeholder:Object(C.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var Ud=n(283),Kd=function(e){var t=e.icon,n=void 0===t?Ud.a:t,r=e.label,o=void 0===r?Object(C.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(C.__)("Select a variation to start with."):c,a=e.variations,u=e.onSelect,d=e.allowSkip,b=s()("block-editor-block-variation-picker",{"has-many-variations":a.length>4});return Object(l.createElement)(v.Placeholder,{icon:n,label:o,instructions:i,className:b},Object(l.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(C.__)("Block variations")},a.map((function(e){return Object(l.createElement)("li",{key:e.name},Object(l.createElement)(v.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return u(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(l.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),d&&Object(l.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(l.createElement)(v.Button,{isLink:!0,onClick:function(){return u()}},Object(C.__)("Skip"))))},Wd=function(e,t){if(t&&e){var n=t.filter((function(t){var n=t.attributes;return!(!n||!Object.keys(n).length)&&Object(d.isMatch)(e,n)}));if(1===n.length)return n[0]}};function qd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var $d=function(e){var t=e.blockClientId,n=Object(l.useState)(),r=Object(se.a)(n,2),o=r[0],c=r[1],i=Object(m.useDispatch)("core/block-editor").updateBlockAttributes,u=Object(m.useSelect)((function(e){var n=e(p.store).getBlockVariations,r=e("core/block-editor"),o=r.getBlockName,c=r.getBlockAttributes,i=t&&o(t);return{variations:i&&n(i,"transform"),blockAttributes:c(t)}}),[t]),s=u.variations,d=u.blockAttributes;if(Object(l.useEffect)((function(){var e;c(null===(e=Wd(d,s))||void 0===e?void 0:e.name)}),[d,s]),!(null==s?void 0:s.length))return null;var b=s.map((function(e){return{value:e.name,label:e.title,info:e.description}})),f=function(e){i(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},s.find((function(t){return t.name===e})).attributes))},O="block-editor-block-variation-transforms";return Object(l.createElement)(v.DropdownMenu,{className:O,label:Object(C.__)("Transform to variation"),text:Object(C.__)("Transform to variation"),popoverProps:{position:"bottom center",className:"".concat(O,"__popover")},icon:Oo.a,toggleProps:{iconPosition:"right"}},(function(){return Object(l.createElement)("div",{className:"".concat(O,"__container")},Object(l.createElement)(v.MenuGroup,null,Object(l.createElement)(v.MenuItemsChoice,{choices:b,value:o,onSelect:f})))}))},Yd=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Xd=Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function Qd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Jd={top:{icon:Object(l.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(v.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(C._x)("Vertically Align Top","Block vertical alignment setting")},center:{icon:Xd,title:Object(C._x)("Vertically Align Middle","Block vertical alignment setting")},bottom:{icon:Yd,title:Object(C._x)("Vertically Align Bottom","Block vertical alignment setting")}},eb=["top","center","bottom"],tb={isAlternate:!0},nb=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?eb:r,c=e.isCollapsed,i=void 0===c||c,a=Jd[t],u=Jd.top;return Object(l.createElement)(v.ToolbarGroup,{popoverProps:tb,isCollapsed:i,icon:a?a.icon:u.icon,label:Object(C._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return Zd(Zd({},Jd[e]),{},{isActive:t===e,role:i?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))})};function rb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ob(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cb=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=he("color.palette"),r=!he("color.custom"),o=void 0===t.colors?n:t.colors,c=void 0===t.disableCustomColors?r:t.disableCustomColors,i=!Object(d.isEmpty)(o)||!c;return Object(l.createElement)(e,ob(ob({},t),{},{colors:o,disableCustomColors:c,hasColorsToChoose:i}))}}),"withColorContext"),ib=cb(v.ColorPalette);function ab(e){var t=e.onChange,n=e.value,r=Object(Se.a)(e,["onChange","value"]);return Object(l.createElement)(Re,Object(i.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var lb=[];function ub(e){var t=he("color.gradients")||lb,n=!he("color.customGradient");return Object(l.createElement)(v.__experimentalGradientPicker,Object(i.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var sb=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?v.__experimentalGradientPicker:ub;return Object(l.createElement)(t,e)};function db(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(C.__)("Gradient Presets"):o,a=Object(Se.a)(e,["className","value","onChange","label"]),u=he("color.gradients"),b=!he("color.customGradient");return Object(d.isEmpty)(u)&&b?null:Object(l.createElement)(v.BaseControl,{className:s()("block-editor-gradient-picker-control",t)},Object(l.createElement)(v.BaseControl.VisualLabel,null,c),Object(l.createElement)(sb,Object(i.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:u,disableCustomGradients:b},a)))}function bb(e){var t=he("color.gradients");return Object(d.isEmpty)(t)?null:Object(l.createElement)(v.PanelBody,{title:Object(C.__)("Gradient")},Object(l.createElement)(db,e))}var fb=[25,50,75,100];function pb(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,a=e.isResizable,u=void 0===a||a,s=e.slug,b=e.width,f=e.height,p=e.onChange,m=e.onChangeImage,O=void 0===m?d.noop:m;function g(e,t){return function(){p({width:e,height:t})}}return Object(l.createElement)(l.Fragment,null,!Object(d.isEmpty)(i)&&Object(l.createElement)(v.SelectControl,{label:Object(C.__)("Image size"),value:s,options:i,onChange:O}),u&&Object(l.createElement)("div",{className:"block-editor-image-size-control"},Object(l.createElement)("p",{className:"block-editor-image-size-control__row"},Object(C.__)("Image dimensions")),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(C.__)("Width"),value:null!==(t=null!=b?b:r)&&void 0!==t?t:"",min:1,onChange:function(e){return p({width:parseInt(e,10)})}}),Object(l.createElement)(v.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(C.__)("Height"),value:null!==(n=null!=f?f:o)&&void 0!==n?n:"",min:1,onChange:function(e){return p({height:parseInt(e,10)})}})),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(v.ButtonGroup,{"aria-label":Object(C.__)("Image size presets")},fb.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=b===t&&f===n;return Object(l.createElement)(v.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:g(t,n)},e,"%")}))),Object(l.createElement)(v.Button,{isSmall:!0,onClick:g()},Object(C.__)("Reset")))))}var mb=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=h().clientId;return Object(l.createElement)(e,Object(i.a)({},t,{clientId:n}))}}),"withClientId"),vb=mb((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(l.createElement)(Rl,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),Ob=Object(b.compose)([mb,Object(m.withSelect)((function(e,t){var n=t.clientId,r=(0,e("core/block-editor").getBlockOrder)(n);return{lastBlockClientId:Object(d.last)(r)}}))])((function(e){var t=e.clientId,n=e.lastBlockClientId;return Object(l.createElement)(Al,{rootClientId:t,lastBlockClientId:n})})),gb=n(78),hb=n.n(gb),jb=new WeakMap;function kb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _b(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,c=e.wrapperRef,i=e.templateInsertUpdatesSelection,a=e.__experimentalCaptureToolbars,u=e.__experimentalAppenderTagName,s=e.renderAppender,b=e.orientation,f=e.placeholder,v=e.__experimentalLayout,O=void 0===v?N:v;!function(e,t,n,r,o){var c=Object(m.useDispatch)("core/block-editor").updateBlockListSettings,i=Object(m.useSelect)((function(t){var n=t("core/block-editor").getBlockRootClientId(e);return{blockListSettings:t("core/block-editor").getBlockListSettings(e),parentLock:t("core/block-editor").getTemplateLock(n)}}),[e]),a=i.blockListSettings,u=i.parentLock;Object(l.useLayoutEffect)((function(){var i={allowedBlocks:t,templateLock:void 0===n?u:n};void 0!==r&&(i.__experimentalCaptureToolbars=r),void 0!==o&&(i.orientation=o),hb()(a,i)||c(e,i)}),[e,a,t,n,u,r,o,c])}(t,n,o,a,b),function(e,t,n,r){var o=Object(m.useDispatch)("core/block-editor").replaceInnerBlocks,c=Object(m.useSelect)((function(t){return t("core/block-editor").getBlocks(e)}),[e]),i=Object(l.useRef)(null);Object(l.useLayoutEffect)((function(){if((0===c.length||"all"===n)&&!Object(d.isEqual)(t,i.current)){i.current=t;var a=Object(p.synchronizeBlocksWithTemplate)(c,t);Object(d.isEqual)(a,c)||o(e,a,0===c.length&&r&&0!==a.length)}}),[c,n,e])}(t,r,o,i);var g=Object(m.useSelect)((function(e){var n=e("core/block-editor").getBlock(t),r=Object(p.getBlockType)(n.name);if(r&&r.providesContext)return function(e,t){jb.has(t)||jb.set(t,new WeakMap);var n=jb.get(t);if(!n.has(e)){var r=Object(d.mapValues)(t.providesContext,(function(t){return e[t]}));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return Object(l.createElement)(A,{value:O},Object(l.createElement)(zr,{value:g},Object(l.createElement)(Yl,{rootClientId:t,renderAppender:s,__experimentalAppenderTagName:u,wrapperRef:c,placeholder:f})))}function Eb(e){return Tl(e),Object(l.createElement)(_b,e)}var wb=Object(l.forwardRef)((function(e,t){var n=Cb({ref:t},e);return Object(l.createElement)("div",{className:"block-editor-inner-blocks"},Object(l.createElement)("div",n))}));function Cb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(l.useRef)(),r=h(),o=r.clientId,c=Object(b.useViewportMatch)("medium","<"),a=Object(m.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.isBlockSelected,i=t.hasSelectedInnerBlock,a=(0,t.isNavigationMode)()||c;return"core/template"!==n(o)&&!r(o)&&!i(o,!0)&&a}),[o,c]),u=e.ref||n,d=t.value&&t.onChange?Eb:_b;return yb(yb({},e),{},{ref:u,className:s()(e.className,"block-editor-block-list__layout",{"has-overlay":a}),children:Object(l.createElement)(d,Object(i.a)({},t,{clientId:o,wrapperRef:u}))})}wb.DefaultBlockAppender=Ob,wb.ButtonBlockAppender=vb,wb.Content=Object(p.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(l.createElement)(t,null)}));var Sb=wb,Ib=n(210);function Bb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pb=[{id:"opensInNewTab",title:Object(C.__)("Open in new tab")}],Tb=function(e){var t=e.value,n=e.onChange,r=void 0===n?d.noop:n,o=e.settings,c=void 0===o?Pb:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(xb(xb({},t),{},Object(a.a)({},e.id,n)))}},u=c.map((function(e){return Object(l.createElement)(v.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:i(e),checked:!!t&&!!t[e.id]})}));return Object(l.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(l.createElement)(v.VisuallyHidden,{as:"legend"},Object(C.__)("Currently selected link settings")),u)},Nb=n(125),Db=n.n(Nb);var Ab=function(e){return e.stopPropagation()},Rb=function(e){Object(Pn.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(Nn.a)(t);if(n){var o=Object(Nn.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(Tn.a)(this,e)});function o(e){var t;return Object(In.a)(this,o),(t=r.call(this,e)).onChange=t.onChange.bind(Object(xn.a)(t)),t.onFocus=t.onFocus.bind(Object(xn.a)(t)),t.onKeyDown=t.onKeyDown.bind(Object(xn.a)(t)),t.selectLink=t.selectLink.bind(Object(xn.a)(t)),t.handleOnClick=t.handleOnClick.bind(Object(xn.a)(t)),t.bindSuggestionNode=t.bindSuggestionNode.bind(Object(xn.a)(t)),t.autocompleteRef=e.autocompleteRef||Object(l.createRef)(),t.inputRef=Object(l.createRef)(),t.updateSuggestions=Object(d.debounce)(t.updateSuggestions.bind(Object(xn.a)(t)),200),t.suggestionNodes=[],t.isUpdatingSuggestions=!1,t.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""},t}return Object(Bn.a)(o,[{key:"componentDidUpdate",value:function(e){var t=this,n=this.state,r=n.showSuggestions,o=n.selectedSuggestion,c=this.props.value;r&&null!==o&&this.suggestionNodes[o]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Db()(this.suggestionNodes[o],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((function(){t.scrollingIntoView=!1}),100)),e.value!==c&&this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentDidMount",value:function(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"shouldShowInitialSuggestions",value:function(){var e=this.state.suggestions,t=this.props,n=t.__experimentalShowInitialSuggestions,r=void 0!==n&&n,o=t.value;return!this.isUpdatingSuggestions&&r&&!(o&&o.length)&&!(e&&e.length)}},{key:"updateSuggestions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=this.props,r=n.__experimentalFetchLinkSuggestions,o=n.__experimentalHandleURLSuggestions;if(r){var c=!(t&&t.length);if(c||!(t.length<2||!o&&Object(ju.isURL)(t))){this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});var i=r(t,{isInitialSuggestions:c});i.then((function(t){e.suggestionsRequest===i&&(e.setState({suggestions:t,loading:!1,showSuggestions:!!t.length}),t.length?e.props.debouncedSpeak(Object(C.sprintf)(
|
62 |
/* translators: %s: number of results. */
|
63 |
+
Object(C._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):e.props.debouncedSpeak(Object(C.__)("No results."),"assertive"),e.isUpdatingSuggestions=!1)})).catch((function(){e.suggestionsRequest===i&&(e.setState({loading:!1}),e.isUpdatingSuggestions=!1)})),this.suggestionsRequest=i}else this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1})}}},{key:"onChange",value:function(e){var t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}},{key:"onFocus",value:function(){var e=this.state.suggestions,t=this.props,n=t.disableSuggestions,r=t.value;!r||n||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(r.trim())}},{key:"onKeyDown",value:function(e){var t=this.state,n=t.showSuggestions,r=t.selectedSuggestion,o=t.suggestions,c=t.loading;if(n&&o.length&&!c){var i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Dt.UP:e.stopPropagation(),e.preventDefault();var a=r?r-1:o.length-1;this.setState({selectedSuggestion:a});break;case Dt.DOWN:e.stopPropagation(),e.preventDefault();var l=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:l});break;case Dt.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(C.__)("Link selected.")));break;case Dt.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(i))}}else switch(e.keyCode){case Dt.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case Dt.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectLink(e),this.inputRef.current.focus()}},{key:"render",value:function(){return Object(l.createElement)(l.Fragment,null,this.renderControl(),this.renderSuggestions())}},{key:"renderControl",value:function(){var e=this.props,t=e.label,n=e.className,r=e.isFullWidth,o=e.instanceId,c=e.placeholder,i=void 0===c?Object(C.__)("Paste URL or type to search"):c,a=e.__experimentalRenderControl,u=e.value,d=void 0===u?"":u,b=e.autoFocus,f=void 0===b||b,p=this.state,m=p.loading,O=p.showSuggestions,g=p.selectedSuggestion,h=p.suggestionsListboxId,j=p.suggestionOptionIdPrefix,k={id:"url-input-control-".concat(o),label:t,className:s()("block-editor-url-input",n,{"is-full-width":r})},y={value:d,required:!0,autoFocus:f,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,onInput:Ab,placeholder:i,onKeyDown:this.onKeyDown,role:"combobox","aria-label":Object(C.__)("URL"),"aria-expanded":O,"aria-autocomplete":"list","aria-owns":h,"aria-activedescendant":null!==g?"".concat(j,"-").concat(g):void 0,ref:this.inputRef};return a?a(k,y,m):Object(l.createElement)(v.BaseControl,k,Object(l.createElement)("input",y),m&&Object(l.createElement)(v.Spinner,null))}},{key:"renderSuggestions",value:function(){var e=this,t=this.props,n=t.className,r=t.__experimentalRenderSuggestions,o=t.value,c=void 0===o?"":o,a=t.__experimentalShowInitialSuggestions,u=void 0!==a&&a,b=this.state,f=b.showSuggestions,p=b.suggestions,m=b.selectedSuggestion,O=b.suggestionsListboxId,g=b.suggestionOptionIdPrefix,h=b.loading,j={id:O,ref:this.autocompleteRef,role:"listbox"},k=function(t,n){return{role:"option",tabIndex:"-1",id:"".concat(g,"-").concat(n),ref:e.bindSuggestionNode(n),"aria-selected":n===m}};return Object(d.isFunction)(r)&&f&&p.length?r({suggestions:p,selectedSuggestion:m,suggestionsListProps:j,buildSuggestionItemProps:k,isLoading:h,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:u&&!(c&&c.length)}):!Object(d.isFunction)(r)&&f&&p.length?Object(l.createElement)(v.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(l.createElement)("div",Object(i.a)({},j,{className:s()("block-editor-url-input__suggestions","".concat(n,"__suggestions"))}),p.map((function(t,n){return Object(l.createElement)(v.Button,Object(i.a)({},k(0,n),{key:t.id,className:s()("block-editor-url-input__suggestion",{"is-selected":n===m}),onClick:function(){return e.handleOnClick(t)}}),t.title)})))):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.value,r=e.instanceId,o=e.disableSuggestions,c=e.__experimentalShowInitialSuggestions,i=void 0!==c&&c,a=t.showSuggestions,l=n&&n.length;return i||l||(a=!1),!0===o&&(a=!1),{showSuggestions:a,suggestionsListboxId:"block-editor-url-input-suggestions-".concat(r),suggestionOptionIdPrefix:"block-editor-url-input-suggestion-".concat(r)}}}]),o}(l.Component),Lb=Object(b.compose)(b.withSafeTimeout,v.withSpokenMessages,b.withInstanceId,Object(m.withSelect)((function(e,t){if(!Object(d.isFunction)(t.__experimentalFetchLinkSuggestions))return{__experimentalFetchLinkSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}})))(Rb),Mb=function(e){var t,n=e.searchTerm,r=e.onClick,o=e.itemProps,c=e.isSelected,a=e.buttonText;return n?(t=a?Object(d.isFunction)(a)?a(n):a:Object(l.createInterpolateElement)(Object(C.sprintf)(
|
64 |
/* translators: %s: search term. */
|
65 |
+
Object(C.__)("Create: <mark>%s</mark>"),n),{mark:Object(l.createElement)("mark",null)}),Object(l.createElement)(v.Button,Object(i.a)({},o,{className:s()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":c}),onClick:r}),Object(l.createElement)($o.a,{className:"block-editor-link-control__search-item-icon",icon:Uo.a}),Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},Fb=Object(l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(l.createElement)(S.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),Vb=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,a=e.isURL,u=void 0!==a&&a,d=e.searchTerm,b=void 0===d?"":d,f=e.shouldShowType,p=void 0!==f&&f;return Object(l.createElement)(v.Button,Object(i.a)({},t,{onClick:c,className:s()("block-editor-link-control__search-item",{"is-selected":o,"is-url":u,"is-entity":!u})}),u&&Object(l.createElement)($o.a,{className:"block-editor-link-control__search-item-icon",icon:Fb}),Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(l.createElement)(v.TextHighlight,{text:n.title,highlight:b})),Object(l.createElement)("span",{"aria-hidden":!u,className:"block-editor-link-control__search-item-info"},!u&&(Object(ju.filterURLForDisplay)(Object(ju.safeDecodeURI)(n.url))||""),u&&Object(C.__)("Press ENTER to add this link"))),p&&n.type&&Object(l.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};function Hb(e){var t=e.instanceId,n=e.withCreateSuggestion,r=e.currentInputValue,o=e.handleSuggestionClick,c=e.suggestionsListProps,a=e.buildSuggestionItemProps,u=e.suggestions,d=e.selectedSuggestion,b=e.isLoading,f=e.isInitialSuggestions,p=e.createSuggestionButtonText,m=e.suggestionsQuery,O=s()("block-editor-link-control__search-results",{"is-loading":b}),g=["url","mailto","tel","internal"],h=1===u.length&&g.includes(u[0].type.toLowerCase()),j=n&&!h&&!f,k=!(null==m?void 0:m.type),y="block-editor-link-control-search-results-label-".concat(t),_=f?Object(C.__)("Recently updated"):Object(C.sprintf)(
|
66 |
/* translators: %s: search term. */
|
67 |
+
Object(C.__)('Search results for "%s"'),r),E=Object(l.createElement)(f?l.Fragment:v.VisuallyHidden,{},Object(l.createElement)("span",{className:"block-editor-link-control__search-results-label",id:y},_));return Object(l.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},E,Object(l.createElement)("div",Object(i.a)({},c,{className:O,"aria-labelledby":y}),u.map((function(e,t){return j&&"__CREATE__"===e.type?Object(l.createElement)(Mb,{searchTerm:r,buttonText:p,onClick:function(){return o(e)},key:e.type,itemProps:a(e,t),isSelected:t===d}):"__CREATE__"===e.type?null:Object(l.createElement)(Vb,{key:"".concat(e.id,"-").concat(e.type),itemProps:a(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===d,isURL:g.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:k})}))))}function zb(e){var t=Object(d.startsWith)(e,"#");return Object(ju.isURL)(e)||e&&e.includes("www.")||t}function Gb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ub(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kb=function(){return Promise.resolve([])},Wb=function(e){var t="URL",n=Object(ju.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(d.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(ju.prependHTTP)(e):e,type:t}])},qb=function(){var e=Object(oo.a)(ro.a.mark((function e(t,n,r,o,c,i){var a,l,u;return ro.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.isInitialSuggestions,e.next=3,Promise.all([r(t,n),o(t)]);case 3:if(l=e.sent,u=!t.includes(" "),l=u&&i&&!a?l[0].concat(l[1]):l[0],!a){e.next=8;break}return e.abrupt("return",l);case 8:return e.abrupt("return",zb(t)||!c?l:l.concat({title:t,url:t,type:"__CREATE__"}));case 9:case"end":return e.stop()}}),e)})));return function(t,n,r,o,c,i){return e.apply(this,arguments)}}();function $b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$b(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xb=Promise.resolve([]),Qb=Object(l.forwardRef)((function(e,t){var n=e.value,r=e.children,o=e.currentLink,c=void 0===o?{}:o,i=e.className,a=void 0===i?null:i,u=e.placeholder,s=void 0===u?null:u,f=e.withCreateSuggestion,p=void 0!==f&&f,v=e.onCreateSuggestion,O=void 0===v?d.noop:v,g=e.onChange,h=void 0===g?d.noop:g,j=e.onSelect,k=void 0===j?d.noop:j,y=e.showSuggestions,_=void 0===y||y,E=e.renderSuggestions,w=void 0===E?function(e){return Object(l.createElement)(Hb,e)}:E,S=e.fetchSuggestions,I=void 0===S?null:S,B=e.allowDirectEntry,x=void 0===B||B,P=e.showInitialSuggestions,T=void 0!==P&&P,N=e.suggestionsQuery,D=void 0===N?{}:N,A=e.withURLSuggestion,R=void 0===A||A,L=e.createSuggestionButtonText,M=function(e,t,n,r){var o=Object(m.useSelect)((function(e){return{fetchSearchSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}}),[]).fetchSearchSuggestions,c=t?Wb:Kb;return Object(l.useCallback)((function(t,i){var a=i.isInitialSuggestions;return zb(t)?c(t,{isInitialSuggestions:a}):qb(t,Ub(Ub({},e),{},{isInitialSuggestions:a}),o,c,n,r)}),[c,o,n])}(D,x,p,R),F=_?I||M:Xb,V=Object(b.useInstanceId)(Qb),H=Object(l.useState)(),z=Object(se.a)(H,2),G=z[0],U=z[1],K=function(){var e=Object(oo.a)(ro.a.mark((function e(t){var n,r;return ro.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,"__CREATE__"!==t.type){e.next=12;break}return e.prev=2,e.next=5,O(t.title);case 5:n=e.sent,(null===(r=n)||void 0===r?void 0:r.url)&&k(n),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(2);case 11:return e.abrupt("return");case 12:(x||n&&Object.keys(n).length>=1)&&k(Yb(Yb({},Object(d.omit)(c,"id","url")),n),n);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();return Object(l.createElement)("form",{onSubmit:function(e){e.preventDefault(),K(G||{url:n})}},Object(l.createElement)(Lb,{className:a,value:n,onChange:function(e,t){h(e),U(t)},placeholder:null!=s?s:Object(C.__)("Search or type url"),__experimentalRenderSuggestions:_?function(e){return w(Yb(Yb({},e),{},{instanceId:V,withCreateSuggestion:p,currentInputValue:n,createSuggestionButtonText:L,suggestionsQuery:D,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),K(t)}}))}:null,__experimentalFetchLinkSuggestions:F,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T,ref:t}),r)})),Zb=Qb,Jb=Object(v.createSlotFill)("BlockEditorLinkControlViewer"),ef=Jb.Slot,tf=Jb.Fill;function nf(e){var t=e.value,n=e.onEditClick,r=t&&Object(ju.filterURLForDisplay)(Object(ju.safeDecodeURI)(t.url))||"";return Object(l.createElement)("div",{"aria-label":Object(C.__)("Currently selected"),"aria-selected":"true",className:s()("block-editor-link-control__search-item",{"is-current":!0})},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)(v.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(l.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(l.createElement)(v.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(C.__)("Edit")),Object(l.createElement)(ef,{fillProps:t}))}var rf=function(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(e){return t?r({isCanceled:!0}):n(e)}),(function(e){return r(t?{isCanceled:!0}:e)}))})),cancel:function(){t=!0}}};function of(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?d.noop:o,i=e.noDirectEntry,a=void 0!==i&&i,u=e.showSuggestions,s=void 0===u||u,b=e.showInitialSuggestions,f=e.forceIsEditingLink,p=e.createSuggestion,m=e.withCreateSuggestion,O=e.inputValue,g=void 0===O?"":O,h=e.suggestionsQuery,j=void 0===h?{}:h,k=e.noURLSuggestion,y=void 0!==k&&k,_=e.createSuggestionButtonText;void 0===m&&p&&(m=!0);var E=Object(l.useRef)(),w=Object(l.useState)(n&&n.url||""),S=Object(se.a)(w,2),I=S[0],B=S[1],x=g||I,P=Object(l.useState)(void 0!==f?f:!n||!n.url),T=Object(se.a)(P,2),N=T[0],D=T[1],A=Object(l.useRef)(!1);Object(l.useEffect)((function(){void 0!==f&&f!==N&&D(f)}),[f]),Object(l.useEffect)((function(){A.current&&E.current&&!E.current.contains(E.current.ownerDocument.activeElement)&&(ao.focus.focusable.find(E.current)[0]||E.current).focus(),A.current=!1}),[N]);var R=function(e){var t=Object(l.useRef)(),n=Object(l.useState)(!1),r=Object(se.a)(n,2),o=r[0],c=r[1],i=Object(l.useState)(null),a=Object(se.a)(i,2),u=a[0],s=a[1],d=function(){var n=Object(oo.a)(ro.a.mark((function n(r){return ro.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),s(null),n.prev=2,t.current=rf(Promise.resolve(e(r))),n.next=6,t.current.promise;case 6:return n.abrupt("return",n.sent);case 9:if(n.prev=9,n.t0=n.catch(2),!n.t0||!n.t0.isCanceled){n.next=13;break}return n.abrupt("return");case 13:throw s(n.t0.message||Object(C.__)("An unknown error occurred during creation. Please try again.")),n.t0;case 15:return n.prev=15,c(!1),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[2,9,15,18]])})));return function(e){return n.apply(this,arguments)}}();return Object(l.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:d,isCreatingPage:o,errorMessage:u}}(p),L=R.createPage,M=R.isCreatingPage,F=R.errorMessage;return Object(l.createElement)("div",{tabIndex:-1,ref:E,className:"block-editor-link-control"},M&&Object(l.createElement)("div",{className:"block-editor-link-control__loading"},Object(l.createElement)(v.Spinner,null)," ",Object(C.__)("Creating"),"…"),(N||!n)&&!M&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(l.createElement)(Zb,{currentLink:n,className:"block-editor-link-control__search-input",placeholder:t,value:x,withCreateSuggestion:m,onCreateSuggestion:L,onChange:B,onSelect:function(e){var t;c(e),A.current=!!(null===(t=E.current)||void 0===t?void 0:t.contains(E.current.ownerDocument.activeElement)),D(!1)},showInitialSuggestions:b,allowDirectEntry:!a,showSuggestions:s,suggestionsQuery:j,withURLSuggestion:!y,createSuggestionButtonText:_},Object(l.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(l.createElement)(v.Button,{type:"submit",label:Object(C.__)("Submit"),icon:Ib.a,className:"block-editor-link-control__search-submit"})))),F&&Object(l.createElement)(v.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},F)),n&&!N&&!M&&Object(l.createElement)(nf,{value:n,onEditClick:function(){return D(!0)}}),Object(l.createElement)(Tb,{value:n,settings:r,onChange:c}))}of.ViewerFill=tf;var cf=of,af=n(284),lf=n(211),uf=Object(v.withFilters)("editor.MediaUpload")((function(){return null})),sf=function(e){var t=e.fallback,n=void 0===t?null:t,r=e.children;return Object(m.useSelect)((function(e){return!!(0,e("core/block-editor").getSettings)().mediaUpload}),[])?r:n},df=Object(b.compose)([Object(m.withDispatch)((function(e){var t=e("core/notices");return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(v.withFilters)("editor.MediaReplaceFlow")])((function(e){var t=e.mediaURL,n=e.mediaId,r=e.allowedTypes,o=e.accept,c=e.onSelect,i=e.onSelectURL,a=e.onFilesUpload,u=void 0===a?d.noop:a,s=e.name,b=void 0===s?Object(C.__)("Replace"):s,f=e.createNotice,p=e.removeNotice,O=Object(l.useState)(t),g=Object(se.a)(O,2),h=g[0],j=g[1],k=Object(m.useSelect)((function(e){return e("core/block-editor").getSettings().mediaUpload}),[]),y=Object(l.createRef)(),_=Object(d.uniqueId)("block-editor/media-replace-flow/error-notice/"),E=function(e){var t=document.createElement("div");t.innerHTML=Object(l.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){f("error",n,{speak:!0,id:_,isDismissible:!0})}),1e3)},w=function(e){c(e),j(e.url),Object(We.speak)(Object(C.__)("The media file has been replaced")),p(_)},S=function(e){e.keyCode===Dt.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(l.createElement)(v.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(l.createElement)(v.ToolbarGroup,{className:"media-replace-flow"},Object(l.createElement)(v.ToolbarButton,{ref:y,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},b))},renderContent:function(e){return e.onClose,Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(l.createElement)(uf,{value:n,onSelect:function(e){return w(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(l.createElement)(v.MenuItem,{icon:af.a,onClick:t},Object(C.__)("Open Media Library"))}}),Object(l.createElement)(sf,null,Object(l.createElement)(v.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;u(t),k({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(se.a)(e,1)[0];w(t)},onError:E})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(l.createElement)(v.MenuItem,{icon:lf.a,onClick:function(){t()}},Object(C.__)("Upload"))}}))),i&&Object(l.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){[Dt.TAB,Dt.ESCAPE].includes(e.keyCode)||e.stopPropagation()},onKeyPress:function(e){[Dt.TAB,Dt.ESCAPE].includes(e.keyCode)||e.stopPropagation()}},Object(l.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(C.__)("Current media URL:")),Object(l.createElement)(cf,{value:{url:h},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;j(t),i(t),y.current.focus()}})))}})})),bf=n(196);function ff(e){var t=e.url,n=e.urlLabel,r=e.className,o=s()(r,"block-editor-url-popover__link-viewer-url");return t?Object(l.createElement)(v.ExternalLink,{className:o,href:t},n||Object(ju.filterURLForDisplay)(Object(ju.safeDecodeURI)(t))):Object(l.createElement)("span",{className:o})}function pf(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,a=e.focusOnMount,u=void 0===a?"firstElement":a,s=Object(Se.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),d=Object(l.useState)(!1),b=Object(se.a)(d,2),f=b[0],p=b[1],m=!!r&&f;return Object(l.createElement)(v.Popover,Object(i.a)({className:"block-editor-url-popover",focusOnMount:u,position:c},s),Object(l.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(l.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(l.createElement)(v.Button,{className:"block-editor-url-popover__settings-toggle",icon:Oo.a,label:Object(C.__)("Link settings"),onClick:function(){p(!f)},"aria-expanded":f})),m&&Object(l.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!m&&Object(l.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}pf.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(Se.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(l.createElement)("form",Object(i.a)({className:s()("block-editor-url-popover__link-editor",n)},c),Object(l.createElement)(Lb,{value:o,onChange:r,autocompleteRef:t}),Object(l.createElement)(v.Button,{icon:Ib.a,label:Object(C.__)("Apply"),type:"submit"}))},pf.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,a=Object(Se.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(l.createElement)("div",Object(i.a)({className:s()("block-editor-url-popover__link-viewer",t)},a),Object(l.createElement)(ff,{url:o,urlLabel:c,className:n}),r&&Object(l.createElement)(v.Button,{icon:bf.a,label:Object(C.__)("Edit"),onClick:r}))};var mf=pf,vf=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(l.createElement)(mf,{onClose:o},Object(l.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(l.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(C.__)("URL"),placeholder:Object(C.__)("Paste or type URL"),onChange:n,value:t}),Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Ib.a,label:Object(C.__)("Apply"),type:"submit"})))},Of=Object(v.withFilters)("editor.MediaPlaceholder")((function(e){var t=e.value,n=void 0===t?{}:t,r=e.allowedTypes,o=e.className,c=e.icon,i=e.labels,a=void 0===i?{}:i,u=e.mediaPreview,b=e.notices,f=e.isAppender,p=e.accept,O=e.addToGallery,g=e.multiple,h=void 0!==g&&g,j=e.dropZoneUIOnly,k=e.disableDropZone,y=e.disableMediaButtons,_=e.onError,E=e.onSelect,w=e.onCancel,S=e.onSelectURL,I=e.onDoubleClick,B=e.onFilesPreUpload,x=void 0===B?d.noop:B,P=e.onHTMLDrop,T=void 0===P?d.noop:P,N=e.children,D=Object(m.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().mediaUpload}),[]),A=Object(l.useState)(""),R=Object(se.a)(A,2),L=R[0],M=R[1],F=Object(l.useState)(!1),V=Object(se.a)(F,2),H=V[0],z=V[1];Object(l.useEffect)((function(){var e;M(null!==(e=null==n?void 0:n.src)&&void 0!==e?e:"")}),[null==n?void 0:n.src]);var G=function(e){M(e.target.value)},U=function(){z(!0)},K=function(){z(!1)},W=function(e){e.preventDefault(),L&&S&&(S(L),K())},q=function(e){var t;if(x(e),h)if(O){var o=[];t=function(e){var t=(null!=n?n:[]).filter((function(e){return e.id?!o.some((function(t){var n=t.id;return Number(n)===Number(e.id)})):!o.some((function(t){var n=t.urlSlug;return e.url.includes(n)}))}));E(t.concat(e)),o=e.map((function(e){var t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else t=E;else t=function(e){var t=Object(se.a)(e,1)[0];return E(t)};D({allowedTypes:r,filesList:e,onFileChange:t,onError:_})},$=function(e){q(e.target.files)},Y=function(e,t){var n=a.instructions,i=a.title;if(D||S||(n=Object(C.__)("To edit this block, you need permission to upload media.")),void 0===n||void 0===i){var d=null!=r?r:[],p=Object(se.a)(d,1)[0],m=1===d.length,O=m&&"audio"===p,g=m&&"image"===p,h=m&&"video"===p;void 0===n&&D&&(n=Object(C.__)("Upload a media file or pick one from your media library."),O?n=Object(C.__)("Upload an audio file, pick one from your media library, or add one with a URL."):g?n=Object(C.__)("Upload an image file, pick one from your media library, or add one with a URL."):h&&(n=Object(C.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===i&&(i=Object(C.__)("Media"),O?i=Object(C.__)("Audio"):g?i=Object(C.__)("Image"):h&&(i=Object(C.__)("Video")))}var j=s()("block-editor-media-placeholder",o,{"is-appender":f});return Object(l.createElement)(v.Placeholder,{icon:c,label:i,instructions:n,className:j,notices:b,onClick:t,onDoubleClick:I,preview:u},e,N)},X=function(){return k?null:Object(l.createElement)(v.DropZone,{onFilesDrop:q,onHTMLDrop:T})},Q=function(){return w&&Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(C.__)("Cancel"),isLink:!0,onClick:w},Object(C.__)("Cancel"))},Z=function(){return S&&Object(l.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(l.createElement)(v.Button,{className:"block-editor-media-placeholder__button",onClick:U,isPressed:H,isTertiary:!0},Object(C.__)("Insert from URL")),H&&Object(l.createElement)(vf,{src:L,onChange:G,onSubmit:W,onClose:K}))};return j||y?(j&&Vo()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(l.createElement)(sf,null,X())):Object(l.createElement)(sf,{fallback:Y(Z())},function(){var e=Object(l.createElement)(uf,{addToGallery:O,gallery:h&&!(!r||0===r.length)&&r.every((function(e){return"image"===e||e.startsWith("image/")})),multiple:h,onSelect:E,allowedTypes:r,value:Array.isArray(n)?n.map((function(e){return e.id})):n.id,render:function(e){var t=e.open;return Object(l.createElement)(v.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(C.__)("Media Library"))}});if(D&&f)return Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(v.FormFileUpload,{onChange:$,accept:p,multiple:h,render:function(t){var n=t.openFileDialog,r=Object(l.createElement)(l.Fragment,null,Object(l.createElement)(v.Button,{isPrimary:!0,className:s()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(C.__)("Upload")),e,Z(),Q());return Y(r,n)}}));if(D){var t=Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(v.FormFileUpload,{isPrimary:!0,className:s()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:$,accept:p,multiple:h},Object(C.__)("Upload")),e,Z(),Q());return Y(t)}return Y(e)}())})),gf=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(zd,Object(i.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));gf.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(Se.a)(e,["value","tagName"]);return Object(l.createElement)(o,c,n)};var hf=gf,jf=Object(l.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(Se.a)(e,["__experimentalVersion"]);if(2===n)return Object(l.createElement)(hf,Object(i.a)({ref:t},r));var o=r.className,c=r.onChange,a=Object(Se.a)(r,["className","onChange"]);return Object(l.createElement)(Lo.a,Object(i.a)({ref:t,className:s()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},a))}));function kf(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(b.useInstanceId)(kf),c=r||Object(C.sprintf)(
|
68 |
/* translators: 1: property name. 2: viewport name. */
|
69 |
+
Object(C._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(l.createElement)(v.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var yf=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,a=e.isResponsive,u=void 0!==a&&a,d=e.defaultLabel,b=void 0===d?{id:"all",
|
70 |
/* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
|
71 |
+
label:Object(C.__)("All")}:d,f=e.viewports,p=void 0===f?[{id:"small",label:Object(C.__)("Small screens")},{id:"medium",label:Object(C.__)("M
|