/*! This file is auto-generated */ !function(){var e={6411:function(e,t){var n,o,r; /*! autosize 4.0.4 license: MIT http://www.jacklmoore.com/autosize */o=[e,t],n=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),l=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){l=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,i=function(){e.clientWidth!==n&&p()},a=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.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",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:a,update:p}),s()}function s(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),p()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(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}function d(){if(0!==e.scrollHeight){var o=u(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function p(){d();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(re.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(a,a+c.count));a+=c.count,c.added||(s+=c.count)}}var p=t[i-1];return i>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[i-2].value+=p.value,t.pop()),t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.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 l=this;function i(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 a=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,c=1,u=a+s,d=[{newPos:-1,components:[]}],p=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=a&&p+1>=s)return i([{value:this.join(t),count:t.length}]);function m(){for(var n=-1*c;n<=c;n+=2){var r=void 0,u=d[n-1],p=d[n+1],m=(p?p.newPos:0)-n;u&&(d[n-1]=void 0);var f=u&&u.newPos+1=a&&m+1>=s)return i(o(l,r.components,t,e,l.useLongestToken));d[n]=r}else d[n]=void 0}var h;c++}if(r)!function e(){setTimeout((function(){if(c>u)return r();m()||e()}),0)}();else for(;c<=u;){var f=m();if(f)return f}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,l=n.length,i=e.newPos,a=i-o,s=0;i+10?!0===i?o.scrollTop(t,_.top+k.top):!1===i?o.scrollTop(t,_.top+y.top):k.top<0?o.scrollTop(t,_.top+k.top):o.scrollTop(t,_.top+y.top):l||((i=void 0===i||!!i)?o.scrollTop(t,_.top+k.top):o.scrollTop(t,_.top+y.top)),r&&(k.left<0||y.left>0?!0===a?o.scrollLeft(t,_.left+k.left):!1===a?o.scrollLeft(t,_.left+y.left):k.left<0?o.scrollLeft(t,_.left+k.left):o.scrollLeft(t,_.left+y.left):l||((a=void 0===a||!!a)?o.scrollLeft(t,_.left+k.left):o.scrollLeft(t,_.left+y.left)))}},5425:function(e,t,n){"use strict";e.exports=n(1345)},5022:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;tt},ie64:function(){return v.ie()&&d},firefox:function(){return b()||n},opera:function(){return b()||o},webkit:function(){return b()||r},safari:function(){return v.webkit()},chrome:function(){return b()||l},windows:function(){return b()||s},osx:function(){return b()||a},linux:function(){return b()||c},iphone:function(){return b()||p},mobile:function(){return b()||p||m||u||g},nativeApp:function(){return b()||f},android:function(){return b()||u},ipad:function(){return b()||m}};e.exports=v},7939:function(e,t,n){"use strict";var o,r=n(3110);r.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")) /** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */,e.exports=function(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,l=n in document;if(!l){var i=document.createElement("div");i.setAttribute(n,"return;"),l="function"==typeof i[n]}return!l&&o&&"wheel"===e&&(l=document.implementation.hasFeature("Events.wheel","3.0")),l}},195:function(e,t,n){"use strict";var o=n(3812),r=n(7939);function l(e){var t=0,n=0,o=0,r=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,r=10*n,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}l.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=l},5372:function(e,t,n){"use strict";var o=n(9567);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,i){if(i!==o){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,bigint: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:l,resetWarningCache:r};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=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}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;ne;function w(e,t=""){const n=new Map,o=[];return n.set(t,o),e.forEach((e=>{const{clientId:t,innerBlocks:r}=e;o.push(t),w(r,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function C(e,t=""){const n=[],o=[[t,e]];for(;o.length;){const[e,t]=o.shift();t.forEach((({innerBlocks:t,...r})=>{n.push([r.clientId,e]),t?.length&&o.push([r.clientId,t])}))}return n}function x(e,t=S){const n=[],o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n.push([r.clientId,t(r)])}return n}function B(e){return x(e,(e=>{const{attributes:t,...n}=e;return n}))}function I(e){return x(e,(e=>e.attributes))}function T(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&b()(e.clientIds,t.clientIds)&&function(e,t){return b()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function M(e,t){const n=e.tree,o=[...t],r=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),r.push(...e.innerBlocks)}for(const e of r)n.set(e.clientId,{});for(const t of r)n.set(t.clientId,Object.assign(n.get(t.clientId),{...e.byClientId.get(t.clientId),attributes:e.attributes.get(t.clientId),innerBlocks:t.innerBlocks.map((e=>n.get(e.clientId)))}))}function P(e,t,n=!1){const o=e.tree,r=new Set([]),l=new Set;for(const o of t){let t=n?o:e.parents.get(o);do{if(e.controlledInnerBlocks[t]){l.add(t);break}r.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of r)o.set(e,{...o.get(e)});for(const t of r)o.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>o.get(e)));for(const t of l)o.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>o.get(e)))})}const N=(0,p.pipe)(f.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=new Map(t.attributes),t.attributes.forEach(((n,r)=>{const{name:l}=t.byClientId.get(r);"core/block"===l&&n.ref===e&&t.attributes.set(r,{...n,ref:o})}))}return e(t,n)}),(e=>(t={},n)=>{const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":o.tree=new Map(o.tree),M(o,n.blocks),P(o,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":o.tree=new Map(o.tree),o.tree.set(n.clientId,{...o.tree.get(n.clientId),...o.byClientId.get(n.clientId),attributes:o.attributes.get(n.clientId)}),P(o,[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":o.tree=new Map(o.tree),n.clientIds.forEach((e=>{o.tree.set(e,{...o.tree.get(e),attributes:o.attributes.get(e)})})),P(o,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=function(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t[o.clientId]=!0}return t}(n.blocks);o.tree=new Map(o.tree),n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e))).forEach((e=>{o.tree.delete(e)})),M(o,n.blocks),P(o,n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds)void 0===t.parents.get(e)||""!==t.parents.get(e)&&!o.byClientId.get(t.parents.get(e))||r.push(t.parents.get(e));P(o,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds)void 0===t.parents.get(r)||""!==t.parents.get(r)&&!o.byClientId.get(t.parents.get(r))||e.push(t.parents.get(r));o.tree=new Map(o.tree),n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e))).forEach((e=>{o.tree.delete(e)})),P(o,e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),o.tree=new Map(o.tree),P(o,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=new Map(o.tree),P(o,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];o.attributes.forEach(((t,r)=>{"core/block"===o.byClientId.get(r).name&&t.ref===n.updatedId&&e.push(r)})),o.tree=new Map(o.tree),e.forEach((e=>{o.tree.set(e,{...o.byClientId.get(e),attributes:o.attributes.get(e),innerBlocks:o.tree.get(e).innerBlocks})})),P(o,e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order.get(n.rootClientId)&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order.get(n.rootClientId)}));let l=r;if(n.blocks.length){l=e(l,{...n,type:"INSERT_BLOCKS",index:0});const r=new Map(l.order);Object.keys(o).forEach((e=>{t.order.get(e)&&r.set(e,t.order.get(e))})),l.order=r,l.tree=new Map(l.tree),Object.keys(o).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&l.tree.set(n,t.tree.get(n))}))}return l}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(B(n.blocks)),attributes:new Map(I(n.blocks)),order:w(n.blocks),parents:new Map(C(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(t?.tree),M(e,n.blocks),e.tree.set("",{innerBlocks:n.blocks.map((t=>e.tree.get(t.clientId)))}),e}return e(t,n)}),(function(e){let t,n=!1;return(o,r)=>{let l=e(o,r);const i="MARK_LAST_CHANGE_AS_PERSISTENT"===r.type||n;if(o===l&&!i){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type;const e=null===(a=o?.isPersistentChange)||void 0===a||a;return o.isPersistentChange===e?o:{...l,isPersistentChange:e}}return l={...l,isPersistentChange:i?!n:!T(r,t)},t=r,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type,l}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const o=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(o,n)}return e(t,n)}))({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return B(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...o}=t.updates;if(0===Object.values(o).length)return e;const r=new Map(e);return r.set(t.clientId,{...e.get(t.clientId),...o}),r}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),B(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return I(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;const n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),n}case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let o=!1;const r=new Map(e);for(const l of t.clientIds){var n;const i=Object.entries(t.uniqueByBlock?t.attributes[l]:null!==(n=t.attributes)&&void 0!==n?n:{});if(0===i.length)continue;let a=!1;const s=e.get(l),c={};i.forEach((([e,t])=>{s[e]!==t&&(a=!0,c[e]=t)})),o=o||a,a&&r.set(l,{...s,...c})}return o?r:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),I(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{var n;const o=w(t.blocks),r=new Map(e);return o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.set("",(null!==(n=e.get(""))&&void 0!==n?n:[]).concat(o[""])),r}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e.get(n)||[],r=w(t.blocks,n),{index:l=o.length}=t,i=new Map(e);return r.forEach(((e,t)=>{i.set(t,e)})),i.set(n,y(o,r.get(n),l)),i}case"MOVE_BLOCKS_TO_POSITION":{var o;const{fromRootClientId:n="",toRootClientId:r="",clientIds:l}=t,{index:i=e.get(r).length}=t;if(n===r){const t=e.get(r).indexOf(l[0]),n=new Map(e);return n.set(r,E(e.get(r),t,i,l.length)),n}const a=new Map(e);return a.set(n,null!==(o=e.get(n)?.filter((e=>!l.includes(e))))&&void 0!==o?o:[]),a.set(r,y(e.get(r),l,i)),a}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],l=e.get(o);if(!l.length||r===l[0])return e;const i=l.indexOf(r),a=new Map(e);return a.set(o,E(l,i,i-1,n.length)),a}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],l=n[n.length-1],i=e.get(o);if(!i.length||l===i[i.length-1])return e;const a=i.indexOf(r),s=new Map(e);return s.set(o,E(i,a,a+1,n.length)),s}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=w(t.blocks),r=new Map(e);return t.replacedClientIds.forEach((e=>{r.delete(e)})),o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.forEach(((e,t)=>{const l=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...o.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);r.set(t,l)})),r}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,o)=>{var r;const l=null!==(r=e?.filter((e=>!t.removedClientIds.includes(e))))&&void 0!==r?r:[];l.length!==e.length&&n.set(o,l)})),n}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return C(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return C(t.blocks,t.rootClientId||"").forEach((([e,t])=>{n.set(e,t)})),n}case"MOVE_BLOCKS_TO_POSITION":{const n=new Map(e);return t.clientIds.forEach((e=>{n.set(e,t.toRootClientId||"")})),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),C(t.blocks,e.get(t.clientIds[0])).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks(e={},{type:t,clientId:n,hasControlledInnerBlocks:o}){return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e}});function L(e={},t){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;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}const R=(0,f.combineReducers)({blocks:N,isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":const{selectionStart:n,selectionEnd:o}=t;return{selectionStart:n,selectionEnd:o};case"MULTI_SELECT":const{start:r,end:l}=t;return r===e.selectionStart?.clientId&&l===e.selectionEnd?.clientId?e:{selectionStart:{clientId:r},selectionEnd:{clientId:l}};case"RESET_BLOCKS":const i=e?.selectionStart?.clientId,a=e?.selectionEnd?.clientId;if(!i&&!a)return e;if(!t.blocks.some((e=>e.clientId===i)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===a)))return{...e,selectionEnd:e.selectionStart}}const n=L(e.selectionStart,t),o=L(e.selectionEnd,t);return n===e.selectionStart&&o===e.selectionEnd?e:{selectionStart:n,selectionEnd:o}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(e=null,t){return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((([e])=>!t.clientIds.includes(e))));case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;if(!t.settings){if(e.hasOwnProperty(n)){const{[n]:t,...o}=e;return o}return e}return b()(e[n],t.settings)?e:{...e,[n]:t.settings}}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:o,__unstableWithInserter:r,operation:l}=t,i={rootClientId:n,index:o,__unstableWithInserter:r,operation:l};return b()(e,i)?e:i}case"HIDE_INSERTION_POINT":return null}return e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(e=k,t){return"UPDATE_SETTINGS"===t.type?t.reset?{...k,...t.settings}:{...e,...t.settings}:e},preferences:function(e=_,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:r}=n;let l=r;const i=(0,f.select)(a.store).getActiveBlockVariation(r,o);return i?.name&&(l+="/"+i.name),"core/block"===r&&(l+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[l]:{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1}}}}),e)}return e},lastBlockAttributesChange:function(e=null,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return e},editorMode:function(e="edit",t){return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(e=null,t){return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_MODE"===t.type?null:e},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(e={},t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":if(!t.blocks.length)return e;const n=t.blocks.map((e=>e.clientId)),o=t.meta?.source;return{clientIds:n,source:o};case"RESET_BLOCKS":return{}}return e},temporarilyEditingAsBlocks:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},blockVisibility:function(e={},t){return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e},blockEditingModes:function(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{const n=new Map(e);return n.delete(t.clientId),n}case"RESET_BLOCKS":return e.has("")?(new Map).set("",e.get("")):e}return e},styleOverrides:function(e=new Map,t){switch(t.type){case"SET_STYLE_OVERRIDE":return new Map(e).set(t.id,t.style);case"DELETE_STYLE_OVERRIDE":{const n=new Map(e);return n.delete(t.id),n}}return e},removalPromptData:function(e=!1,t){switch(t.type){case"DISPLAY_BLOCK_REMOVAL_PROMPT":const{clientIds:e,selectPrevious:n,blockNamesForPrompt:o}=t;return{clientIds:e,selectPrevious:n,blockNamesForPrompt:o};case"CLEAR_BLOCK_REMOVAL_PROMPT":return!1}return e},blockRemovalRules:function(e=!1,t){return"SET_BLOCK_REMOVAL_RULES"===t.type?t.rules:e},openedBlockSettingsMenu:function(e=null,t){var n;return"SET_OPENED_BLOCK_SETTINGS_MENU"===t.type?null!==(n=t?.clientId)&&void 0!==n?n:null:e},registeredInserterMediaCategories:function(e=[],t){return"REGISTER_INSERTER_MEDIA_CATEGORY"===t.type?[...e,t.category]:e}});var A=function(e){return(t,n)=>{const o=e(t,n);return t?(o.automaticChangeStatus=t.automaticChangeStatus,"MARK_AUTOMATIC_CHANGE"===n.type?{...o,automaticChangeStatus:"pending"}:"MARK_AUTOMATIC_CHANGE_FINAL"===n.type&&"pending"===t.automaticChangeStatus?{...o,automaticChangeStatus:"final"}:o.blocks===t.blocks&&o.selection===t.selection||"final"!==o.automaticChangeStatus&&o.selection!==t.selection?o:{...o,automaticChangeStatus:void 0}):o}}(R),D={};function O(e){return[e]}function z(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o(o,r)=>{let l,i;if("function"==typeof e?(l=e(o),i=e(r)):(l=o[e],i=r[e]),l>i)return"asc"===n?1:-1;if(i>l)return"asc"===n?-1:1;const a=t.findIndex((e=>e===o)),s=t.findIndex((e=>e===r));return a>s?1:s>a?-1:0};function K(e,t,n="asc"){return e.concat().sort(W(t,e,n))}const q=[],Z=new Set;function Y(e,t){const n=e.blocks.byClientId.get(t),o="core/social-link";if("web"!==c.Platform.OS&&n?.name===o){const n=e.blocks.attributes.get(t),{service:r}=null!=n?n:{};return r?`${o}-${r}`:o}return n?n.name:null}function X(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function Q(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function J(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const ee=V(((e,t)=>e.blocks.byClientId.has(t)?{...e.blocks.byClientId.get(t),attributes:Q(e,t)}:null),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function te(e,t){const n=t&&Qt(e,t)?"controlled||"+t:t||"";return e.blocks.tree.get(n)?.innerBlocks||q}const ne=V(((e,t)=>($()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:oe(e,t)})),(e=>[e.blocks.order])),oe=V(((e,t="")=>($()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),Ue(e,t).map((t=>ne(e,t))))),(e=>[e.blocks.order])),re=V(((e,t)=>{const n=Array.isArray(t)?t:[t],o=[];for(const t of n)for(const n of Ue(e,t))o.push(n,...re(e,n));return o}),(e=>[e.blocks.order])),le=V((e=>{const t=[];for(const n of Ue(e))t.push(n,...re(e,n));return t}),(e=>[e.blocks.order])),ie=V(((e,t)=>{const n=le(e);return t?n.reduce(((n,o)=>e.blocks.byClientId.get(o).name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),ae=V(((e,t)=>{if(!t)return q;const n=Array.isArray(t)?t:[t],o=le(e).filter((t=>{const o=e.blocks.byClientId.get(t);return n.includes(o.name)}));return o.length>0?o:q}),(e=>[e.blocks.order,e.blocks.byClientId])),se=V(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>J(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),ce=V(((e,t)=>se(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>se(e,t)));function ue(e,t){return Ue(e,t).length}function de(e){return e.selection.selectionStart}function pe(e){return e.selection.selectionEnd}function me(e){return e.selection.selectionStart.clientId}function fe(e){return e.selection.selectionEnd.clientId}function ge(e){const t=Te(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function he(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function be(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function ve(e){const t=be(e);return t?J(e,t):null}function _e(e,t){return e.blocks.parents.has(t)?e.blocks.parents.get(t):null}const ke=V(((e,t,n=!1)=>{const o=[];let r=t;for(;e.blocks.parents.get(r);)r=e.blocks.parents.get(r),o.push(r);return o.length?n?o:o.reverse():q}),(e=>[e.blocks.parents])),ye=V(((e,t,n,o=!1)=>{const r=ke(e,t,o),l=Array.isArray(n)?e=>n.includes(e):e=>n===e;return r.filter((t=>l(Y(e,t))))}),(e=>[e.blocks.parents]));function Ee(e,t){let n,o=t;do{n=o,o=e.blocks.parents.get(o)}while(o);return n}function Se(e,t){const n=be(e),o=[...ke(e,t),t],r=[...ke(e,n),n];let l;const i=Math.min(o.length,r.length);for(let e=0;e{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return q;if(t.clientId===n.clientId)return[t.clientId];const o=_e(e,t.clientId);if(null===o)return q;const r=Ue(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId);return l>i?r.slice(i,l+1):r.slice(l,i+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Te(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?q:Ie(e)}const Me=V((e=>{const t=Te(e);return t.length?t.map((t=>J(e,t))):q}),(e=>[...Ie.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Pe(e){return Te(e)[0]||null}function Ne(e){const t=Te(e);return t[t.length-1]||null}function Le(e,t){return Pe(e)===t}function Re(e,t){return-1!==Te(e).indexOf(t)}const Ae=V(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=_e(e,n),o=Re(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function De(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Oe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function ze(e){const t=de(e),n=pe(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Ve(e){const t=de(e),n=pe(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function Fe(e){return Ie(e).some((t=>{const n=Y(e,t);return!(0,a.getBlockType)(n).merge}))}function He(e,t){const n=de(e),o=pe(e);if(n.clientId===o.clientId)return!1;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return!1;const r=_e(e,n.clientId);if(r!==_e(e,o.clientId))return!1;const l=Ue(e,r);let i,s;l.indexOf(n.clientId)>l.indexOf(o.clientId)?(i=o,s=n):(i=n,s=o);const c=t?s.clientId:i.clientId,u=t?i.clientId:s.clientId,d=Y(e,c);if(!(0,a.getBlockType)(d).merge)return!1;const p=J(e,u);if(p.name===d)return!0;const m=(0,a.switchToBlockType)(p,d);return m&&m.length}const Ge=e=>{const t=de(e),n=pe(e);if(t.clientId===n.clientId)return q;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return q;const o=_e(e,t.clientId);if(o!==_e(e,n.clientId))return q;const r=Ue(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId),[s,c]=l>i?[n,t]:[t,n],u=J(e,s.clientId),d=(0,a.getBlockType)(u.name),p=J(e,c.clientId),m=(0,a.getBlockType)(p.name),f=u.attributes[s.attributeKey],g=p.attributes[c.attributeKey],h=d.attributes[s.attributeKey],b=m.attributes[c.attributeKey];let v=(0,G.create)({html:f,...j(h)}),_=(0,G.create)({html:g,...j(b)});return v=(0,G.remove)(v,0,s.offset),_=(0,G.remove)(_,c.offset,_.text.length),[{...u,attributes:{...u.attributes,[s.attributeKey]:(0,G.toHTMLString)({value:v,...j(h)})}},{...p,attributes:{...p.attributes,[c.attributeKey]:(0,G.toHTMLString)({value:_,...j(b)})}}]};function Ue(e,t){return e.blocks.order.get(t||"")||q}function $e(e,t){return Ue(e,_e(e,t)).indexOf(t)}function je(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function We(e,t,n=!1){return Ue(e,t).some((t=>je(e,t)||Re(e,t)||n&&We(e,t,n)))}function Ke(e,t,n=!1){return Ue(e,t).some((t=>nt(e,t)||n&&Ke(e,t,n)))}function qe(e,t){if(!t)return!1;const n=Te(e),o=n.indexOf(t);return o>-1&&ont(e,t)))}function rt(){return $()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const lt=V((e=>{let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=_e(e,l)||void 0,n=$e(e,r.clientId)+1):n=Ue(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionPoint,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function it(e){return null!==e.insertionPoint}function at(e){return e.template.isValid}function st(e){return e.settings.template}function ct(e,t){var n,o;return t?null!==(n=Vt(e,t)?.templateLock)&&void 0!==n&&n:null!==(o=e.settings.templateLock)&&void 0!==o&&o}const ut=(e,t,n=null)=>"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,dt=(e,t,n=null)=>{let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=(0,a.getBlockType)(t),!o)return!1;const{allowedBlockTypes:r}=Ft(e);if(!ut(r,t,!0))return!1;if(!!ct(e,n))return!1;if("disabled"===sn(e,null!=n?n:""))return!1;const l=Vt(e,n);if(n&&void 0===l)return!1;const i=l?.allowedBlocks,c=ut(i,t),u=o.parent,d=Y(e,n),p=ut(u,d);let m=!0;const f=o.ancestor;if(f){m=[n,...ke(e,n)].some((t=>ut(f,Y(e,t))))}const g=m&&(null===c&&null===p||!0===c||!0===p);return g?(0,s.applyFilters)("blockEditor.__unstableCanInsertBlockType",g,o,n,{getBlock:J.bind(null,e),getBlockParentsByBlockName:ye.bind(null,e)}):g},pt=V(dt,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId.get(n),e.settings.allowedBlockTypes,e.settings.templateLock,e.blockEditingModes]));function mt(e,t,n=null){return t.every((t=>pt(e,Y(e,t),n)))}function ft(e,t,n=null){const o=Q(e,t);return null===o||(void 0!==o.lock?.remove?!o.lock.remove:!ct(e,n)&&"disabled"!==sn(e,n))}function gt(e,t,n=null){return t.every((t=>ft(e,t,n)))}function ht(e,t,n=null){const o=Q(e,t);return null===o||(void 0!==o.lock?.move?!o.lock.move:"all"!==ct(e,n)&&"disabled"!==sn(e,n))}function bt(e,t,n=null){return t.every((t=>ht(e,t,n)))}function vt(e,t){const n=Q(e,t);if(null===n)return!0;const{lock:o}=n;return!o?.edit}function _t(e,t){return!!(0,a.hasBlockSupport)(t,"lock",!0)&&!!e.settings?.canLockBlocks}function kt(e,t){var n;return null!==(n=e.preferences.insertUsage?.[t])&&void 0!==n?n:null}const yt=(e,t,n)=>!!(0,a.hasBlockSupport)(t,"inserter",!0)&&dt(e,t.name,n),Et=(e,t)=>{if(!e)return t;const 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}},St=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;(0,a.hasBlockSupport)(n.name,"multiple",!0)||(r=se(e,le(e)).some((({name:e})=>e===n.name)));const{time:l,count:i=0}=kt(e,o)||{},s={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:Et(l,i)};if("transform"===t)return s;const c=(0,a.getBlockVariations)(n.name,"inserter");return{...s,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,variations:c,example:n.example,utility:1}},wt=V(((e,t=null)=>{const n=dt(e,"core/block",t)?Wt(e).map((t=>{const n=t.wp_pattern_sync_status?H:{src:H,foreground:"var(--wp-block-synced-color)"},o=`core/block/${t.id}`,{time:r,count:l=0}=kt(e,o)||{},i=Et(r,l);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title?.raw,icon:n,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:i,content:t.content.raw,syncStatus:t.wp_pattern_sync_status}})):[],o=St(e,{buildScope:"inserter"}),r=(0,a.getBlockTypes)().filter((n=>yt(e,n,t))).map(o).reduce(((t,n)=>{const{variations:o=[]}=n;if(o.some((({isDefault:e})=>e))||t.push(n),o.length){const r=((e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:l=0}=kt(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:Et(r,l)}})(e,n);t.push(...o.map(r))}return t}),[]),{core:l,noncore:i}=r.reduce(((e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e}),{core:[],noncore:[]});return[...[...l,...i],...n]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Wt(e),(0,a.getBlockTypes)()])),Ct=V(((e,t,n=null)=>{const o=Array.isArray(t)?t:[t],r=St(e,{buildScope:"transform"}),l=(0,a.getBlockTypes)().filter((t=>yt(e,t,n))).map(r),i=Object.fromEntries(Object.entries(l).map((([,e])=>[e.name,e]))),s=(0,a.getPossibleBlockTransformations)(o).reduce(((e,t)=>(i[t?.name]&&e.push(i[t.name]),e)),[]);return K(s,(e=>i[e.name].frecency),"desc")}),((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,a.getBlockTypes)()])),xt=V(((e,t=null)=>{if((0,a.getBlockTypes)().some((n=>yt(e,n,t))))return!0;return dt(e,"core/block",t)&&Wt(e).length>0}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Wt(e),(0,a.getBlockTypes)()])),Bt=V(((e,t=null)=>{if(!t)return;return[...(0,a.getBlockTypes)().filter((n=>yt(e,n,t))),...dt(e,"core/block",t)&&Wt(e).length>0?["core/block"]:[]]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Wt(e),(0,a.getBlockTypes)()])),It=V(((e,t=null)=>($()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),Bt(e,t))),((e,t)=>[...Bt.getDependants(e,t)])),Tt=V(((e,t=null)=>{if(!t)return;const n=e.blockListSettings[t]?.defaultBlock,o=e.blockListSettings[t]?.directInsert;return n&&o?"function"==typeof o?o(J(e,t))?n:null:n:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)])),Mt=V(((e,t=null)=>($()('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),Tt(e,t))),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)]));function Pt(e){var t,n;const o=null!==(t=e?.settings?.__experimentalReusableBlocks)&&void 0!==t?t:q,r=null!==(n=e?.settings?.__experimentalUserPatternCategories)&&void 0!==n?n:[],l=new Map;return r.forEach((e=>l.set(e.id,e))),o.map((e=>({name:`core/block/${e.id}`,id:e.id,title:e.title.raw,categories:e.wp_pattern_category.map((e=>l&&l.get(e)?l.get(e).slug:e)),content:e.content.raw,syncStatus:e.wp_pattern_sync_status})))}const Nt=V((e=>e?.settings?.__experimentalUserPatternCategories),(e=>[e.settings.__experimentalUserPatternCategories])),Lt=V(((e,t)=>{const n=[...e.settings.__experimentalBlockPatterns,...Pt(e)].find((({name:e})=>e===t));return n?{...n,blocks:(0,a.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.__experimentalReusableBlocks,e?.settings?.__experimentalUserPatternCategories])),Rt=V((e=>{const t=e.settings.__experimentalBlockPatterns,n=Pt(e),{allowedBlockTypes:o}=Ft(e),r=[...n,...t].filter((({inserter:e=!0})=>!!e)).map((({name:t})=>Lt(e,t))),l=r.filter((({blocks:e})=>((e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){const e=n.shift();if(!ut(t,e.name||e.blockName,!0))return!1;e.innerBlocks?.forEach((e=>{n.push(e)}))}return!0})(e,o)));return l}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.__experimentalReusableBlocks,e.settings.allowedBlockTypes,e?.settings?.__experimentalUserPatternCategories])),At=V(((e,t=null)=>{const n=Rt(e).filter((({blocks:n})=>n.every((({name:n})=>pt(e,n,t)))));return n}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.__experimentalReusableBlocks,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId.get(t)])),Dt=V(((e,t,n=null)=>{if(!t)return q;const o=At(e,n),r=Array.isArray(t)?t:[t],l=o.filter((e=>e?.blockTypes?.some?.((e=>r.includes(e)))));return 0===l.length?q:l}),((e,t,n)=>[...At.getDependants(e,n)])),Ot=V(((e,t,n=null)=>($()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),Dt(e,t,n))),((e,t,n)=>[...At.getDependants(e,n)])),zt=V(((e,t,n=null)=>{if(!t)return q;if(t.some((({clientId:t,innerBlocks:n})=>n.length||Qt(e,t))))return q;const o=Array.from(new Set(t.map((({name:e})=>e))));return Dt(e,o,n)}),((e,t,n)=>[...Dt.getDependants(e,n)]));function Vt(e,t){return e.blockListSettings[t]}function Ft(e){return e.settings}function Ht(e){return e.blocks.isPersistentChange}const Gt=V(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),Ut=V(((e,t)=>{const n=Wt(e).find((e=>e.id===t));return n?n.title?.raw:null}),(e=>[Wt(e)]));function $t(e){return e.blocks.isIgnoredChange}function jt(e){return e.lastBlockAttributesChange}function Wt(e){var t;return null!==(t=e?.settings?.__experimentalReusableBlocks)&&void 0!==t?t:q}function Kt(e){return"navigation"===e.editorMode}function qt(e){return e.editorMode}function Zt(e){return e.hasBlockMovingClientId}function Yt(e){return!!e.automaticChangeStatus}function Xt(e,t){return e.highlightedBlock===t}function Qt(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Jt=V(((e,t)=>{if(!t.length)return null;const n=be(e);if(t.includes(Y(e,n)))return n;const o=Te(e),r=ye(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function en(e,t,n){const{lastBlockInserted:o}=e;return o.clientIds?.includes(t)&&o.source===n}function tn(e,t){var n;return null===(n=e.blockVisibility?.[t])||void 0===n||n}const nn=V((e=>{const t=new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])));return 0===t.size?Z:t}),(e=>[e.blockVisibility])),on=V(((e,t)=>{let n,o=t;for(;e.blocks.parents.has(o);)o=e.blocks.parents.get(o),o&&"contentOnly"===ct(e,o)&&(n=o);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function rn(e){return e.temporarilyEditingAsBlocks}function ln(e,t){if("default"!==sn(e,t))return!1;if(!vt(e,t))return!0;const n=qt(e);if("zoom-out"===n&&t&&!_e(e,t))return!0;const o=(0,a.hasBlockSupport)(Y(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!o&&Qt(e,t))&&!je(e,t)&&!We(e,t,!0)}function an(e,t){let n=e.blocks.parents.get(t);for(;n;){if(ln(e,n))return!0;n=e.blocks.parents.get(n)}return!1}const sn=(0,f.createRegistrySelector)((e=>(t,n="")=>{if(t.blockEditingModes.has(n))return t.blockEditingModes.get(n);if(!n)return"default";const o=_e(t,n);if("contentOnly"===ct(t,o)){const o=Y(t,n);return e(a.store).__experimentalHasContentRoleAttribute(o)?"contentOnly":"disabled"}const r=sn(t,o);return"contentOnly"===r?"default":r})),cn=(0,f.createRegistrySelector)((e=>(t,n="")=>{const o=n||be(t);if(!o)return!1;const{getGroupingBlockName:r}=e(a.store),l=J(t,o),i=r();return l&&(l.name===i||(0,a.getBlockType)(l.name)?.transforms?.ungroup)&&!!l.innerBlocks.length&&ft(t,o)})),un=(0,f.createRegistrySelector)((e=>(t,n=q)=>{const{getGroupingBlockName:o}=e(a.store),r=o(),l=n?.length?n:Ie(t),i=l?.length?_e(t,l[0]):void 0;return pt(t,r,i)&&l.length&>(t,l,i)})),dn=["inserterMediaCategories","blockInspectorAnimation"];function pn(e,{stripExperimentalSettings:t=!1,reset:n=!1}={}){let o=e;if(t&&"web"===c.Platform.OS){o={};for(const t in e)dn.includes(t)||(o[t]=e[t])}return{type:"UPDATE_SETTINGS",settings:o,reset:n}}function mn(){return{type:"HIDE_BLOCK_INTERFACE"}}function fn(){return{type:"SHOW_BLOCK_INTERFACE"}}const gn=(e,t=!0,n=!1)=>({select:o,dispatch:r,registry:l})=>{if(!e||!e.length)return;var i;i=e,e=Array.isArray(i)?i:[i];const a=o.getBlockRootClientId(e[0]);if(!o.canRemoveBlocks(e,a))return;const s=!n&&o.getBlockRemovalRules();if(s){const n=new Set,l=[...e];for(;l.length;){const e=l.shift(),t=o.getBlockName(e);s[t]&&n.add(t);const r=o.getBlockOrder(e);l.push(...r)}if(n.size)return void r(function(e,t,n){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,blockNamesForPrompt:n}}(e,t,Array.from(n)))}t&&r.selectPreviousBlock(e[0],t),l.batch((()=>{r({type:"REMOVE_BLOCKS",clientIds:e}),r(hn())}))},hn=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;const{__unstableHasCustomAppender:n}=e.getSettings();n||t.insertDefaultBlock()};function bn(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function vn(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function _n(e){return{type:"SET_OPENED_BLOCK_SETTINGS_MENU",clientId:e}}function kn(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function yn(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function En(e){return e.isBlockInterfaceHidden}function Sn(e){return e?.lastBlockInserted?.clientIds}const wn=V(((e,t)=>{const n=t=>"disabled"===sn(e,t)&&Ue(e,t).every(n);return"disabled"===sn(e,t)&&Ue(e,t).every(n)}),(e=>[e.blocks.parents,e.blocks.order,e.blockEditingModes,e.blockListSettings])),Cn=V(((e,t="")=>Ue(e,t).flatMap((t=>"disabled"!==sn(e,t)?[{clientId:t,innerBlocks:Cn(e,t)}]:Cn(e,t)))),(e=>[e.blocks.order,e.blockEditingModes,e.settings.templateLock,e.blockListSettings])),xn=V(((e,t,n=!1)=>ke(e,t,n).filter((t=>"disabled"!==sn(e,t)))),(e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]));function Bn(e){return e.removalPromptData}function In(e){return e.blockRemovalRules}function Tn(e){return e.openedBlockSettingsMenu}function Mn(e){return e.styleOverrides}function Pn(e){return e.registeredInserterMediaCategories}const Nn=V((e=>{const{settings:{inserterMediaCategories:t,allowedMimeTypes:n,enableOpenverseMediaCategory:o},registeredInserterMediaCategories:r}=e;if(!t&&!r.length||!n)return;const l=t?.map((({name:e})=>e))||[];return[...t||[],...(r||[]).filter((({name:e})=>!l.includes(e)))].filter((e=>!(!o&&"openverse"===e.name)&&Object.values(n).some((t=>t.startsWith(`${e.mediaType}/`)))))}),(e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories]));var Ln=window.wp.a11y;const Rn="†";function An(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return"string"==typeof n&&-1!==n.indexOf(Rn)}))}const Dn=e=>Array.isArray(e)?e:[e],On=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(zn(e))},zn=e=>({select:t,dispatch:n})=>{const o=t.getTemplate(),r=t.getTemplateLock(),l=!o||"all"!==r||(0,a.doBlocksMatchTemplate)(e,o);if(l!==t.isValidTemplate())return n.setTemplateValidity(l),l};function Vn(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Fn(e){return $()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function Hn(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Dn(e),attributes:t,uniqueByBlock:n}}function Gn(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Un(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const $n=(e,t=!1)=>({select:n,dispatch:o})=>{const r=n.getPreviousBlockClientId(e);if(r)o.selectBlock(r,-1);else if(t){const t=n.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}},jn=e=>({select:t,dispatch:n})=>{const o=t.getNextBlockClientId(e);o&&n.selectBlock(o)};function Wn(){return{type:"START_MULTI_SELECT"}}function Kn(){return{type:"STOP_MULTI_SELECT"}}const qn=(e,t,n=0)=>({select:o,dispatch:r})=>{if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const l=o.getSelectedBlockCount();(0,Ln.speak)((0,v.sprintf)((0,v._n)("%s block selected.","%s blocks selected.",l),l),"assertive")};function Zn(){return{type:"CLEAR_SELECTED_BLOCK"}}function Yn(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Xn(e,t){var n;const o=null!==(n=t?.__experimentalPreferredStyleVariations?.value)&&void 0!==n?n:{};return e.map((e=>{const t=e.name;if(!(0,a.hasBlockSupport)(t,"defaultStylePicker",!0))return e;if(!o[t])return e;const n=e.attributes?.className;if(n?.includes("is-style-"))return e;const{attributes:r={}}=e,l=o[t];return{...e,attributes:{...r,className:`${n||""} is-style-${l}`.trim()}}}))}const Qn=(e,t,n,o=0,r)=>({select:l,dispatch:i,registry:a})=>{e=Dn(e),t=Xn(Dn(t),l.getSettings());const s=l.getBlockRootClientId(e[0]);for(let e=0;e{i({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),i.ensureDefaultBlock()}))};function Jn(e,t){return Qn(e,t)}const eo=e=>(t,n)=>({select:o,dispatch:r})=>{o.canMoveBlocks(t,n)&&r({type:e,clientIds:Dn(t),rootClientId:n})},to=eo("MOVE_BLOCKS_DOWN"),no=eo("MOVE_BLOCKS_UP"),oo=(e,t="",n="",o)=>({select:r,dispatch:l})=>{if(r.canMoveBlocks(e,t)){if(t!==n){if(!r.canRemoveBlocks(e,t))return;if(!r.canInsertBlocks(e,n))return}l({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}};function ro(e,t="",n="",o){return oo([e],t,n,o)}function lo(e,t,n,o,r){return io([e],t,n,o,0,r)}const io=(e,t,n,o=!0,r=0,l)=>({select:i,dispatch:a})=>{null!==r&&"object"==typeof r&&(l=r,r=0,$()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=Xn(Dn(e),i.getSettings());const s=[];for(const t of e){i.canInsertBlockType(t.name,n)&&s.push(t)}s.length&&a({type:"INSERT_BLOCKS",blocks:s,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l})};function ao(e,t,n={}){const{__unstableWithInserter:o,operation:r}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o,operation:r}}const so=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function co(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const uo=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});const n=e.getBlocks(),o=e.getTemplate(),r=(0,a.synchronizeBlocksWithTemplate)(n,o);t.resetBlocks(r)},po=e=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),l=n.getSelectionEnd();if(r.clientId===l.clientId)return;if(!r.attributeKey||!l.attributeKey||void 0===r.offset||void 0===l.offset)return!1;const i=n.getBlockRootClientId(r.clientId);if(i!==n.getBlockRootClientId(l.clientId))return;const s=n.getBlockOrder(i);let c,u;s.indexOf(r.clientId)>s.indexOf(l.clientId)?(c=l,u=r):(c=r,u=l);const d=e?u:c,p=n.getBlock(d.clientId),m=(0,a.getBlockType)(p.name);if(!m.merge)return;const f=c,g=u,h=n.getBlock(f.clientId),b=(0,a.getBlockType)(h.name),v=n.getBlock(g.clientId),_=(0,a.getBlockType)(v.name),k=h.attributes[f.attributeKey],y=v.attributes[g.attributeKey],E=b.attributes[f.attributeKey],S=_.attributes[g.attributeKey];let w=(0,G.create)({html:k,...j(E)}),C=(0,G.create)({html:y,...j(S)});w=(0,G.remove)(w,f.offset,w.text.length),C=(0,G.insert)(C,Rn,0,g.offset);const x=(0,a.cloneBlock)(h,{[f.attributeKey]:(0,G.toHTMLString)({value:w,...j(E)})}),B=(0,a.cloneBlock)(v,{[g.attributeKey]:(0,G.toHTMLString)({value:C,...j(S)})}),I=e?x:B,T=h.name===v.name?[I]:(0,a.switchToBlockType)(I,m.name);if(!T||!T.length)return;let M;if(e){const e=T.pop();M=m.merge(e.attributes,B.attributes)}else{const e=T.shift();M=m.merge(x.attributes,e.attributes)}const P=An(M),N=M[P],L=(0,G.create)({html:N,...j(m.attributes[P])}),R=L.text.indexOf(Rn),A=(0,G.remove)(L,R,R+1),D=(0,G.toHTMLString)({value:A,...j(m.attributes[P])});M[P]=D;const O=n.getSelectedBlockClientIds(),z=[...e?T:[],{...p,attributes:{...p.attributes,...M}},...e?[]:T];t.batch((()=>{o.selectionChange(p.clientId,P,R,R),o.replaceBlocks(O,z,0,n.getSelectedBlocksInitialCaretPosition())}))},mo=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();if(n.clientId===o.clientId)return;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return;const r=e.getBlockRootClientId(n.clientId);if(r!==e.getBlockRootClientId(o.clientId))return;const l=e.getBlockOrder(r);let i,s;l.indexOf(n.clientId)>l.indexOf(o.clientId)?(i=o,s=n):(i=n,s=o);const c=i,u=s,d=e.getBlock(c.clientId),p=(0,a.getBlockType)(d.name),m=e.getBlock(u.clientId),f=(0,a.getBlockType)(m.name),g=d.attributes[c.attributeKey],h=m.attributes[u.attributeKey],b=p.attributes[c.attributeKey],v=f.attributes[u.attributeKey];let _=(0,G.create)({html:g,...j(b)}),k=(0,G.create)({html:h,...j(v)});_=(0,G.remove)(_,c.offset,_.text.length),k=(0,G.remove)(k,0,u.offset),t.replaceBlocks(e.getSelectedBlockClientIds(),[{...d,attributes:{...d.attributes,[c.attributeKey]:(0,G.toHTMLString)({value:_,...j(b)})}},{...m,attributes:{...m.attributes,[u.attributeKey]:(0,G.toHTMLString)({value:k,...j(v)})}}])},fo=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();t.selectionChange({start:{clientId:n.clientId},end:{clientId:o.clientId}})},go=(e,t)=>({registry:n,select:o,dispatch:r})=>{const l=[e,t];r({type:"MERGE_BLOCKS",blocks:l});const[i,s]=l,c=o.getBlock(i),u=(0,a.getBlockType)(c.name);if(!u)return;if(!u.merge&&!(0,a.getBlockSupport)(c.name,"__experimentalOnMerge"))return void r.selectBlock(c.clientId);const d=o.getBlock(s);if(!u.merge){const e=(0,a.switchToBlockType)(d,u.name);if(1!==e?.length)return void r.selectBlock(c.clientId);const[t]=e;return t.innerBlocks.length<1?void r.selectBlock(c.clientId):void n.batch((()=>{r.insertBlocks(t.innerBlocks,void 0,i),r.removeBlock(s),r.selectBlock(t.innerBlocks[0].clientId);const e=o.getNextBlockClientId(i);if(e&&o.getBlockName(i)===o.getBlockName(e)){const t=o.getBlockAttributes(i),n=o.getBlockAttributes(e);Object.keys(t).every((e=>t[e]===n[e]))&&(r.moveBlocksToPosition(o.getBlockOrder(e),e,i),r.removeBlock(e,!1))}}))}const p=(0,a.getBlockType)(d.name),{clientId:m,attributeKey:f,offset:g}=o.getSelectionStart(),h=(m===i?u:p).attributes[f],b=(m===i||m===s)&&void 0!==f&&void 0!==g&&!!h;h||("number"==typeof f?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 "+typeof f):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const v=(0,a.cloneBlock)(c),_=(0,a.cloneBlock)(d);if(b){const e=m===i?v:_,t=e.attributes[f],n=(0,G.insert)((0,G.create)({html:t,...j(h)}),Rn,g,g);e.attributes[f]=(0,G.toHTMLString)({value:n,...j(h)})}const k=c.name===d.name?[_]:(0,a.switchToBlockType)(_,c.name);if(!k||!k.length)return;const y=u.merge(v.attributes,k[0].attributes);if(b){const e=An(y),t=y[e],n=(0,G.create)({html:t,...j(u.attributes[e])}),o=n.text.indexOf(Rn),l=(0,G.remove)(n,o,o+1),i=(0,G.toHTMLString)({value:l,...j(u.attributes[e])});y[e]=i,r.selectionChange(c.clientId,e,o,o)}r.replaceBlocks([c.clientId,d.clientId],[{...c,attributes:{...c.attributes,...y}},...k.slice(1)],0)},ho=(e,t=!0)=>gn(e,t);function bo(e,t){return ho([e],t)}function vo(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function _o(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function ko(){return{type:"START_TYPING"}}function yo(){return{type:"STOP_TYPING"}}function Eo(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function So(){return{type:"STOP_DRAGGING_BLOCKS"}}function wo(){return $()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Co(){return $()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function xo(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const Bo=(e,t,n)=>({dispatch:o})=>{const r=(0,a.getDefaultBlockName)();if(!r)return;const l=(0,a.createBlock)(r,e);return o.insertBlock(l,n,t)};function Io(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function To(e){return pn(e,{stripExperimentalSettings:!0})}function Mo(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Po(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function No(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const Lo=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:t=(e=>setTimeout(e,100))}=window;t((()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Ro=(e=!0)=>({dispatch:t})=>{t.__unstableSetEditorMode(e?"navigation":"edit")},Ao=e=>({dispatch:t,select:n})=>{if("zoom-out"===e){const e=n.getBlockSelectionStart();e&&t.selectBlock(n.getBlockHierarchyRootClientId(e))}t({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,Ln.speak)((0,v.__)("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.")):"edit"===e?(0,Ln.speak)((0,v.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,Ln.speak)((0,v.__)("You are currently in zoom-out mode."))},Do=(e=null)=>({dispatch:t})=>{t({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,Ln.speak)((0,v.__)("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."))},Oo=(e,t=!0)=>({select:n,dispatch:o})=>{if(!e||!e.length)return;const r=n.getBlocksByClientId(e);if(r.some((e=>!e)))return;const l=r.map((e=>e.name));if(l.some((e=>!(0,a.hasBlockSupport)(e,"multiple",!0))))return;const i=n.getBlockRootClientId(e[0]),s=Dn(e),c=n.getBlockIndex(s[s.length-1]),u=r.map((e=>(0,a.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(u,c+1,i,t),u.length>1&&t&&o.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map((e=>e.clientId))},zo=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e);return n.insertDefaultBlock({},o,r)},Vo=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e);return n.insertDefaultBlock({},o,r+1)};function Fo(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const Ho=e=>async({dispatch:t})=>{t(Fo(e,!0)),await new Promise((e=>setTimeout(e,150))),t(Fo(e,!1))};function Go(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function Uo(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function $o(e){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e}}const jo=e=>({select:t,dispatch:n})=>{if(!e||"object"!=typeof e)return void console.error("Category should be an `InserterMediaCategory` object.");if(!e.name)return void console.error("Category should have a `name` that should be unique among all media categories.");if(!e.labels?.name)return void console.error("Category should have a `labels.name`.");if(!["image","audio","video"].includes(e.mediaType))return void console.error("Category should have `mediaType` property that is one of `image|audio|video`.");if(!e.fetch||"function"!=typeof e.fetch)return void console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise`.");const o=t.getRegisteredInserterMediaCategories();o.some((({name:t})=>t===e.name))?console.error(`A category is already registered with the same name: "${e.name}".`):o.some((({labels:{name:t}={}})=>t===e.labels?.name))?console.error(`A category is already registered with the same labels.name: "${e.labels.name}".`):n({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function Wo(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function Ko(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}const qo="core/block-editor";var Zo=window.wp.privateApis;const{lock:Yo,unlock:Xo}=(0,Zo.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/block-editor"),Qo={reducer:A,selectors:e,actions:l},Jo=(0,f.createReduxStore)(qo,{...Qo,persist:["preferences"]}),er=(0,f.registerStore)(qo,{...Qo,persist:["preferences"]});Xo(er).registerPrivateActions(t),Xo(er).registerPrivateSelectors(r),Xo(Jo).registerPrivateActions(t),Xo(Jo).registerPrivateSelectors(r);const tr={name:"",isSelected:!1},nr=(0,c.createContext)(tr),{Provider:or}=nr;function rr(){return(0,c.useContext)(nr)}function lr(){const{isSelected:e,clientId:t,name:n}=rr();return(0,f.useSelect)((o=>{if(e)return!0;const{getBlockName:r,isFirstMultiSelectedBlock:l,getMultiSelectedBlockClientIds:i}=o(Jo);return!!l(t)&&i().every((e=>r(e)===n))}),[t,e,n])}function ir({group:e="default",controls:t,children:n,__experimentalShareWithChildBlocks:o=!1}){const r=function(e,t){const n=lr(),{clientId:o}=rr(),r=(0,f.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:r}=e(Jo),{hasBlockSupport:l}=e(a.store);return t&&l(n(o),"__experimentalExposeControlsToChildren",!1)&&r(o)}),[t,o]);return n?g[e]?.Fill:r?g.parent.Fill:null}(e,o);if(!r)return null;const l=(0,c.createElement)(c.Fragment,null,"default"===e&&(0,c.createElement)(m.ToolbarGroup,{controls:t}),n);return(0,c.createElement)(m.__experimentalStyleProvider,{document:document},(0,c.createElement)(r,null,(e=>{const{forwardedContext:t=[]}=e;return t.reduce(((e,[t,n])=>(0,c.createElement)(t,{...n},e)),l)})))}window.wp.warning;const{ComponentsContext:ar}=Xo(m.privateApis);function sr({group:e="default",...t}){const n=(0,c.useContext)(m.__experimentalToolbarContext),o=(0,c.useContext)(ar),r=(0,c.useMemo)((()=>({forwardedContext:[[m.__experimentalToolbarContext.Provider,{value:n}],[ar.Provider,{value:o}]]})),[n,o]),l=g[e]?.Slot,i=(0,m.__experimentalUseSlotFills)(l?.__unstableName);if(!l)return null;if(!i?.length)return null;const a=(0,c.createElement)(l,{...t,bubblesVirtually:!0,fillProps:r});return"default"===e?a:(0,c.createElement)(m.ToolbarGroup,null,a)}const cr=ir;cr.Slot=sr;const ur=e=>(0,c.createElement)(ir,{group:"inline",...e});ur.Slot=e=>(0,c.createElement)(sr,{group:"inline",...e});var dr=cr;var pr=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"}));var mr=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"}));var fr=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}));var gr=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));var hr=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"}));var br=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"}));var vr=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}));const _r={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child:first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child:last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child:first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child:last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > *",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > *",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function kr(e,t=""){return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function yr(e,t=_r,n,o){let r="";return t?.[n]?.spacingStyles?.length&&o&&t[n].spacingStyles.forEach((t=>{r+=`${kr(e,t.selector.trim())} { `,r+=Object.entries(t.rules).map((([e,t])=>`${e}: ${t||o}`)).join("; "),r+="; }"})),r}function Er(e){const{contentSize:t,wideSize:n,type:o="default"}=e,r={},l=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return l.test(t)&&"constrained"===o&&(r.none=(0,v.sprintf)((0,v.__)("Max %s wide"),t)),l.test(n)&&(r.wide=(0,v.sprintf)((0,v.__)("Max %s wide"),n)),r}var Sr=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"}));var wr=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,c.createElement)(F.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,c.createElement)(F.Path,{d:"m18 7.5v9h1.5v-9z"}));var Cr=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,c.createElement)(F.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,c.createElement)(F.Path,{d:"m7.5 19.5h9v-1.5h-9z"}));var xr=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,c.createElement)(F.Path,{d:"m16.5 6h-9v-1.5h9z"}));var Br=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,c.createElement)(F.Path,{d:"m18 16.5v-9h1.5v9z"}));var Ir=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,c.createElement)(F.Path,{d:"m16.5 19.5h-9v-1.5h9z",style:{fill:"#1e1e1e"}}));const Tr=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,c.createElement)(F.Path,{d:"m4.5 16.5v-9h1.5v9z"}));const Mr=["top","right","bottom","left"],Pr={top:void 0,right:void 0,bottom:void 0,left:void 0},Nr={custom:Sr,axial:Sr,horizontal:wr,vertical:Cr,top:xr,right:Br,bottom:Ir,left:Tr},Lr={default:(0,v.__)("Spacing control"),top:(0,v.__)("Top"),bottom:(0,v.__)("Bottom"),left:(0,v.__)("Left"),right:(0,v.__)("Right"),mixed:(0,v.__)("Mixed"),vertical:(0,v.__)("Vertical"),horizontal:(0,v.__)("Horizontal"),axial:(0,v.__)("Horizontal & vertical"),custom:(0,v.__)("Custom")},Rr={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function Ar(e){return!!e?.includes&&("0"===e||e.includes("var:preset|spacing|"))}function Dr(e,t){if(!Ar(e))return e;const n=Vr(e),o=t.find((e=>String(e.slug)===n));return o?.size}function Or(e,t){if(!e||Ar(e)||"0"===e)return e;const n=t.find((t=>String(t.size)===String(e)));return n?.slug?`var:preset|spacing|${n.slug}`:e}function zr(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function Vr(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}function Fr(e,t){if(!e||!e.length)return!1;const n=e.includes("horizontal")||e.includes("left")&&e.includes("right"),o=e.includes("vertical")||e.includes("top")&&e.includes("bottom");return"horizontal"===t?n:"vertical"===t?o:n||o}function Hr(e,t="0"){const n=function(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:e?.top,left:t?e:e?.left}}(e);if(!n)return null;const o=zr(n?.top)||t,r=zr(n?.left)||t;return o===r?o:`${o} ${r}`}const Gr=(0,c.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(m.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Ur=(0,c.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(m.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),$r=(0,c.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(m.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),jr=(0,c.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(m.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})),Wr=(0,c.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(m.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})),Kr={top:{icon:$r,title:(0,v._x)("Align top","Block vertical alignment setting")},center:{icon:Ur,title:(0,v._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Gr,title:(0,v._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:jr,title:(0,v._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:Wr,title:(0,v._x)("Space between","Block vertical alignment setting")}},qr=["top","center","bottom"];var Zr=function({value:e,onChange:t,controls:n=qr,isCollapsed:o=!0,isToolbar:r}){const l=Kr[e],i=Kr.top,a=r?m.ToolbarGroup:m.ToolbarDropdownMenu,s=r?{isCollapsed:o}:{};return(0,c.createElement)(a,{icon:l?l.icon:i.icon,label:(0,v._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((n=>{return{...Kr[n],isActive:e===n,role:o?"menuitemradio":void 0,onClick:(r=n,()=>t(e===r?void 0:r))};var r})),...s})};const Yr=e=>(0,c.createElement)(Zr,{...e,isToolbar:!1}),Xr=e=>(0,c.createElement)(Zr,{...e,isToolbar:!0}),Qr={left:pr,center:mr,right:fr,"space-between":gr,stretch:hr};var Jr=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:l}){const i=e=>{n(e===o?void 0:e)},a=o?Qr[o]:Qr.left,s=[{name:"left",icon:pr,title:(0,v.__)("Justify items left"),isActive:"left"===o,onClick:()=>i("left")},{name:"center",icon:mr,title:(0,v.__)("Justify items center"),isActive:"center"===o,onClick:()=>i("center")},{name:"right",icon:fr,title:(0,v.__)("Justify items right"),isActive:"right"===o,onClick:()=>i("right")},{name:"space-between",icon:gr,title:(0,v.__)("Space between items"),isActive:"space-between"===o,onClick:()=>i("space-between")},{name:"stretch",icon:hr,title:(0,v.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>i("stretch")}],u=l?m.ToolbarGroup:m.ToolbarDropdownMenu,d=l?{isCollapsed:t}:{};return(0,c.createElement)(u,{icon:a,popoverProps:r,label:(0,v.__)("Change items justification"),controls:s.filter((t=>e.includes(t.name))),...d})};const el=e=>(0,c.createElement)(Jr,{...e,isToolbar:!1}),tl=e=>(0,c.createElement)(Jr,{...e,isToolbar:!0});var nl=function(){return nl=Object.assign||function(e){for(var t,n=1,o=arguments.length;n[e,ul(t)])))}:e}function dl(e,t,n){const o=function(e){return Array.isArray(e)?e:"number"==typeof e?[e.toString()]:[e]}(t),r=e?ul(e):{};return o.reduce(((e,r,l)=>(void 0===e[r]&&(Number.isInteger(t[l+1])?e[r]=[]:e[r]={}),l===o.length-1&&(e[r]=n),e[r])),r),r}const pl=(e,t,n)=>{var o;const r=Array.isArray(t)?t:t.split(".");let l=e;return r.forEach((e=>{l=l?.[e]})),null!==(o=l)&&void 0!==o?o:n},ml=["color","border","dimensions","typography","spacing"],fl={"color.palette":e=>e.colors,"color.gradients":e=>e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},gl={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"},hl=e=>gl[e]||e;function bl(e){const{name:t,clientId:n}=rr();return(0,f.useSelect)((o=>{if(ml.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let r=(0,s.applyFilters)("blockEditor.useSetting.before",void 0,e,n,t);if(void 0!==r)return r;const l=hl(e),i=[n,...o(Jo).getBlockParents(n,!0)];for(const e of i){const n=o(Jo).getBlockName(e);if((0,a.hasBlockSupport)(n,"__experimentalSettings",!1)){var c;const n=o(Jo).getBlockAttributes(e);if(r=null!==(c=pl(n,`settings.blocks.${t}.${l}`))&&void 0!==c?c:pl(n,`settings.${l}`),void 0!==r)break}}const u=o(Jo).getSettings();if(void 0===r){var d;const e=`__experimentalFeatures.${l}`;r=null!==(d=pl(u,`__experimentalFeatures.blocks.${t}.${l}`))&&void 0!==d?d:pl(u,e)}var p,m;if(void 0!==r)return a.__EXPERIMENTAL_PATHS_WITH_MERGE[l]?null!==(p=null!==(m=r.custom)&&void 0!==m?m:r.theme)&&void 0!==p?p:r.default:r;const f=fl[l]?fl[l](u):void 0;return void 0!==f?f:"typography.dropCap"===l||void 0}),[t,n,e])}const vl="1600px",_l="320px",kl=1,yl=.25,El=.75,Sl="14px";function wl({minimumFontSize:e,maximumFontSize:t,fontSize:n,minimumViewportWidth:o=_l,maximumViewportWidth:r=vl,scaleFactor:l=kl,minimumFontSizeLimit:i}){if(i=Cl(i)?i:Sl,n){const o=Cl(n);if(!o?.unit)return null;const r=Cl(i,{coerceTo:o.unit});if(r?.value&&!e&&!t&&o?.value<=r?.value)return null;if(t||(t=`${o.value}${o.unit}`),!e){const t="px"===o.unit?o.value:16*o.value,n=Math.min(Math.max(1-.075*Math.log2(t),yl),El),l=xl(o.value*n,3);e=r?.value&&l0}function Tl(e){const t=e?.typography,n=e?.layout,o=Cl(n?.wideSize)?n?.wideSize:null;return Il(t)&&o?{fluid:{maxViewportWidth:o,...t.fluid}}:{fluid:t?.fluid}}const Ml="body",Pl=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>Bl(e,Tl(t)),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]}],Nl={"color.background":"color","color.text":"color","filter.duotone":"duotone","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.caption.color.text":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",shadow:"shadow","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function Ll(e,t,n,o,r){const l=[pl(e,["blocks",t,...n]),pl(e,n)];for(const i of l)if(i){const l=["custom","theme","default"];for(const a of l){const l=i[a];if(l){const i=l.find((e=>e[o]===r));if(i){if("slug"===o)return i;return Ll(e,t,n,"slug",i.slug)[o]===i[o]?i:void 0}}}}}function Rl(e,t,n){if(!n||"string"!=typeof n){if(!n?.ref||"string"!=typeof n?.ref)return n;{const t=n.ref.split(".");if(!(n=pl(e,t))||n?.ref)return n}}const o="var:",r="var(--wp--";let l;if(n.startsWith(o))l=n.slice(4).split("|");else{if(!n.startsWith(r)||!n.endsWith(")"))return n;l=n.slice(10,-1).split("--")}const[i,...a]=l;return"preset"===i?function(e,t,n,[o,r]){const l=Pl.find((e=>e.cssVarInfix===o));if(!l)return n;const i=Ll(e.settings,t,l.path,"slug",r);if(i){const{valueKey:n}=l;return Rl(e,t,i[n])}return n}(e,t,n,a):"custom"===i?function(e,t,n,o){var r;const l=null!==(r=pl(e.settings,["blocks",t,"custom",...o]))&&void 0!==r?r:pl(e.settings,["custom",...o]);return l?Rl(e,t,l):n}(e,t,n,a):n}function Al(e,t){const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}function Dl(e,t){return"object"!=typeof e||"object"!=typeof t?e===t:b()(e?.styles,t?.styles)&&b()(e?.settings,t?.settings)}const Ol=(0,c.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),zl={settings:{},styles:{}},Vl=["appearanceTools","useRootPaddingAwareAlignments","border.color","border.radius","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.minHeight","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textColumns","typography.textDecoration","typography.textTransform","typography.writingMode"],Fl=()=>{const{user:e,setUserConfig:t}=(0,c.useContext)(Ol);return[!!e&&!b()(e,zl),(0,c.useCallback)((()=>t((()=>zl))),[t])]};function Hl(e,t,n="all"){const{setUserConfig:o,...r}=(0,c.useContext)(Ol),l=t?".blocks."+t:"",i=e?"."+e:"",a=`settings${l}${i}`,s=`settings${i}`,u="all"===n?"merged":n;return[(0,c.useMemo)((()=>{const t=r[u];if(!t)throw"Unsupported source";var n;if(e)return null!==(n=pl(t,a))&&void 0!==n?n:pl(t,s);let o={};return Vl.forEach((e=>{var n;const r=null!==(n=pl(t,`settings${l}.${e}`))&&void 0!==n?n:pl(t,`settings.${e}`);void 0!==r&&(o=dl(o,e.split("."),r))})),o}),[r,u,e,a,s,l]),e=>{o((t=>dl(t,a.split("."),e)))}]}function Gl(e,t,n="all",{shouldDecodeEncode:o=!0}={}){const{merged:r,base:l,user:i,setUserConfig:a}=(0,c.useContext)(Ol),s=e?"."+e:"",u=t?`styles.blocks.${t}${s}`:`styles${s}`;let d,p;switch(n){case"all":d=pl(r,u),p=o?Rl(r,t,d):d;break;case"user":d=pl(i,u),p=o?Rl(r,t,d):d;break;case"base":d=pl(l,u),p=o?Rl(l,t,d):d;break;default:throw"Unsupported source"}return[p,n=>{a((l=>dl(l,u.split("."),o?function(e,t,n,o){if(!o)return o;const r=Nl[n],l=Pl.find((e=>e.cssVarInfix===r));if(!l)return o;const{valueKey:i,path:a}=l,s=Ll(e,t,a,i,o);return s?`var:preset|${r}|${s.slug}`:o}(r.settings,t,e,n):n)))}]}function Ul(e,t,n){const{supportedStyles:o,supports:r}=(0,f.useSelect)((e=>({supportedStyles:Xo(e(a.store)).getSupportedStyles(t,n),supports:e(a.store).getBlockType(t)?.supports})),[t,n]);return(0,c.useMemo)((()=>{const t={...e};return o.includes("fontSize")||(t.typography={...t.typography,fontSizes:{},customFontSize:!1}),o.includes("fontFamily")||(t.typography={...t.typography,fontFamilies:{}}),t.color={...t.color,text:t.color?.text&&o.includes("color"),background:t.color?.background&&(o.includes("background")||o.includes("backgroundColor")),button:t.color?.button&&o.includes("buttonColor"),heading:t.color?.heading&&o.includes("headingColor"),link:t.color?.link&&o.includes("linkColor"),caption:t.color?.caption&&o.includes("captionColor")},o.includes("background")||(t.color.gradients=[],t.color.customGradient=!1),o.includes("filter")||(t.color.defaultDuotone=!1,t.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textTransform","textDecoration","writingMode"].forEach((e=>{o.includes(e)||(t.typography={...t.typography,[e]:!1})})),o.includes("columnCount")||(t.typography={...t.typography,textColumns:!1}),["contentSize","wideSize"].forEach((e=>{o.includes(e)||(t.layout={...t.layout,[e]:!1})})),["padding","margin","blockGap"].forEach((e=>{o.includes(e)||(t.spacing={...t.spacing,[e]:!1});const n=Array.isArray(r?.spacing?.[e])?r?.spacing?.[e]:r?.spacing?.[e]?.sides;n?.length&&t.spacing?.[e]&&(t.spacing={...t.spacing,[e]:{...t.spacing?.[e],sides:n}})})),o.includes("minHeight")||(t.dimensions={...t.dimensions,minHeight:!1}),["radius","color","style","width"].forEach((e=>{o.includes("border"+e.charAt(0).toUpperCase()+e.slice(1))||(t.border={...t.border,[e]:!1})})),t.shadow=!!o.includes("shadow")&&t.shadow,t}),[e,o,r])}function $l(e){const t=e?.color?.palette?.custom,n=e?.color?.palette?.theme,o=e?.color?.palette?.default,r=e?.color?.defaultPalette;return(0,c.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,v._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,v._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,v._x)("Custom","Indicates this palette is created by the user."),colors:t}),e}),[t,n,o,r])}function jl(e){const t=e?.color?.gradients?.custom,n=e?.color?.gradients?.theme,o=e?.color?.gradients?.default,r=e?.color?.defaultGradients;return(0,c.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,v._x)("Theme","Indicates this palette comes from the theme."),gradients:n}),r&&o&&o.length&&e.push({name:(0,v._x)("Default","Indicates this palette comes from WordPress."),gradients:o}),t&&t.length&&e.push({name:(0,v._x)("Custom","Indicates this palette is created by the user."),gradients:t}),e}),[t,n,o,r])}const Wl=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map((([e,t])=>[e,Wl(t)])).filter((([,e])=>void 0!==e));return t.length?Object.fromEntries(t):void 0};function Kl(e,t,n,o,r,l){if(Object.values(null!=e?e:{}).every((e=>!e)))return n;if(1===l.length&&n.innerBlocks.length===o.length)return n;let i=o[0]?.attributes;if(l.length>1&&o.length>1){if(!o[r])return n;i=o[r]?.attributes}let a=n;return Object.entries(e).forEach((([e,n])=>{n&&t[e].forEach((e=>{const t=pl(i,e);t&&(a={...a,attributes:dl(a.attributes,e,t)})}))})),a}function ql(e,t,n){const o=(0,a.getBlockSupport)(e,t),r=o?.__experimentalSkipSerialization;return Array.isArray(r)?r.includes(n):r}function Zl(e,t){const n=bl("typography.fontFamilies"),o=bl("typography.fontSizes"),r=bl("typography.customFontSize"),l=bl("typography.fontStyle"),i=bl("typography.fontWeight"),a=bl("typography.lineHeight"),s=bl("typography.textColumns"),u=bl("typography.textDecoration"),d=bl("typography.writingMode"),p=bl("typography.textTransform"),m=bl("typography.letterSpacing"),f=bl("spacing.padding"),g=bl("spacing.margin"),h=bl("spacing.blockGap"),b=bl("spacing.spacingSizes"),v=bl("spacing.units"),_=bl("dimensions.minHeight"),k=bl("layout"),y=bl("border.color"),E=bl("border.radius"),S=bl("border.style"),w=bl("border.width"),C=bl("color.custom"),x=bl("color.palette.custom"),B=bl("color.customDuotone"),I=bl("color.palette.theme"),T=bl("color.palette.default"),M=bl("color.defaultPalette"),P=bl("color.defaultDuotone"),N=bl("color.duotone.custom"),L=bl("color.duotone.theme"),R=bl("color.duotone.default"),A=bl("color.gradients.custom"),D=bl("color.gradients.theme"),O=bl("color.gradients.default"),z=bl("color.defaultGradients"),V=bl("color.customGradient"),F=bl("color.background"),H=bl("color.link"),G=bl("color.text"),U=bl("color.heading"),$=bl("color.button");return Ul((0,c.useMemo)((()=>({color:{palette:{custom:x,theme:I,default:T},gradients:{custom:A,theme:D,default:O},duotone:{custom:N,theme:L,default:R},defaultGradients:z,defaultPalette:M,defaultDuotone:P,custom:C,customGradient:V,customDuotone:B,background:F,link:H,heading:U,button:$,text:G},typography:{fontFamilies:{custom:n},fontSizes:{custom:o},customFontSize:r,fontStyle:l,fontWeight:i,lineHeight:a,textColumns:s,textDecoration:u,textTransform:p,letterSpacing:m,writingMode:d},spacing:{spacingSizes:{custom:b},padding:f,margin:g,blockGap:h,units:v},border:{color:y,radius:E,style:S,width:w},dimensions:{minHeight:_},layout:k,parentLayout:t})),[n,o,r,l,i,a,s,u,p,m,d,f,g,h,b,v,_,k,t,y,E,S,w,C,x,B,I,T,M,P,N,L,R,A,D,O,z,V,F,H,G,U,$]),e)}const Yl={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},Xl={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Ql={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},Jl=["wrap","nowrap"];var ei={name:"flex",label:(0,v.__)("Flex"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowOrientation:o=!0}=n;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.Flex,null,(0,c.createElement)(m.FlexItem,null,(0,c.createElement)(oi,{layout:e,onChange:t})),(0,c.createElement)(m.FlexItem,null,o&&(0,c.createElement)(li,{layout:e,onChange:t}))),(0,c.createElement)(ri,{layout:e,onChange:t}))},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){if(n?.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=n;return(0,c.createElement)(dr,{group:"block",__experimentalShareWithChildBlocks:!0},(0,c.createElement)(oi,{layout:e,onChange:t,isToolbar:!0}),o&&(0,c.createElement)(ti,{layout:e,onChange:t,isToolbar:!0}))},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:l=_r}){const{orientation:i="horizontal"}=t,a=n?.spacing?.blockGap&&!ql(o,"spacing","blockGap")?Hr(n?.spacing?.blockGap,"0.5em"):void 0,s=Yl[t.justifyContent],c=Jl.includes(t.flexWrap)?t.flexWrap:"wrap",u=Ql[t.verticalAlignment],d=Xl[t.justifyContent]||Xl.left;let p="";const m=[];return c&&"wrap"!==c&&m.push(`flex-wrap: ${c}`),"horizontal"===i?(u&&m.push(`align-items: ${u}`),s&&m.push(`justify-content: ${s}`)):(u&&m.push(`justify-content: ${u}`),m.push("flex-direction: column"),m.push(`align-items: ${d}`)),m.length&&(p=`${kr(e)} {\n\t\t\t\t${m.join("; ")};\n\t\t\t}`),r&&a&&(p+=yr(e,l,"flex",a)),p},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function ti({layout:e,onChange:t,isToolbar:n=!1}){const{orientation:o="horizontal"}=e,r="horizontal"===o?Ql.center:Ql.top,{verticalAlignment:l=r}=e,i=n=>{t({...e,verticalAlignment:n})};if(n)return(0,c.createElement)(Yr,{onChange:i,value:l,controls:"horizontal"===o?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]});const a=[{value:"flex-start",label:(0,v.__)("Align items top")},{value:"center",label:(0,v.__)("Align items center")},{value:"flex-end",label:(0,v.__)("Align items bottom")}];return(0,c.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,c.createElement)("legend",null,(0,v.__)("Vertical alignment")),(0,c.createElement)("div",null,a.map(((e,t,n)=>(0,c.createElement)(m.Button,{key:e,label:n,icon:t,isPressed:l===e,onClick:()=>i(e)})))))}const ni={placement:"bottom-start"};function oi({layout:e,onChange:t,isToolbar:n=!1}){const{justifyContent:o="left",orientation:r="horizontal"}=e,l=n=>{t({...e,justifyContent:n})},i=["left","center","right"];if("horizontal"===r?i.push("space-between"):i.push("stretch"),n)return(0,c.createElement)(el,{allowedControls:i,value:o,onChange:l,popoverProps:ni});const a=[{value:"left",icon:pr,label:(0,v.__)("Justify items left")},{value:"center",icon:mr,label:(0,v.__)("Justify items center")},{value:"right",icon:fr,label:(0,v.__)("Justify items right")}];return"horizontal"===r?a.push({value:"space-between",icon:gr,label:(0,v.__)("Space between items")}):a.push({value:"stretch",icon:hr,label:(0,v.__)("Stretch items")}),(0,c.createElement)(m.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Justification"),value:o,onChange:l,className:"block-editor-hooks__flex-layout-justification-controls"},a.map((({value:e,icon:t,label:n})=>(0,c.createElement)(m.__experimentalToggleGroupControlOptionIcon,{key:e,value:e,icon:t,label:n}))))}function ri({layout:e,onChange:t}){const{flexWrap:n="wrap"}=e;return(0,c.createElement)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Allow to wrap to multiple lines"),onChange:n=>{t({...e,flexWrap:n?"wrap":"nowrap"})},checked:"wrap"===n})}function li({layout:e,onChange:t}){const{orientation:n="horizontal",verticalAlignment:o,justifyContent:r}=e;return(0,c.createElement)(m.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,v.__)("Orientation"),value:n,onChange:n=>{let l=o,i=r;return"horizontal"===n?("space-between"===o&&(l="center"),"stretch"===r&&(i="left")):("stretch"===o&&(l="top"),"space-between"===r&&(i="left")),t({...e,orientation:n,verticalAlignment:l,justifyContent:i})}},(0,c.createElement)(m.__experimentalToggleGroupControlOptionIcon,{icon:br,value:"horizontal",label:(0,v.__)("Horizontal")}),(0,c.createElement)(m.__experimentalToggleGroupControlOptionIcon,{icon:vr,value:"vertical",label:(0,v.__)("Vertical")}))}var ii={name:"default",label:(0,v.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,style:t,blockName:n,hasBlockGapSupport:o,layoutDefinitions:r=_r}){const l=Hr(t?.spacing?.blockGap);let i="";ql(n,"spacing","blockGap")||(l?.top?i=Hr(l?.top):"string"==typeof l&&(i=Hr(l)));let a="";return o&&i&&(a+=yr(e,r,"default",i)),a},getOrientation(){return"vertical"},getAlignments(e,t){const n=Er(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:n[e]})));const o=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:r}=e;t&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:n.wide})}return o.unshift({name:"none",info:n.none}),o}};var ai=(0,c.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,c.cloneElement)(e,{width:t,height:t,...n,ref:o})}));var si=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"}));var ci=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})),ui=window.wp.styleEngine,di={name:"constrained",label:(0,v.__)("Constrained"),inspectorControls:function({layout:e,onChange:t,layoutBlockSupport:n={}}){const{wideSize:o,contentSize:r,justifyContent:l="center"}=e,{allowJustification:i=!0}=n,a=[{value:"left",icon:pr,label:(0,v.__)("Justify items left")},{value:"center",icon:mr,label:(0,v.__)("Justify items center")},{value:"right",icon:fr,label:(0,v.__)("Justify items right")}],s=(0,m.__experimentalUseCustomUnits)({availableUnits:bl("spacing.units")||["%","px","em","rem","vw"]});return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,c.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,c.createElement)(m.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,v.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:s}),(0,c.createElement)(ai,{icon:si})),(0,c.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,c.createElement)(m.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,v.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:s}),(0,c.createElement)(ai,{icon:ci}))),(0,c.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,v.__)("Customize the width for all elements that are assigned to the center or wide columns.")),i&&(0,c.createElement)(m.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,v.__)("Justification"),value:l,onChange:n=>{t({...e,justifyContent:n})}},a.map((({value:e,icon:t,label:n})=>(0,c.createElement)(m.__experimentalToggleGroupControlOptionIcon,{key:e,value:e,icon:t,label:n})))))},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t={},style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:l=_r}){const{contentSize:i,wideSize:a,justifyContent:s}=t,c=Hr(n?.spacing?.blockGap);let u="";ql(o,"spacing","blockGap")||(c?.top?u=Hr(c?.top):"string"==typeof c&&(u=Hr(c)));const d="left"===s?"0 !important":"auto !important",p="right"===s?"0 !important":"auto !important";let m=i||a?`\n\t\t\t\t\t${kr(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=i?i:a};\n\t\t\t\t\t\tmargin-left: ${d};\n\t\t\t\t\t\tmargin-right: ${p};\n\t\t\t\t\t}\n\t\t\t\t\t${kr(e,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=a?a:i};\n\t\t\t\t\t}\n\t\t\t\t\t${kr(e,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===s?m+=`${kr(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${d}; }`:"right"===s&&(m+=`${kr(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${p}; }`),n?.spacing?.padding){(0,ui.getCSSRules)(n).forEach((t=>{"paddingRight"===t.key?m+=`\n\t\t\t\t\t${kr(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${t.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===t.key&&(m+=`\n\t\t\t\t\t${kr(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${t.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)}))}return r&&u&&(m+=yr(e,l,"constrained",u)),m},getOrientation(){return"vertical"},getAlignments(e){const t=Er(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}};const pi={px:600,"%":100,vw:100,vh:100,em:38,rem:38};var mi={name:"grid",label:(0,v.__)("Grid"),inspectorControls:function({layout:e={},onChange:t}){return e?.columnCount?(0,c.createElement)(gi,{layout:e,onChange:t}):(0,c.createElement)(fi,{layout:e,onChange:t})},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:l=_r}){const{minimumColumnWidth:i="12rem",columnCount:a=null}=t,s=n?.spacing?.blockGap&&!ql(o,"spacing","blockGap")?Hr(n?.spacing?.blockGap,"0.5em"):void 0;let c="";const u=[];return a?u.push(`grid-template-columns: repeat(${a}, minmax(0, 1fr))`):i&&u.push(`grid-template-columns: repeat(auto-fill, minmax(min(${i}, 100%), 1fr))`),u.length&&(c=`${kr(e)} { ${u.join("; ")}; }`),r&&s&&(c+=yr(e,l,"grid",s)),c},getOrientation(){return"horizontal"},getAlignments(){return[]}};function fi({layout:e,onChange:t}){const{minimumColumnWidth:n="12rem"}=e,[o,r]=(0,m.__experimentalParseQuantityAndUnitFromRawValue)(n);return(0,c.createElement)("fieldset",null,(0,c.createElement)(m.BaseControl.VisualLabel,{as:"legend"},(0,v.__)("Minimum column width")),(0,c.createElement)(m.Flex,{gap:4},(0,c.createElement)(m.FlexItem,{isBlock:!0},(0,c.createElement)(m.__experimentalUnitControl,{size:"__unstable-large",onChange:n=>{t({...e,minimumColumnWidth:n})},onUnitChange:n=>{let l;["em","rem"].includes(n)&&"px"===r?l=(o/16).toFixed(2)+n:["em","rem"].includes(r)&&"px"===n?l=Math.round(16*o)+n:["vh","vw","%"].includes(n)&&o>100&&(l=100+n),t({...e,minimumColumnWidth:l})},value:n,min:0})),(0,c.createElement)(m.FlexItem,{isBlock:!0},(0,c.createElement)(m.RangeControl,{onChange:n=>{t({...e,minimumColumnWidth:[n,r].join("")})},value:o,min:0,max:pi[r]||600,withInputField:!1}))))}function gi({layout:e,onChange:t}){const{columnCount:n=3}=e;return(0,c.createElement)(m.RangeControl,{label:(0,v.__)("Columns"),value:n,onChange:n=>t({...e,columnCount:n}),min:1,max:6})}const hi=[ii,ei,di,mi];function bi(e="default"){return hi.find((t=>t.name===e))}const vi={type:"default"},_i=(0,c.createContext)(vi),ki=_i.Provider;function yi(){return(0,c.useContext)(_i)}const Ei=[],Si=["none","left","center","right","wide","full"],wi=["wide","full"];function Ci(e=Si){e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n,isBlockBasedTheme:o}=(0,f.useSelect)((e=>{const{getSettings:t}=e(Jo),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout,isBlockBasedTheme:n.__unstableIsBlockBasedTheme}}),[]),r=yi(),l=bi(r?.type),i=l.getAlignments(r,o);if(n){const t=i.filter((({name:t})=>e.includes(t)));return 1===t.length&&"none"===t[0].name?Ei:t}if("default"!==l.name&&"constrained"!==l.name)return Ei;const{alignments:a=Si}=r,s=e.filter((e=>(r.alignments||t||!wi.includes(e))&&a.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?Ei:s}var xi=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"}));var Bi=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"}));var Ii=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"}));var Ti=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"}));const Mi={none:{icon:xi,title:(0,v._x)("None","Alignment option")},left:{icon:Bi,title:(0,v.__)("Align left")},center:{icon:si,title:(0,v.__)("Align center")},right:{icon:Ii,title:(0,v.__)("Align right")},wide:{icon:ci,title:(0,v.__)("Wide width")},full:{icon:Ti,title:(0,v.__)("Full width")}};var Pi=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const l=Ci(n);if(!!!l.length)return null;function i(n){t([e,"none"].includes(n)?void 0:n)}const a=Mi[e],s=Mi.none,u=o?m.ToolbarGroup:m.ToolbarDropdownMenu,p={icon:a?a.icon:s.icon,label:(0,v.__)("Align")},f=o?{isCollapsed:r,controls:l.map((({name:t})=>({...Mi[t],isActive:e===t||!e&&"none"===t,role:r?"menuitemradio":void 0,onClick:()=>i(t)})))}:{toggleProps:{describedBy:(0,v.__)("Change alignment")},children:({onClose:t})=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},l.map((({name:n,info:o})=>{const{icon:r,title:l}=Mi[n],a=n===e||!e&&"none"===n;return(0,c.createElement)(m.MenuItem,{key:n,icon:r,iconPosition:"left",className:d()("components-dropdown-menu__menu-item",{"is-active":a}),isSelected:a,onClick:()=>{i(n),t()},role:"menuitemradio",info:o},l)}))))};return(0,c.createElement)(u,{...p,...f})};const Ni=e=>(0,c.createElement)(Pi,{...e,isToolbar:!1}),Li=e=>(0,c.createElement)(Pi,{...e,isToolbar:!0}),Ri=(0,c.createContext)(null);function Ai(e){var t;const{clientId:n=""}=null!==(t=(0,c.useContext)(Ri))&&void 0!==t?t:{},o=(0,f.useSelect)((e=>e(Jo).getBlockEditingMode(n)),[n]),{setBlockEditingMode:r,unsetBlockEditingMode:l}=(0,f.useDispatch)(Jo);return(0,c.useEffect)((()=>(e&&r(n,e),()=>{e&&l(n)})),[n,e,r,l]),o}const Di=["left","center","right","wide","full"],Oi=["wide","full"];function zi(e,t=!0,n=!0){let o;return o=Array.isArray(e)?Di.filter((t=>e.includes(t))):!0===e?[...Di]:[],!n||!0===e&&!t?o.filter((e=>!Oi.includes(e))):o}const Vi=(0,p.createHigherOrderComponent)((e=>t=>{const n=(0,c.createElement)(e,{key:"edit",...t}),{name:o}=t,r=Ci(zi((0,a.getBlockSupport)(o,"align"),(0,a.hasBlockSupport)(o,"alignWide",!0))).map((({name:e})=>e)),l=Ai();if(!r.length||"default"!==l)return n;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(dr,{group:"block",__experimentalShareWithChildBlocks:!0},(0,c.createElement)(Ni,{value:t.attributes.align,onChange:e=>{if(!e){const n=(0,a.getBlockType)(t.name),o=n?.attributes?.align?.default;o&&(e="")}t.setAttributes({align:e})},controls:r})),n)}),"withToolbarControls"),Fi=(0,p.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,{align:r}=o,l=Ci(zi((0,a.getBlockSupport)(n,"align"),(0,a.hasBlockSupport)(n,"alignWide",!0)));if(void 0===r)return(0,c.createElement)(e,{...t});let i=t.wrapperProps;return l.some((e=>e.name===r))&&(i={...i,"data-align":r}),(0,c.createElement)(e,{...t,wrapperProps:i})}),"withDataAlign");(0,s.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.align)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Di,""]}}),e})),(0,s.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Fi),(0,s.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Vi),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return zi((0,a.getBlockSupport)(t,"align"),(0,a.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=d()(`align${o}`,e.className)),e})),(0,s.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const Hi=(0,m.createSlotFill)("InspectorControls"),Gi=(0,m.createSlotFill)("InspectorAdvancedControls"),Ui=(0,m.createSlotFill)("InspectorControlsBackground"),$i=(0,m.createSlotFill)("InspectorControlsBorder"),ji=(0,m.createSlotFill)("InspectorControlsColor"),Wi=(0,m.createSlotFill)("InspectorControlsFilter"),Ki=(0,m.createSlotFill)("InspectorControlsDimensions"),qi=(0,m.createSlotFill)("InspectorControlsPosition"),Zi=(0,m.createSlotFill)("InspectorControlsTypography");var Yi={default:Hi,advanced:Gi,background:Ui,border:$i,color:ji,dimensions:Ki,filter:Wi,list:(0,m.createSlotFill)("InspectorControlsListView"),position:qi,settings:Hi,styles:(0,m.createSlotFill)("InspectorControlsStyles"),typography:Zi};function Xi({children:e,group:t="default",__experimentalGroup:n,resetAllFilter:o}){n&&($()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=n);const r=lr(),l=Yi[t]?.Fill;return l&&r?(0,c.createElement)(m.__experimentalStyleProvider,{document:document},(0,c.createElement)(l,null,(t=>(0,c.createElement)(Ji,{fillProps:t,children:e,resetAllFilter:o})))):null}function Qi({resetAllFilter:e,children:t}){const{registerResetAllFilter:n,deregisterResetAllFilter:o}=(0,c.useContext)(m.__experimentalToolsPanelContext);return(0,c.useEffect)((()=>{if(e&&n&&o)return n(e),()=>{o(e)}}),[e,n,o]),t}function Ji({children:e,resetAllFilter:t,fillProps:n}){const{forwardedContext:o=[]}=n,r=(0,c.createElement)(Qi,{resetAllFilter:t},e);return o.reduce(((e,[t,n])=>(0,c.createElement)(t,{...n},e)),r)}function ea({children:e,group:t,label:n}){const{updateBlockAttributes:o}=(0,f.useDispatch)(Jo),{getBlockAttributes:r,getMultiSelectedBlockClientIds:l,getSelectedBlockClientId:i,hasMultiSelection:a}=(0,f.useSelect)(Jo),s=i(),u=(0,c.useCallback)(((e=[])=>{const t={},n=a()?l():[s];n.forEach((n=>{const{style:o}=r(n);let l={style:o};e.forEach((e=>{l={...l,...e(l)}})),l={...l,style:Wl(l.style)},t[n]=l})),o(n,t,!0)}),[r,l,a,s,o]);return(0,c.createElement)(m.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:n,resetAll:u,key:s,panelId:s,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},e)}function ta({Slot:e,fillProps:t,...n}){const o=(0,c.useContext)(m.__experimentalToolsPanelContext),r=(0,c.useMemo)((()=>{var e;return{...null!=t?t:{},forwardedContext:[...null!==(e=t?.forwardedContext)&&void 0!==e?e:[],[m.__experimentalToolsPanelContext.Provider,{value:o}]]}}),[o,t]);return(0,c.createElement)(e,{...n,fillProps:r,bubblesVirtually:!0})}function na({__experimentalGroup:e,group:t="default",label:n,fillProps:o,...r}){e&&($()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);const l=Yi[t]?.Slot,i=(0,m.__experimentalUseSlotFills)(l?.__unstableName),a=(0,c.useContext)(m.__unstableMotionContext),s=(0,c.useMemo)((()=>{var e;return{...null!=o?o:{},forwardedContext:[...null!==(e=o?.forwardedContext)&&void 0!==e?e:[],[m.__unstableMotionContext.Provider,{value:a}]]}}),[a,o]);return l&&i?.length?n?(0,c.createElement)(ea,{group:t,label:n},(0,c.createElement)(ta,{...r,fillProps:s,Slot:l})):(0,c.createElement)(l,{...r,fillProps:s,bubblesVirtually:!0}):null}const oa=Xi;oa.Slot=na;const ra=e=>(0,c.createElement)(Xi,{...e,group:"advanced"});ra.Slot=e=>(0,c.createElement)(na,{...e,group:"advanced"}),ra.slotName="InspectorAdvancedControls";var la=oa;const ia=/[\s#]/g,aa={type:"string",source:"attribute",attribute:"id",selector:"*"};const sa=(0,p.createHigherOrderComponent)((e=>t=>{const n=(0,a.hasBlockSupport)(t.name,"anchor"),o=Ai();if(n&&t.isSelected){const n="web"===c.Platform.OS,r=(0,c.createElement)(m.TextControl,{__nextHasNoMarginBottom:!0,className:"html-anchor-control",label:(0,v.__)("HTML anchor"),help:(0,c.createElement)(c.Fragment,null,(0,v.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),n&&(0,c.createElement)(m.ExternalLink,{href:(0,v.__)("https://wordpress.org/documentation/article/page-jumps/")},(0,v.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,v.__)("Add an anchor"),onChange:e=>{e=e.replace(ia,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(e,{...t}),n&&"default"===o&&(0,c.createElement)(la,{group:"advanced"},r),!n&&"core/heading"===t.name&&(0,c.createElement)(la,null,(0,c.createElement)(m.PanelBody,{title:(0,v.__)("Heading settings")},r)))}return(0,c.createElement)(e,{...t})}),"withInspectorControl");(0,s.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.anchor)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:aa}),e})),(0,s.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",sa),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const ca={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};(0,s.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){return e?.attributes?.ariaLabel?.type||(0,a.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:ca}),e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/ariaLabel/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e}));const ua=(0,p.createHigherOrderComponent)((e=>t=>{const n=Ai();return(0,a.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,c.createElement)(c.Fragment,null,(0,c.createElement)(e,{...t}),"default"===n&&(0,c.createElement)(la,{group:"advanced"},(0,c.createElement)(m.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,v.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,v.__)("Separate multiple classes with spaces.")}))):(0,c.createElement)(e,{...t})}),"withInspectorControl");(0,s.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,a.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,s.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",ua),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=d()(e.className,n.className)),e})),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){if(!(0,a.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(t[n]){const o=t[n]?.attributes.className;if(o)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,a.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,a.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,a.getBlockDefaultClassName)(t.name)),e}));var da=window.wp.dom;const pa=(0,c.createContext)({});function ma({value:e,children:t}){const n=(0,c.useContext)(pa),o=(0,c.useMemo)((()=>({...n,...e})),[n,e]);return(0,c.createElement)(pa.Provider,{value:o,children:t})}var fa=pa;const ga={},ha=(0,m.withFilters)("editor.BlockEdit")((e=>{const{name:t}=e,n=(0,a.getBlockType)(t);if(!n)return null;const o=n.edit||n.save;return(0,c.createElement)(o,{...e})}));var ba=e=>{const{attributes:t={},name:n}=e,o=(0,a.getBlockType)(n),r=(0,c.useContext)(fa),l=(0,c.useMemo)((()=>o&&o.usesContext?Object.fromEntries(Object.entries(r).filter((([e])=>o.usesContext.includes(e)))):ga),[o,r]);if(!o)return null;if(o.apiVersion>1)return(0,c.createElement)(ha,{...e,context:l});const i=(0,a.hasBlockSupport)(o,"className",!0)?(0,a.getBlockDefaultClassName)(n):null,s=d()(i,t.className,e.className);return(0,c.createElement)(ha,{...e,context:l,className:s})};function va(e){const{name:t,isSelected:n,clientId:o,attributes:r={},__unstableLayoutClassNames:l}=e,{layout:i=null}=r,s={name:t,isSelected:n,clientId:o,layout:(0,a.hasBlockSupport)(t,"layout",!1)||(0,a.hasBlockSupport)(t,"__experimentalLayout",!1)?i:null,__unstableLayoutClassNames:l};return(0,c.createElement)(or,{value:(0,c.useMemo)((()=>s),Object.values(s))},(0,c.createElement)(ba,{...e}))}var _a=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));var ka=function({className:e,actions:t,children:n,secondaryActions:o}){return(0,c.createElement)("div",{style:{display:"contents",all:"initial"}},(0,c.createElement)("div",{className:d()(e,"block-editor-warning")},(0,c.createElement)("div",{className:"block-editor-warning__contents"},(0,c.createElement)("p",{className:"block-editor-warning__message"},n),(c.Children.count(t)>0||o)&&(0,c.createElement)("div",{className:"block-editor-warning__actions"},c.Children.count(t)>0&&c.Children.map(t,((e,t)=>(0,c.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,c.createElement)(m.DropdownMenu,{className:"block-editor-warning__secondary",icon:_a,label:(0,v.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,c.createElement)(m.MenuGroup,null,o.map(((e,t)=>(0,c.createElement)(m.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))},ya=n(1973);function Ea({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:l}){return(0,c.createElement)("div",{className:l},(0,c.createElement)("div",{className:"block-editor-block-compare__content"},(0,c.createElement)("h2",{className:"block-editor-block-compare__heading"},e),(0,c.createElement)("div",{className:"block-editor-block-compare__html"},t),(0,c.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,c.createElement)(c.RawHTML,null,(0,da.safeHTML)(n)))),(0,c.createElement)("div",{className:"block-editor-block-compare__action"},(0,c.createElement)(m.Button,{variant:"secondary",tabIndex:"0",onClick:o},r)))}var Sa=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const l=(i=o(e),(Array.isArray(i)?i:[i]).map((e=>(0,a.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var i;const s=(u=e.originalContent,p=l,(0,ya.Kx)(u,p).map(((e,t)=>{const n=d()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,c.createElement)("span",{key:t,className:n},e.value)})));var u,p;return(0,c.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,c.createElement)(Ea,{title:(0,v.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,v.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,c.createElement)(Ea,{title:(0,v.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:s,renderedContent:l}))};const wa=e=>(0,a.rawHandler)({HTML:e.originalContent});function Ca({clientId:e}){const{block:t,canInsertHTMLBlock:n,canInsertClassicBlock:o}=(0,f.useSelect)((t=>{const{canInsertBlockType:n,getBlock:o,getBlockRootClientId:r}=t(Jo),l=r(e);return{block:o(e),canInsertHTMLBlock:n("core/html",l),canInsertClassicBlock:n("core/freeform",l)}}),[e]),{replaceBlock:r}=(0,f.useDispatch)(Jo),[l,i]=(0,c.useState)(!1),s=(0,c.useCallback)((()=>i(!1)),[]),u=(0,c.useMemo)((()=>({toClassic(){const e=(0,a.createBlock)("core/freeform",{content:t.originalContent});return r(t.clientId,e)},toHTML(){const e=(0,a.createBlock)("core/html",{content:t.originalContent});return r(t.clientId,e)},toBlocks(){const e=wa(t);return r(t.clientId,e)},toRecoveredBlock(){const e=(0,a.createBlock)(t.name,t.attributes,t.innerBlocks);return r(t.clientId,e)}})),[t,r]),d=(0,c.useMemo)((()=>[{title:(0,v._x)("Resolve","imperative verb"),onClick:()=>i(!0)},n&&{title:(0,v.__)("Convert to HTML"),onClick:u.toHTML},o&&{title:(0,v.__)("Convert to Classic Block"),onClick:u.toClassic}].filter(Boolean)),[n,o,u]);return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(ka,{actions:[(0,c.createElement)(m.Button,{key:"recover",onClick:u.toRecoveredBlock,variant:"primary"},(0,v.__)("Attempt Block Recovery"))],secondaryActions:d},(0,v.__)("This block contains unexpected or invalid content.")),l&&(0,c.createElement)(m.Modal,{title:(0,v.__)("Resolve Block"),onRequestClose:s,className:"block-editor-block-compare"},(0,c.createElement)(Sa,{block:t,onKeep:u.toHTML,onConvert:u.toBlocks,convertor:wa,convertButtonText:(0,v.__)("Convert to Blocks")})))}const xa=(0,c.createElement)(ka,{className:"block-editor-block-list__block-crash-warning"},(0,v.__)("This block has encountered an error and cannot be previewed."));var Ba=()=>xa;class Ia extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var Ta=Ia,Ma=n(773);var Pa=function({clientId:e}){const[t,n]=(0,c.useState)(""),o=(0,f.useSelect)((t=>t(Jo).getBlock(e)),[e]),{updateBlock:r}=(0,f.useDispatch)(Jo);return(0,c.useEffect)((()=>{n((0,a.getBlockContent)(o))}),[o]),(0,c.createElement)(Ma.Z,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const l=(0,a.getBlockType)(o.name);if(!l)return;const i=(0,a.getBlockAttributes)(l,t,o.attributes),s=t||(0,a.getSaveContent)(l,i),[c]=t?(0,a.validateBlock)({...o,attributes:i,originalContent:s}):[!0];r(e,{attributes:i,originalContent:s,isValid:c}),t||n(s)},onChange:e=>n(e.target.value)})},Na=qa(),La=e=>$a(e,Na),Ra=qa();La.write=e=>$a(e,Ra);var Aa=qa();La.onStart=e=>$a(e,Aa);var Da=qa();La.onFrame=e=>$a(e,Da);var Oa=qa();La.onFinish=e=>$a(e,Oa);var za=[];La.setTimeout=(e,t)=>{let n=La.now()+t,o=()=>{let e=za.findIndex((e=>e.cancel==o));~e&&za.splice(e,1),Ga-=~e?1:0},r={time:n,handler:e,cancel:o};return za.splice(Va(n),0,r),Ga+=1,ja(),r};var Va=e=>~(~za.findIndex((t=>t.time>e))||~za.length);La.cancel=e=>{Aa.delete(e),Da.delete(e),Oa.delete(e),Na.delete(e),Ra.delete(e)},La.sync=e=>{Ua=!0,La.batchedUpdates(e),Ua=!1},La.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,La.onStart(n)}return o.handler=e,o.cancel=()=>{Aa.delete(n),t=null},o};var Fa=typeof window<"u"?window.requestAnimationFrame:()=>{};La.use=e=>Fa=e,La.now=typeof performance<"u"?()=>performance.now():Date.now,La.batchedUpdates=e=>e(),La.catch=console.error,La.frameLoop="always",La.advance=()=>{"demand"!==La.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Ka()};var Ha=-1,Ga=0,Ua=!1;function $a(e,t){Ua?(t.delete(e),e(0)):(t.add(e),ja())}function ja(){Ha<0&&(Ha=0,"demand"!==La.frameLoop&&Fa(Wa))}function Wa(){~Ha&&(Fa(Wa),La.batchedUpdates(Ka))}function Ka(){let e=Ha;Ha=La.now();let t=Va(Ha);t&&(Za(za.splice(0,t),(e=>e.handler())),Ga-=t),Ga?(Aa.flush(),Na.flush(e?Math.min(64,Ha-e):16.667),Da.flush(),Ra.flush(),Oa.flush()):Ha=-1}function qa(){let e=new Set,t=e;return{add(n){Ga+=t!=e||e.has(n)?0:1,e.add(n)},delete(n){return Ga-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Ga-=t.size,Za(t,(t=>t(n)&&e.add(t))),Ga+=e.size,t=e)}}}function Za(e,t){e.forEach((e=>{try{t(e)}catch(e){La.catch(e)}}))}var Ya=n(9196),Xa=n.n(Ya),Qa=Object.defineProperty,Ja={};function es(){}((e,t)=>{for(var n in t)Qa(e,n,{get:t[n],enumerable:!0})})(Ja,{assign:()=>fs,colors:()=>ds,createStringInterpolator:()=>as,skipAnimation:()=>ps,to:()=>ss,willAdvance:()=>ms});var ts={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function ns(e,t){if(ts.arr(e)){if(!ts.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function rs(e,t,n){if(ts.arr(e))for(let o=0;ots.und(e)?[]:ts.arr(e)?e:[e];function is(e,t){if(e.size){let n=Array.from(e);e.clear(),os(n,t)}}var as,ss,cs=(e,...t)=>is(e,(e=>e(...t))),us=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ds=null,ps=!1,ms=es,fs=e=>{e.to&&(ss=e.to),e.now&&(La.now=e.now),void 0!==e.colors&&(ds=e.colors),null!=e.skipAnimation&&(ps=e.skipAnimation),e.createStringInterpolator&&(as=e.createStringInterpolator),e.requestAnimationFrame&&La.use(e.requestAnimationFrame),e.batchedUpdates&&(La.batchedUpdates=e.batchedUpdates),e.willAdvance&&(ms=e.willAdvance),e.frameLoop&&(La.frameLoop=e.frameLoop)},gs=new Set,hs=[],bs=[],vs=0,_s={get idle(){return!gs.size&&!hs.length},start(e){vs>e.priority?(gs.add(e),La.onStart(ks)):(ys(e),La(Ss))},advance:Ss,sort(e){if(vs)La.onFrame((()=>_s.sort(e)));else{let t=hs.indexOf(e);~t&&(hs.splice(t,1),Es(e))}},clear(){hs=[],gs.clear()}};function ks(){gs.forEach(ys),gs.clear(),La(Ss)}function ys(e){hs.includes(e)||Es(e)}function Es(e){hs.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(hs,(t=>t.priority>e.priority)),0,e)}function Ss(e){let t=bs;for(let n=0;n0}var ws="[-+]?\\d*\\.?\\d+",Cs=ws+"%";function xs(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Bs=new RegExp("rgb"+xs(ws,ws,ws)),Is=new RegExp("rgba"+xs(ws,ws,ws,ws)),Ts=new RegExp("hsl"+xs(ws,Cs,Cs)),Ms=new RegExp("hsla"+xs(ws,Cs,Cs,ws)),Ps=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ns=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ls=/^#([0-9a-fA-F]{6})$/,Rs=/^#([0-9a-fA-F]{8})$/;function As(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 Ds(e,t,n){let o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=As(r,o,e+1/3),i=As(r,o,e),a=As(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function Os(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function zs(e){return(parseFloat(e)%360+360)%360/360}function Vs(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Fs(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Hs(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Ls.exec(e))?parseInt(t[1]+"ff",16)>>>0:ds&&void 0!==ds[e]?ds[e]:(t=Bs.exec(e))?(Os(t[1])<<24|Os(t[2])<<16|Os(t[3])<<8|255)>>>0:(t=Is.exec(e))?(Os(t[1])<<24|Os(t[2])<<16|Os(t[3])<<8|Vs(t[4]))>>>0:(t=Ps.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Rs.exec(e))?parseInt(t[1],16)>>>0:(t=Ns.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Ts.exec(e))?(255|Ds(zs(t[1]),Fs(t[2]),Fs(t[3])))>>>0:(t=Ms.exec(e))?(Ds(zs(t[1]),Fs(t[2]),Fs(t[3]))|Vs(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var Gs=(e,t,n)=>{if(ts.fun(e))return e;if(ts.arr(e))return Gs({range:e,output:t,extrapolate:n});if(ts.str(e.output[0]))return as(e);let o=e,r=o.output,l=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",a=o.extrapolateRight||o.extrapolate||"extend",s=o.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,l);return function(e,t,n,o,r,l,i,a,s){let c=s?s(e):e;if(cn){if("identity"===a)return c;"clamp"===a&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=l(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,l[t],l[t+1],r[t],r[t+1],s,i,a,o.map)}};var Us=1.70158,$s=1.525*Us,js=Us+1,Ws=2*Math.PI/3,Ks=2*Math.PI/4.5,qs=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Zs={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>js*e*e*e-Us*e*e,easeOutBack:e=>1+js*Math.pow(e-1,3)+Us*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*($s+1)*e-$s)/2:(Math.pow(2*e-2,2)*(($s+1)*(2*e-2)+$s)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*Ws),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*Ws)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Ks)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Ks)/2+1,easeInBounce:e=>1-qs(1-e),easeOutBounce:qs,easeInOutBounce:e=>e<.5?(1-qs(1-2*e))/2:(1+qs(2*e-1))/2,steps:(e,t="end")=>n=>{let o=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(o):Math.ceil(o))/e)}},Ys=Symbol.for("FluidValue.get"),Xs=Symbol.for("FluidValue.observers"),Qs=e=>Boolean(e&&e[Ys]),Js=e=>e&&e[Ys]?e[Ys]():e,ec=e=>e[Xs]||null;function tc(e,t){let n=e[Xs];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var nc=class{[Ys];[Xs];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");oc(this,e)}},oc=(e,t)=>ac(e,Ys,t);function rc(e,t){if(e[Ys]){let n=e[Xs];n||ac(e,Xs,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function lc(e,t){let n=e[Xs];if(n&&n.has(t)){let o=n.size-1;o?n.delete(t):e[Xs]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var ic,ac=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),sc=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,cc=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,uc=new RegExp(`(${sc.source})(%|[a-z]+)`,"i"),dc=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,pc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,mc=e=>{let[t,n]=fc(e);if(!t||us())return e;let o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&pc.test(n)?mc(n):n||e},fc=e=>{let t=pc.exec(e);if(!t)return[,];let[,n,o]=t;return[n,o]},gc=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,hc=e=>{ic||(ic=ds?new RegExp(`(${Object.keys(ds).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>Js(e).replace(pc,mc).replace(cc,Hs).replace(ic,Hs))),n=t.map((e=>e.match(sc).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Gs({...e,output:t})));return e=>{let n=!uc.test(t[0])&&t.find((e=>uc.test(e)))?.replace(sc,""),r=0;return t[0].replace(sc,(()=>`${o[r++](e)}${n||""}`)).replace(dc,gc)}},bc="react-spring: ",vc=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${bc}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},_c=vc(console.warn);var kc=vc(console.warn);function yc(e){return ts.str(e)&&("#"==e[0]||/\d/.test(e)||!us()&&pc.test(e)||e in(ds||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var Ec=us()?Ya.useEffect:Ya.useLayoutEffect,Sc=()=>{let e=(0,Ya.useRef)(!1);return Ec((()=>(e.current=!0,()=>{e.current=!1})),[]),e};function wc(){let e=(0,Ya.useState)()[1],t=Sc();return()=>{t.current&&e(Math.random())}}var Cc=e=>(0,Ya.useEffect)(e,xc),xc=[];function Bc(e){let t=(0,Ya.useRef)();return(0,Ya.useEffect)((()=>{t.current=e})),t.current}var Ic=Symbol.for("Animated:node"),Tc=e=>e&&e[Ic],Mc=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,Ic,t),Pc=e=>e&&e[Ic]&&e[Ic].getPayload(),Nc=class{payload;constructor(){Mc(this,this)}getPayload(){return this.payload||[]}},Lc=class extends Nc{constructor(e){super(),this._value=e,ts.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new Lc(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return ts.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,ts.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Rc=class extends Lc{_string=null;_toString;constructor(e){super(0),this._toString=Gs({output:[e,e]})}static create(e){return new Rc(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(ts.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=Gs({output:[this.getValue(),e]})),this._value=0,super.reset()}},Ac={dependencies:null},Dc=class extends Nc{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return rs(this.source,((n,o)=>{(e=>!!e&&e[Ic]===e)(n)?t[o]=n.getValue(e):Qs(n)?t[o]=Js(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&os(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return rs(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ac.dependencies&&Qs(e)&&Ac.dependencies.add(e);let t=Pc(e);t&&os(t,(e=>this.add(e)))}},Oc=class extends Dc{constructor(e){super(e)}static create(e){return new Oc(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(zc)),!0)}};function zc(e){return(yc(e)?Rc:Lc).create(e)}function Vc(e){let t=Tc(e);return t?t.constructor:ts.arr(e)?Oc:yc(e)?Rc:Lc}var Fc=(e,t)=>{let n=!ts.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Ya.forwardRef)(((o,r)=>{let l=(0,Ya.useRef)(null),i=n&&(0,Ya.useCallback)((e=>{l.current=function(e,t){return e&&(ts.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[a,s]=function(e,t){let n=new Set;return Ac.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Dc(e),Ac.dependencies=null,[e,n]}(o,t),c=wc(),u=()=>{let e=l.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&c()},d=new Hc(u,s),p=(0,Ya.useRef)();Ec((()=>(p.current=d,os(s,(e=>rc(e,d))),()=>{p.current&&(os(p.current.deps,(e=>lc(e,p.current))),La.cancel(p.current.update))}))),(0,Ya.useEffect)(u,[]),Cc((()=>()=>{let e=p.current;os(e.deps,(t=>lc(t,e)))}));let m=t.getComponentProps(a.getValue());return Ya.createElement(e,{...m,ref:i})}))},Hc=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&La.write(this.update)}};var Gc=Symbol.for("AnimatedComponent"),Uc=e=>ts.str(e)?e:e&&ts.str(e.displayName)?e.displayName:ts.fun(e)&&e.name||null;function $c(e,...t){return ts.fun(e)?e(...t):e}var jc=(e,t)=>!0===e||!!(t&&e&&(ts.fun(e)?e(t):ls(e).includes(t))),Wc=(e,t)=>ts.obj(e)?t&&e[t]:e,Kc=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,qc=e=>e,Zc=(e,t=qc)=>{let n=Yc;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let o={};for(let r of n){let n=t(e[r],r);ts.und(n)||(o[r]=n)}return o},Yc=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Xc={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Qc(e){let t=function(e){let t={},n=0;if(rs(e,((e,o)=>{Xc[o]||(t[o]=e,n++)})),n)return t}(e);if(t){let n={to:t};return rs(e,((e,o)=>o in t||(n[o]=e))),n}return{...e}}function Jc(e){return e=Js(e),ts.arr(e)?e.map(Jc):yc(e)?Ja.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function eu(e){for(let t in e)return!0;return!1}function tu(e){return ts.fun(e)||ts.arr(e)&&ts.obj(e[0])}function nu(e,t){e.ref?.delete(e),t?.delete(e)}function ou(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var ru={tension:170,friction:26,mass:1,damping:1,easing:Zs.linear,clamp:!1};function lu(e,t){if(ts.und(t.decay)){let n=!ts.und(t.tension)||!ts.und(t.friction);(n||!ts.und(t.frequency)||!ts.und(t.damping)||!ts.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var iu=[];function au(e,{key:t,props:n,defaultProps:o,state:r,actions:l}){return new Promise(((i,a)=>{let s,c,u=jc(n.cancel??o?.cancel,t);if(u)m();else{ts.und(n.pause)||(r.paused=jc(n.pause,t));let e=o?.pause;!0!==e&&(e=r.paused||jc(e,t)),s=$c(n.delay||0,t),e?(r.resumeQueue.add(p),l.pause()):(l.resume(),p())}function d(){r.resumeQueue.add(p),r.timeouts.delete(c),c.cancel(),s=c.time-La.now()}function p(){s>0&&!Ja.skipAnimation?(r.delayed=!0,c=La.setTimeout(m,s),r.pauseQueue.add(d),r.timeouts.add(c)):m()}function m(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(d),r.timeouts.delete(c),e<=(r.cancelId||0)&&(u=!0);try{l.start({...n,callId:e,cancel:u},i)}catch(e){a(e)}}}))}var su=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?du(e.get()):t.every((e=>e.noop))?cu(e.get()):uu(e.get(),t.every((e=>e.finished))),cu=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),uu=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),du=e=>({value:e,cancelled:!0,finished:!1});function pu(e,t,n,o){let{callId:r,parentId:l,onRest:i}=t,{asyncTo:a,promise:s}=n;return l||e!==a||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;let c,u,d,p=Zc(t,((e,t)=>"onRest"===t?void 0:e)),m=new Promise(((e,t)=>(c=e,u=t))),f=e=>{let t=r<=(n.cancelId||0)&&du(o)||r!==n.asyncId&&uu(o,!1);if(t)throw e.result=t,u(e),e},g=(e,t)=>{let l=new fu,i=new gu;return(async()=>{if(Ja.skipAnimation)throw mu(n),i.result=uu(o,!1),u(i),i;f(l);let a=ts.obj(e)?{...e}:{...t,to:e};a.parentId=r,rs(p,((e,t)=>{ts.und(a[t])&&(a[t]=e)}));let s=await o.start(a);return f(l),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};if(Ja.skipAnimation)return mu(n),uu(o,!1);try{let t;t=ts.arr(e)?(async e=>{for(let t of e)await g(t)})(e):Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([t.then(c),m]),d=uu(o.get(),!0,!1)}catch(e){if(e instanceof fu)d=e.result;else{if(!(e instanceof gu))throw e;d=e.result}}finally{r==n.asyncId&&(n.asyncId=l,n.asyncTo=l?a:void 0,n.promise=l?s:void 0)}return ts.fun(i)&&La.batchedUpdates((()=>{i(d,o,o.item)})),d})():s}function mu(e,t){is(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var fu=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},gu=class extends Error{result;constructor(){super("SkipAnimationSignal")}},hu=e=>e instanceof vu,bu=1,vu=class extends nc{id=bu++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=Tc(this);return e&&e.getValue()}to(...e){return Ja.to(this,e)}interpolate(...e){return _c(`${bc}The "interpolate" function is deprecated in v9 (use "to" instead)`),Ja.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){tc(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||_s.sort(this),tc(this,{type:"priority",parent:this,priority:e})}},_u=Symbol.for("SpringPhase"),ku=e=>(1&e[_u])>0,yu=e=>(2&e[_u])>0,Eu=e=>(4&e[_u])>0,Su=(e,t)=>t?e[_u]|=3:e[_u]&=-3,wu=(e,t)=>t?e[_u]|=4:e[_u]&=-5,Cu=class extends vu{key;animation=new class{changed=!1;values=iu;toValues=null;fromValues=iu;to;from;config=new class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,ru)}};immediate=!1};queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!ts.und(e)||!ts.und(t)){let n=ts.obj(e)?{...e}:{...t,from:e};ts.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(yu(this)||this._state.asyncTo)||Eu(this)}get goal(){return Js(this.animation.to)}get velocity(){let e=Tc(this);return e instanceof Lc?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return ku(this)}get isAnimating(){return yu(this)}get isPaused(){return Eu(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,o=this.animation,{config:r,toValues:l}=o,i=Pc(o.to);!i&&Qs(o.to)&&(l=ls(Js(o.to))),o.values.forEach(((a,s)=>{if(a.done)return;let c=a.constructor==Rc?1:i?i[s].lastPosition:l[s],u=o.immediate,d=c;if(!u){if(d=a.lastPosition,r.tension<=0)return void(a.done=!0);let t,n=a.elapsedTime+=e,l=o.fromValues[s],i=null!=a.v0?a.v0:a.v0=ts.arr(r.velocity)?r.velocity[s]:r.velocity,p=r.precision||(l==c?.005:Math.min(1,.001*Math.abs(c-l)));if(ts.und(r.duration))if(r.decay){let e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*n);d=l+i/(1-e)*(1-o),u=Math.abs(a.lastPosition-d)<=p,t=i*o}else{t=null==a.lastVelocity?i:a.lastVelocity;let n,o=r.restVelocity||p/10,s=r.clamp?0:r.bounce,m=!ts.und(s),f=l==c?a.v0>0:lo,n||(u=Math.abs(c-d)<=p,!u));++e){m&&(g=d==c||d>c==f,g&&(t=-t*s,d=c)),t+=(1e-6*-r.tension*(d-c)+.001*-r.friction*t)/r.mass*h,d+=t*h}}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,a.durationProgress>0&&(a.elapsedTime=r.duration*a.durationProgress,n=a.elapsedTime+=e)),o=(r.progress||0)+n/this._memoizedDuration,o=o>1?1:o<0?0:o,a.durationProgress=o),d=l+r.easing(o)*(c-l),t=(d-a.lastPosition)/e,u=1==o}a.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[s].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(d,r.round)&&(n=!0)}));let a=Tc(this),s=a.getValue();if(t){let e=Js(o.to);s===e&&!n||r.decay?n&&r.decay&&this._onChange(s):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return La.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(yu(this)){let{to:e,config:t}=this.animation;La.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return ts.und(e)?(n=this.queue||[],this.queue=[]):n=[ts.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>su(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),mu(this._state,e&&this._lastCallId),La.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:o}=e;n=ts.obj(n)?n[t]:n,(null==n||tu(n))&&(n=void 0),o=ts.obj(o)?o[t]:o,null==o&&(o=void 0);let r={to:n,from:o};return ku(this)||(e.reverse&&([n,o]=[o,n]),o=Js(o),ts.und(o)?Tc(this)||this._set(n):this._set(o)),r}_update({...e},t){let{key:n,defaultProps:o}=this;e.default&&Object.assign(o,Zc(e,((e,t)=>/^on/.test(t)?Wc(e,n):e))),Nu(this,e,"onProps"),Lu(this,"onProps",e,this);let r=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let l=this._state;return au(++this._lastCallId,{key:n,props:e,defaultProps:o,state:l,actions:{pause:()=>{Eu(this)||(wu(this,!0),cs(l.pauseQueue),Lu(this,"onPause",uu(this,xu(this,this.animation.to)),this))},resume:()=>{Eu(this)&&(wu(this,!1),yu(this)&&this._resume(),cs(l.resumeQueue),Lu(this,"onResume",uu(this,xu(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=Bu(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(du(this));let o=!ts.und(e.to),r=!ts.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(du(this));this._lastToId=t.callId}let{key:l,defaultProps:i,animation:a}=this,{to:s,from:c}=a,{to:u=s,from:d=c}=e;r&&!o&&(!t.default||ts.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let p=!ns(d,c);p&&(a.from=d),d=Js(d);let m=!ns(u,s);m&&this._focus(u);let f=tu(t.to),{config:g}=a,{decay:h,velocity:b}=g;(o||r)&&(g.velocity=0),t.config&&!f&&function(e,t,n){n&&(lu(n={...n},t),t={...n,...t}),lu(e,t),Object.assign(e,t);for(let t in ru)null==e[t]&&(e[t]=ru[t]);let{mass:o,frequency:r,damping:l}=e;ts.und(r)||(r<.01&&(r=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*l*o/r)}(g,$c(t.config,l),t.config!==i.config?$c(i.config,l):void 0);let v=Tc(this);if(!v||ts.und(u))return n(uu(this,!0));let _=ts.und(t.reset)?r&&!t.default:!ts.und(d)&&jc(t.reset,l),k=_?d:this.get(),y=Jc(u),E=ts.num(y)||ts.arr(y)||yc(y),S=!f&&(!E||jc(i.immediate||t.immediate,l));if(m){let e=Vc(u);if(e!==v.constructor){if(!S)throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`);v=this._set(y)}}let w=v.constructor,C=Qs(u),x=!1;if(!C){let e=_||!ku(this)&&p;(m||e)&&(x=ns(Jc(k),y),C=!x),(!ns(a.immediate,S)&&!S||!ns(g.decay,h)||!ns(g.velocity,b))&&(C=!0)}if(x&&yu(this)&&(a.changed&&!_?C=!0:C||this._stop(s)),!f&&((C||Qs(s))&&(a.values=v.getPayload(),a.toValues=Qs(u)?null:w==Rc?[1]:ls(y)),a.immediate!=S&&(a.immediate=S,!S&&!_&&this._set(s)),C)){let{onRest:e}=a;os(Pu,(e=>Nu(this,t,e)));let o=uu(this,xu(this,s));cs(this._pendingCalls,o),this._pendingCalls.add(n),a.changed&&La.batchedUpdates((()=>{a.changed=!_,e?.(o,this),_?$c(i.onRest,o):a.onStart?.(o,this)}))}_&&this._set(k),f?n(pu(t.to,t,this._state,this)):C?this._start():yu(this)&&!m?this._pendingCalls.add(n):n(cu(k))}_focus(e){let t=this.animation;e!==t.to&&(ec(this)&&this._detach(),t.to=e,ec(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Qs(t)&&(rc(t,this),hu(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Qs(e)&&lc(e,this)}_set(e,t=!0){let n=Js(e);if(!ts.und(n)){let e=Tc(this);if(!e||!ns(n,e.getValue())){let o=Vc(n);e&&e.constructor==o?e.setValue(n):Mc(this,o.create(n)),e&&La.batchedUpdates((()=>{this._onChange(n,t)}))}}return Tc(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,Lu(this,"onStart",uu(this,xu(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),$c(this.animation.onChange,e,this)),$c(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;Tc(this).reset(Js(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),yu(this)||(Su(this,!0),Eu(this)||this._resume())}_resume(){Ja.skipAnimation?this.finish():_s.start(this)}_stop(e,t){if(yu(this)){Su(this,!1);let n=this.animation;os(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),tc(this,{type:"idle",parent:this});let o=t?du(this.get()):uu(this.get(),xu(this,e??n.to));cs(this._pendingCalls,o),n.changed&&(n.changed=!1,Lu(this,"onRest",o,this))}}};function xu(e,t){let n=Jc(t);return ns(Jc(e.get()),n)}function Bu(e,t=e.loop,n=e.to){let o=$c(t);if(o){let r=!0!==o&&Qc(o),l=(r||e).reverse,i=!r||r.reset;return Iu({...e,loop:t,default:!1,pause:void 0,to:!l||tu(n)?n:void 0,from:i?e.from:void 0,reset:i,...r})}}function Iu(e){let{to:t,from:n}=e=Qc(e),o=new Set;return ts.obj(t)&&Mu(t,o),ts.obj(n)&&Mu(n,o),e.keys=o.size?Array.from(o):null,e}function Tu(e){let t=Iu(e);return ts.und(t.default)&&(t.default=Zc(t)),t}function Mu(e,t){rs(e,((e,n)=>null!=e&&t.add(n)))}var Pu=["onStart","onRest","onChange","onPause","onResume"];function Nu(e,t,n){e.animation[n]=t[n]!==Kc(t,n)?Wc(t[n],e.key):void 0}function Lu(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Ru=["onStart","onChange","onRest"],Au=1,Du=class{id=Au++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];ts.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Iu(e)),this}start(e){let{queue:t}=this;return e?t=ls(e).map(Iu):this.queue=[],this._flush?this._flush(this,t):(Uu(this,t),Ou(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;os(ls(t),(t=>n[t].stop(!!e)))}else mu(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(ts.und(e))this.start({pause:!0});else{let t=this.springs;os(ls(e),(e=>t[e].pause()))}return this}resume(e){if(ts.und(e))this.start({pause:!1});else{let t=this.springs;os(ls(e),(e=>t[e].resume()))}return this}each(e){rs(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,is(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let l=!o&&this._started,i=r||l&&n.size?this.get():null;r&&t.size&&is(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),l&&(this._started=!1,is(n,(([e,t])=>{t.value=i,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}La.onFrame(this._onFrame)}};function Ou(e,t){return Promise.all(t.map((t=>zu(e,t)))).then((t=>su(e,t)))}async function zu(e,t,n){let{keys:o,to:r,from:l,loop:i,onRest:a,onResolve:s}=t,c=ts.obj(t.default)&&t.default;i&&(t.loop=!1),!1===r&&(t.to=null),!1===l&&(t.from=null);let u=ts.arr(r)||ts.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):os(Ru,(n=>{let o=t[n];if(ts.fun(o)){let r=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,cs(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===Kc(t,"cancel");(u||m&&d.asyncId)&&p.push(au(++e._lastAsyncId,{props:t,state:d,actions:{pause:es,resume:es,start(t,n){m?(mu(d,e._lastAsyncId),n(du(e))):(t.onRest=a,n(pu(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let f=su(e,await Promise.all(p));if(i&&f.finished&&(!n||!f.noop)){let n=Bu(t,i,r);if(n)return Uu(e,[n]),zu(e,n,!0)}return s&&La.batchedUpdates((()=>s(f,e,e.item))),f}function Vu(e,t){let n={...e.springs};return t&&os(ls(t),(e=>{ts.und(e.keys)&&(e=Iu(e)),ts.obj(e.to)||(e={...e,to:void 0}),Gu(n,e,(e=>Hu(e)))})),Fu(e,n),n}function Fu(e,t){rs(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,rc(t,e))}))}function Hu(e,t){let n=new Cu;return n.key=e,t&&rc(n,t),n}function Gu(e,t,n){t.keys&&os(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function Uu(e,t){os(t,(t=>{Gu(e.springs,t,(t=>Hu(t,e)))}))}var $u=({children:e,...t})=>{let n=(0,Ya.useContext)(ju),o=t.pause||!!n.pause,r=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,Ya.useState)((()=>({inputs:t,result:e()}))),o=(0,Ya.useRef)(),r=o.current,l=r;return l?Boolean(t&&l.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{o.current=l,r==n&&(n.inputs=n.result=void 0)}),[l]),l.result}((()=>({pause:o,immediate:r})),[o,r]);let{Provider:l}=ju;return Ya.createElement(l,{value:t},e)},ju=function(e,t){return Object.assign(e,Ya.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}($u,{});$u.Provider=ju.Provider,$u.Consumer=ju.Consumer;var Wu=()=>{let e=[],t=function(t){kc(`${bc}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);let o=[];return os(e,((e,r)=>{if(ts.und(t))o.push(e.start());else{let l=n(t,e,r);l&&o.push(e.start(l))}})),o};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return os(e,(e=>e.pause(...arguments))),this},t.resume=function(){return os(e,(e=>e.resume(...arguments))),this},t.set=function(t){os(e,((e,n)=>{let o=ts.fun(t)?t(n,e):t;o&&e.set(o)}))},t.start=function(t){let n=[];return os(e,((e,o)=>{if(ts.und(t))n.push(e.start());else{let r=this._getProps(t,e,o);r&&n.push(e.start(r))}})),n},t.stop=function(){return os(e,(e=>e.stop(...arguments))),this},t.update=function(t){return os(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};let n=function(e,t,n){return ts.fun(e)?e(n,t):e};return t._getProps=n,t};function Ku(e,t,n){let o=ts.fun(t)&&t;o&&!n&&(n=[]);let r=(0,Ya.useMemo)((()=>o||3==arguments.length?Wu():void 0),[]),l=(0,Ya.useRef)(0),i=wc(),a=(0,Ya.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){let n=Vu(e,t);return l.current>0&&!a.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?Ou(e,t):new Promise((o=>{Fu(e,n),a.queue.push((()=>{o(Ou(e,t))})),i()}))}})),[]),s=(0,Ya.useRef)([...a.ctrls]),c=[],u=Bc(e)||0;function d(e,n){for(let r=e;r{os(s.current.slice(e,u),(e=>{nu(e,r),e.stop(!0)})),s.current.length=e,d(u,e)}),[e]),(0,Ya.useMemo)((()=>{d(0,Math.min(u,e))}),n);let p=s.current.map(((e,t)=>Vu(e,c[t]))),m=(0,Ya.useContext)($u),f=Bc(m),g=m!==f&&eu(m);Ec((()=>{l.current++,a.ctrls=s.current;let{queue:e}=a;e.length&&(a.queue=[],os(e,(e=>e()))),os(s.current,((e,t)=>{r?.add(e),g&&e.start({default:m});let n=c[t];n&&(ou(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),Cc((()=>()=>{os(a.ctrls,(e=>e.stop(!0)))}));let h=p.map((e=>({...e})));return r?[h,r]:h}function qu(e,t){let n=ts.fun(e),[[o],r]=Ku(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[o,r]:o}var Zu=class extends vu{constructor(e,t){super(),this.source=e,this.calc=Gs(...t);let n=this._get(),o=Vc(n);Mc(this,o.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();ns(t,this.get())||(Tc(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Xu(this._active)&&Qu(this)}_get(){let e=ts.arr(this.source)?this.source.map(Js):ls(Js(this.source));return this.calc(...e)}_start(){this.idle&&!Xu(this._active)&&(this.idle=!1,os(Pc(this),(e=>{e.done=!1})),Ja.skipAnimation?(La.batchedUpdates((()=>this.advance())),Qu(this)):_s.start(this))}_attach(){let e=1;os(ls(this.source),(t=>{Qs(t)&&rc(t,this),hu(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){os(ls(this.source),(e=>{Qs(e)&&lc(e,this)})),this._active.clear(),Qu(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=ls(this.source).reduce(((e,t)=>Math.max(e,(hu(t)?t.priority:0)+1)),0))}};function Yu(e){return!1!==e.idle}function Xu(e){return!e.size||Array.from(e).every(Yu)}function Qu(e){e.idle||(e.idle=!0,os(Pc(e),(e=>{e.done=!0})),tc(e,{type:"idle",parent:e}))}Ja.assign({createStringInterpolator:hc,to:(e,t)=>new Zu(e,t)});_s.advance;var Ju=window.ReactDOM,ed=/^--/;function td(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||ed.test(e)||od.hasOwnProperty(e)&&od[e]?(""+t).trim():t+"px"}var nd={};var od={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},rd=["Webkit","Ms","Moz","O"];od=Object.keys(od).reduce(((e,t)=>(rd.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),od);var ld=/^(matrix|translate|scale|rotate|skew)/,id=/^(translate)/,ad=/^(rotate|skew)/,sd=(e,t)=>ts.num(e)&&0!==e?e+t:e,cd=(e,t)=>ts.arr(e)?e.every((e=>cd(e,t))):ts.num(e)?e===t:parseFloat(e)===t,ud=class extends Dc{constructor({x:e,y:t,z:n,...o}){let r=[],l=[];(e||t||n)&&(r.push([e||0,t||0,n||0]),l.push((e=>[`translate3d(${e.map((e=>sd(e,"px"))).join(",")})`,cd(e,0)]))),rs(o,((e,t)=>{if("transform"===t)r.push([e||""]),l.push((e=>[e,""===e]));else if(ld.test(t)){if(delete o[t],ts.und(e))return;let n=id.test(t)?"px":ad.test(t)?"deg":"";r.push(ls(e)),l.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${sd(r,n)})`,cd(r,0)]:e=>[`${t}(${e.map((e=>sd(e,n))).join(",")})`,cd(e,t.startsWith("scale")?1:0)])}})),r.length&&(o.transform=new dd(r,l)),super(o)}},dd=class extends nc{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return os(this.inputs,((n,o)=>{let r=Js(n[0]),[l,i]=this.transforms[o](ts.arr(r)?r:n.map(Js));e+=" "+l,t=t&&i})),t?"none":e}observerAdded(e){1==e&&os(this.inputs,(e=>os(e,(e=>Qs(e)&&rc(e,this)))))}observerRemoved(e){0==e&&os(this.inputs,(e=>os(e,(e=>Qs(e)&&lc(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),tc(this,e)}};Ja.assign({batchedUpdates:Ju.unstable_batchedUpdates,createStringInterpolator:hc,colors:{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}});var pd=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new Dc(e)),getComponentProps:o=(e=>e)}={})=>{let r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},l=e=>{let t=Uc(e)||"Anonymous";return(e=ts.str(e)?l[e]||(l[e]=Fc(e,r)):e[Gc]||(e[Gc]=Fc(e,r))).displayName=`Animated(${t})`,e};return rs(e,((t,n)=>{ts.arr(e)&&(n=Uc(t)),l[n]=l(t)})),{animated:l}})(["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"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:o,children:r,scrollTop:l,scrollLeft:i,viewBox:a,...s}=t,c=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:nd[t]||(nd[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==r&&(e.textContent=r);for(let t in o)if(o.hasOwnProperty(t)){let n=td(t,o[t]);ed.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==l&&(e.scrollTop=l),void 0!==i&&(e.scrollLeft=i),void 0!==a&&e.setAttribute("viewBox",a)},createAnimatedStyle:e=>new ud(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),md=pd.animated;const fd=e=>e+1,gd=e=>({top:e.offsetTop,left:e.offsetLeft});var hd=function({isSelected:e,adjustScrolling:t,enableAnimation:n,triggerAnimationOnChange:o}){const r=(0,c.useRef)(),l=(0,p.useReducedMotion)()||!n,[i,a]=(0,c.useReducer)(fd,0),[s,u]=(0,c.useReducer)(fd,0),[d,m]=(0,c.useState)({x:0,y:0}),f=(0,c.useMemo)((()=>r.current?gd(r.current):null),[o]),g=(0,c.useMemo)((()=>{if(!t||!r.current)return()=>{};const e=(0,da.getScrollContainer)(r.current);if(!e)return()=>{};const n=r.current.getBoundingClientRect();return()=>{const t=r.current.getBoundingClientRect().top-n.top;t&&(e.scrollTop+=t)}}),[o,t]);return(0,c.useLayoutEffect)((()=>{i&&u()}),[i]),(0,c.useLayoutEffect)((()=>{if(!f)return;if(l)return void g();r.current.style.transform=void 0;const e=gd(r.current);a(),m({x:Math.round(f.left-e.left),y:Math.round(f.top-e.top)})}),[o]),qu({from:{x:d.x,y:d.y},to:{x:0,y:0},reset:i!==s,config:{mass:5,tension:2e3,friction:200},immediate:l,onChange:function({value:t}){if(!r.current)return;let{x:n,y:o}=t;n=Math.round(n),o=Math.round(o);const l=0===n&&0===o;r.current.style.transformOrigin="center center",r.current.style.transform=l?void 0:`translate3d(${n}px,${o}px,0)`,r.current.style.zIndex=e?"1":"",g()}}),r};const bd=".block-editor-block-list__block",vd=".block-list-appender",_d=".block-editor-button-block-appender";function kd(e,t){return e.closest(bd)===t.closest(bd)}function yd(e,t){return t.closest([bd,vd,_d].join(","))===e}function Ed(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(bd);return t?t.id.slice(6):void 0}function Sd(e){const t=(0,c.useRef)(),n=function(e){return(0,f.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,__unstableGetEditorMode:o,isBlockSelected:r}=t(Jo);if(r(e)&&"edit"===o())return n()}),[e])}(e),{isBlockSelected:o,isMultiSelecting:r}=(0,f.useSelect)(Jo);return(0,c.useEffect)((()=>{if(!o(e)||r())return;if(null==n)return;if(!t.current)return;const{ownerDocument:l}=t.current;if(yd(t.current,l.activeElement))return;const i=da.focus.tabbable.find(t.current).filter((e=>(0,da.isTextField)(e))),a=-1===n,s=i[a?i.length-1:0]||t.current;if(yd(t.current,s)){if(!t.current.getAttribute("contenteditable")){const e=da.focus.tabbable.findNext(t.current);if(e&&yd(t.current,e)&&(0,da.isFormElement)(e))return void e.focus()}(0,da.placeCaretAtHorizontalEdge)(s,a)}else t.current.focus()}),[n,e]),t}function wd(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function Cd(){const e=(0,f.useSelect)((e=>{const{getSettings:t}=e(Jo);return t().outlineMode}),[]);return(0,p.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",wd),t.addEventListener("mouseover",wd),()=>{t.removeEventListener("mouseout",wd),t.removeEventListener("mouseover",wd),t.classList.remove("is-hovered")}}),[e])}function xd(e){return(0,f.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:r,isBlockMultiSelected:l,getBlockName:i,getSettings:s,hasSelectedInnerBlock:c,isTyping:u,__unstableIsFullySelected:p,__unstableSelectionHasUnmergeableBlock:m}=t(Jo),{outlineMode:f}=s(),g=n(e),h=r(e),b=i(e),v=c(e,!0),_=l(e);return d()({"is-selected":h,"is-highlighted":o(e),"is-multi-selected":_,"is-partially-selected":_&&!p()&&!m(),"is-reusable":(0,a.isReusableBlock)((0,a.getBlockType)(b)),"is-dragging":g,"has-child-selected":v,"remove-outline":h&&f&&u()})}),[e])}function Bd(e){return(0,f.useSelect)((t=>{const n=t(Jo).getBlockName(e),o=(0,a.getBlockType)(n);if(o?.apiVersion>1)return(0,a.getBlockDefaultClassName)(n)}),[e])}function Id(e){return(0,f.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(Jo),r=o(e);if(!r?.className)return;const l=(0,a.getBlockType)(n(e));return l?.apiVersion>1?r.className:void 0}),[e])}function Td(e){return(0,f.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:l,isBlockSelected:i}=t(Jo);if(!i(e))return;const a=n();return a?d()("is-block-moving-mode",{"can-insert-moving-block":o(r(a),l(e))}):void 0}),[e])}function Md(e){const{isBlockSelected:t}=(0,f.useSelect)(Jo),{selectBlock:n,selectionChange:o}=(0,f.useDispatch)(Jo);return(0,p.useRefEffect)((r=>{function l(l){r.parentElement.closest('[contenteditable="true"]')||(t(e)?l.target.isContentEditable||o(e):yd(r,l.target)&&n(e))}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}var Pd=window.wp.keycodes;function Nd(e){const t=(0,f.useSelect)((t=>t(Jo).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:o}=(0,f.useSelect)(Jo),{insertDefaultBlock:r,removeBlock:l}=(0,f.useDispatch)(Jo);return(0,p.useRefEffect)((i=>{if(t)return i.addEventListener("keydown",a),i.addEventListener("dragstart",s),()=>{i.removeEventListener("keydown",a),i.removeEventListener("dragstart",s)};function a(t){const{keyCode:a,target:s}=t;a!==Pd.ENTER&&a!==Pd.BACKSPACE&&a!==Pd.DELETE||s!==i||(0,da.isTextField)(s)||(t.preventDefault(),a===Pd.ENTER?r({},n(e),o(e)+1):l(e))}function s(e){e.preventDefault()}}),[e,t,n,o,r,l])}function Ld(e){const{isNavigationMode:t,isBlockSelected:n}=(0,f.useSelect)(Jo),{setNavigationMode:o,selectBlock:r}=(0,f.useDispatch)(Jo);return(0,p.useRefEffect)((l=>{function i(l){t()&&!l.defaultPrevented&&(l.preventDefault(),n(e)?o(!1):r(e))}return l.addEventListener("mousedown",i),()=>{l.removeEventListener("mousedown",i)}}),[e,t,n,o])}const Rd=(0,c.createContext)({refs:new Map,callbacks:new Map});function Ad({children:e}){const t=(0,c.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,c.createElement)(Rd.Provider,{value:t},e)}function Dd(e){const{refs:t,callbacks:n}=(0,c.useContext)(Rd),o=(0,c.useRef)();return(0,c.useLayoutEffect)((()=>(t.set(o,e),()=>{t.delete(o)})),[e]),(0,p.useRefEffect)((t=>{o.current=t,n.forEach(((n,o)=>{e===n&&o(t)}))}),[e])}function Od(e){const{refs:t}=(0,c.useContext)(Rd),n=(0,c.useRef)();return n.current=e,(0,c.useMemo)((()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}})),[])}function zd(e){const{callbacks:t}=(0,c.useContext)(Rd),n=Od(e),[o,r]=(0,c.useState)(null);return(0,c.useLayoutEffect)((()=>{if(e)return t.set(r,e),()=>{t.delete(r)}}),[e]),n.current||o}function Vd(){const e=(0,c.useContext)(gh);return(0,p.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function Fd(e){return(0,f.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(Jo);return n(e)}),[e])}const Hd=200;function Gd(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:l}=(0,c.useContext)(Ri),{index:i,mode:s,name:u,blockApiVersion:m,blockTitle:g,isPartOfSelection:h,adjustScrolling:b,enableAnimation:_,isSubtreeDisabled:k}=(0,f.useSelect)((e=>{const{getBlockAttributes:t,getBlockIndex:o,getBlockMode:r,getBlockName:l,isTyping:i,getGlobalBlockCount:s,isBlockSelected:c,isBlockMultiSelected:u,isAncestorMultiSelected:d,isFirstMultiSelectedBlock:p,isBlockSubtreeDisabled:m}=Xo(e(Jo)),{getActiveBlockVariation:f}=e(a.store),g=c(n),h=u(n)||d(n),b=l(n),v=(0,a.getBlockType)(b),_=f(b,t(n));return{index:o(n),mode:r(n),name:b,blockApiVersion:v?.apiVersion||1,blockTitle:_?.title||v?.title,isPartOfSelection:g||h,adjustScrolling:g||p(n),enableAnimation:!i()&&s()<=Hd,isSubtreeDisabled:m(n)}}),[n]),y=Fd(n),E=(0,v.sprintf)((0,v.__)("Block: %s"),g),S="html"!==s||t?"":"-visual",w=(0,p.useMergeRefs)([e.ref,Sd(n),Dd(n),Md(n),Nd(n),Ld(n),Cd(),Vd(),hd({isSelected:h,adjustScrolling:b,enableAnimation:_,triggerAnimationOnChange:i}),(0,p.useDisabled)({isDisabled:!y})]),C=rr();return m<2&&C.clientId,{tabIndex:0,...r,...e,ref:w,id:`block-${n}${S}`,role:"document","aria-label":E,"data-block":n,"data-type":u,"data-title":g,inert:k?"true":void 0,className:d()(d()("block-editor-block-list__block",{"wp-block":!l,"has-block-overlay":y}),o,e.className,r.className,xd(n),Bd(n),Id(n),Td(n)),style:{...r.style,...e.style}}}function Ud({children:e,isHtml:t,...n}){return(0,c.createElement)("div",{...Gd(n,{__unstableIsHtml:t})},e)}Gd.save=a.__unstableGetBlockProps;const $d=(0,f.withSelect)(((e,{clientId:t,rootClientId:n})=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:l,getTemplateLock:i,__unstableGetBlockWithoutInnerBlocks:a,canRemoveBlock:s,canMoveBlock:c}=e(Jo),u=a(t),d=o(t),p=i(n),m=s(t,n),f=c(t,n),{name:g,attributes:h,isValid:b}=u||{};return{mode:r(t),isSelectionEnabled:l(),isLocked:!!p,canRemove:m,canMove:f,block:u,name:g,attributes:h,isValid:b,isSelected:d}})),jd=(0,f.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:l,replaceBlocks:i,toggleSelection:s,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:d}=e(Jo);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n.select(Jo),l=r(),{clientId:i}=t,a=l.length?l:[i];o(a,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:l}=t,{getBlockIndex:i}=n.select(Jo),a=i(o);r(e,a+1,l)},onMerge(e){const{clientId:o,rootClientId:i}=t,{getPreviousBlockClientId:s,getNextBlockClientId:c,getBlock:p,getBlockAttributes:m,getBlockName:f,getBlockOrder:g,getBlockIndex:h,getBlockRootClientId:b,canInsertBlockType:v}=n.select(Jo);function _(e,t=!0){const o=b(e),l=g(e),[i]=l;1===l.length&&(0,a.isUnmodifiedBlock)(p(i))?d(e):n.batch((()=>{if(v(f(i),o))u([i],e,o,h(e));else{const n=(0,a.switchToBlockType)(p(i),(0,a.getDefaultBlockName)());n&&n.length&&(r(n,h(e),o,t),d(i,!1))}!g(e).length&&(0,a.isUnmodifiedBlock)(p(e))&&d(e,!1)}))}if(e){if(i){const e=c(i);if(e){if(f(i)!==f(e))return void l(i,e);{const t=m(i),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(g(e),e,i),d(e,!1)}))}}}const e=c(o);if(!e)return;g(e).length?_(e,!1):l(o,e)}else{const e=s(o);if(e)l(e,o);else if(i){const e=s(i);if(e&&f(i)===f(e)){const t=m(i),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{u(g(i),i,e),d(i,!1)}))}_(i)}}},onReplace(e,n,o){e.length&&!(0,a.isUnmodifiedDefaultBlock)(e[e.length-1])&&c();const r=1===e?.length&&Array.isArray(e[0])?e[0]:e;i([t.clientId],r,n,o)},toggleSelection(e){s(e)}}}));var Wd=(0,p.compose)(p.pure,$d,jd,(0,p.ifCondition)((({block:e})=>!!e)),(0,m.withFilters)("editor.BlockListBlock"))((function({block:{__unstableBlockSource:e},mode:t,isLocked:n,canRemove:o,clientId:r,isSelected:l,isSelectionEnabled:i,className:s,__unstableLayoutClassNames:u,name:p,isValid:m,attributes:g,wrapperProps:h,setAttributes:b,onReplace:v,onInsertBlocksAfter:_,onMerge:k,toggleSelection:y}){var E;const{themeSupportsLayout:S,isTemporarilyEditingAsBlocks:w,blockEditingMode:C}=(0,f.useSelect)((e=>{const{getSettings:t,__unstableGetTemporarilyEditingAsBlocks:n,getBlockEditingMode:o}=e(Jo);return{themeSupportsLayout:t().supportsLayout,isTemporarilyEditingAsBlocks:n()===r,blockEditingMode:o(r)}}),[r]),{removeBlock:x}=(0,f.useDispatch)(Jo),B=(0,c.useCallback)((()=>x(r)),[r]),I=yi()||{};let T=(0,c.createElement)(va,{name:p,isSelected:l,attributes:g,setAttributes:b,insertBlocksAfter:n?void 0:_,onReplace:o?v:void 0,onRemove:o?B:void 0,mergeBlocks:o?k:void 0,clientId:r,isSelectionEnabled:i,toggleSelection:y,__unstableLayoutClassNames:u,__unstableParentLayout:Object.keys(I).length?I:void 0});const M=(0,a.getBlockType)(p);"disabled"===C&&(h={...h,tabIndex:-1}),M?.getEditWrapperProps&&(h=function(e,t){const n={...e,...t};return e?.className&&t?.className&&(n.className=d()(e.className,t.className)),e?.style&&t?.style&&(n.style={...e.style,...t.style}),n}(h,M.getEditWrapperProps(g)));const P=h&&!!h["data-align"]&&!S;let N;if(P&&(T=(0,c.createElement)("div",{className:"wp-block","data-align":h["data-align"]},T)),m)N="html"===t?(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{style:{display:"none"}},T),(0,c.createElement)(Ud,{isHtml:!0},(0,c.createElement)(Pa,{clientId:r}))):M?.apiVersion>1?T:(0,c.createElement)(Ud,{...h},T);else{const t=e?(0,a.serializeRawBlock)(e):(0,a.getSaveContent)(M,g);N=(0,c.createElement)(Ud,{className:"has-warning"},(0,c.createElement)(Ca,{clientId:r}),(0,c.createElement)(c.RawHTML,null,(0,da.safeHTML)(t)))}const{"data-align":L,...R}=null!==(E=h)&&void 0!==E?E:{},A={clientId:r,className:d()({"is-editing-disabled":"disabled"===C,"is-content-locked-temporarily-editing-as-blocks":w},L&&S&&`align${L}`,s),wrapperProps:R,isAligned:P},D=(0,c.useMemo)((()=>A),Object.values(A));return(0,c.createElement)(Ri.Provider,{value:D},(0,c.createElement)(Ta,{fallback:(0,c.createElement)(Ud,{className:"has-warning"},(0,c.createElement)(Ba,null))},N))})),Kd=window.wp.htmlEntities;var qd=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const Zd=[(0,c.createInterpolateElement)((0,v.__)("While writing, you can press / to quickly insert new blocks."),{kbd:(0,c.createElement)("kbd",null)}),(0,c.createInterpolateElement)((0,v.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,c.createElement)("kbd",null)}),(0,c.createInterpolateElement)((0,v.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,c.createElement)("kbd",null)}),(0,v.__)("Drag files into the editor to automatically insert media blocks."),(0,v.__)("Change a block's type by pressing the block icon on the toolbar.")];var Yd=function(){const[e]=(0,c.useState)(Math.floor(Math.random()*Zd.length));return(0,c.createElement)(m.Tip,null,Zd[e])};var Xd=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var Qd=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var Jd=(0,c.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,c.createElement)(F.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"}));var ep=(0,c.memo)((function({icon:e,showColors:t=!1,className:n,context:o}){"block-default"===e?.src&&(e={src:Jd});const r=(0,c.createElement)(m.Icon,{icon:e&&e.src?e.src:e,context:o}),l=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,c.createElement)("span",{style:l,className:d()("block-editor-block-icon",n,{"has-colors":t})},r)}));var tp=function({title:e,icon:t,description:n,blockType:o,className:r}){o&&($()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o));const{parentNavBlockClientId:l}=(0,f.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(Jo);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:i}=(0,f.useDispatch)(Jo);return(0,c.createElement)("div",{className:d()("block-editor-block-card",r)},l&&(0,c.createElement)(m.Button,{onClick:()=>i(l),label:(0,v.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,v.isRTL)()?Xd:Qd,isSmall:!0}),(0,c.createElement)(ep,{icon:t,showColors:!0}),(0,c.createElement)("div",{className:"block-editor-block-card__content"},(0,c.createElement)("h2",{className:"block-editor-block-card__title"},e),(0,c.createElement)("span",{className:"block-editor-block-card__description"},n)))};var np=(0,p.createHigherOrderComponent)((e=>(0,f.withRegistry)((({useSubRegistry:t=!0,registry:n,...o})=>{if(!t)return(0,c.createElement)(e,{registry:n,...o});const[r,l]=(0,c.useState)(null);return(0,c.useEffect)((()=>{const e=(0,f.createRegistry)({},n);e.registerStore(qo,Qo),l(e)}),[n]),r?(0,c.createElement)(f.RegistryProvider,{value:r},(0,c.createElement)(e,{registry:r,...o})):null}))),"withRegistryProvider");const op=()=>{};function rp({clientId:e=null,value:t,selection:n,onChange:o=op,onInput:r=op}){const l=(0,f.useRegistry)(),{resetBlocks:i,resetSelection:s,replaceInnerBlocks:u,selectBlock:d,setHasControlledInnerBlocks:p,__unstableMarkNextChangeAsNotPersistent:m}=l.dispatch(Jo),{hasSelectedBlock:g,getBlockName:h,getBlocks:b,getSelectionStart:v,getSelectionEnd:_,getBlock:k}=l.select(Jo),y=(0,f.useSelect)((t=>!e||t(Jo).areInnerBlocksControlled(e)),[e]),E=(0,c.useRef)({incoming:null,outgoing:[]}),S=(0,c.useRef)(!1),w=()=>{t&&(m(),e?l.batch((()=>{p(e,!0);const n=t.map((e=>(0,a.cloneBlock)(e)));S.current&&(E.current.incoming=n),m(),u(e,n)})):(S.current&&(E.current.incoming=t),i(t)))},C=(0,c.useRef)(r),x=(0,c.useRef)(o);(0,c.useEffect)((()=>{C.current=r,x.current=o}),[r,o]),(0,c.useEffect)((()=>{if(E.current.outgoing.includes(t))E.current.outgoing[E.current.outgoing.length-1]===t&&(E.current.outgoing=[]);else if(b(e)!==t){E.current.outgoing=[];const t=g(),o=v(),r=_();if(w(),n)s(n.selectionStart,n.selectionEnd,n.initialPosition);else{const n=k(o.clientId);t&&!n?d(e):s(o,r)}}}),[t,e]),(0,c.useEffect)((()=>{y||(E.current.outgoing=[],w())}),[y]),(0,c.useEffect)((()=>{const{getSelectedBlocksInitialCaretPosition:t,isLastBlockChangePersistent:n,__unstableIsLastBlockChangeIgnored:o,areInnerBlocksControlled:r}=l.select(Jo);let i=b(e),a=n(),s=!1;S.current=!0;const c=l.subscribe((()=>{if(null!==e&&null===h(e))return;if(!(!e||r(e)))return;const l=n(),c=b(e),u=c!==i;if(i=c,u&&(E.current.incoming||o()))return E.current.incoming=null,void(a=l);if(u||s&&!u&&l&&!a){a=l,E.current.outgoing.push(i);(a?x.current:C.current)(i,{selection:{selectionStart:v(),selectionEnd:_(),initialPosition:t()}})}s=u}));return()=>{S.current=!1,c()}}),[l,e]),(0,c.useEffect)((()=>()=>{m(),e?(p(e,!1),m(),u(e,[])):i([])}),[])}var lp=window.wp.keyboardShortcuts;function ip(){return null}ip.Register=function(){const{registerShortcut:e}=(0,f.useDispatch)(lp.store);return(0,c.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,v.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,v.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,v.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,v.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,v.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,v.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,v.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,v.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,v.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,v.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,v.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var ap=ip;const sp=np((e=>{const{children:t,settings:n,stripExperimentalSettings:o=!1}=e,{__experimentalUpdateSettings:r}=Xo((0,f.useDispatch)(Jo));return(0,c.useEffect)((()=>{r({...n,__internalIsInitialized:!0},{stripExperimentalSettings:o,reset:!0})}),[n,o,r]),rp(e),(0,c.createElement)(m.SlotFillProvider,null,(0,c.createElement)(ap.Register,null),(0,c.createElement)(Ad,null,t))}));var cp=e=>(0,c.createElement)(sp,{...e,stripExperimentalSettings:!0},e.children);function up(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,f.useSelect)(Jo),{clearSelectedBlock:o}=(0,f.useDispatch)(Jo),{clearBlockSelection:r}=e();return(0,p.useRefEffect)((e=>{if(r)return e.addEventListener("mousedown",l),()=>{e.removeEventListener("mousedown",l)};function l(r){(t()||n())&&r.target===e&&o()}}),[t,n,o,r])}function dp(e){return(0,c.createElement)("div",{ref:up(),...e})}function pp(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:l,__unstableIsFullySelected:i}=e(Jo);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:l(),isFullSelection:i()}}function mp(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:l}=(0,f.useSelect)(pp,[]);return(0,p.useRefEffect)((r=>{const{ownerDocument:i}=r,{defaultView:a}=i;if(null==e)return;if(!o||t)return;const{length:s}=n;s<2||l&&(r.contentEditable=!0,r.focus(),a.getSelection().removeAllRanges())}),[o,t,n,r,e,l])}function fp(e,t,n,o){let r,l=da.focus.focusable.find(n);return t&&l.reverse(),l=l.slice(l.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),l.find((function(e){if(1!==e.children.length||!kd(e,e.firstElementChild)||"true"!==e.firstElementChild.getAttribute("contenteditable")){if(!da.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}}))}function gp(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,f.useSelect)(Jo),{selectBlock:l}=(0,f.useDispatch)(Jo);return(0,p.useRefEffect)((i=>{let a;function s(){a=null}function c(s){if(s.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:m,metaKey:f}=s,g=c===Pd.UP,h=c===Pd.DOWN,b=c===Pd.LEFT,v=c===Pd.RIGHT,_=g||b,k=b||v,y=g||h,E=k||y,S=d||p||m||f,w=y?da.isVerticalEdge:da.isHorizontalEdge,{ownerDocument:C}=i,{defaultView:x}=C;if(!E)return;if(o()){if(d)return;if(!r())return;return s.preventDefault(),void(_?l(e()):l(t(),-1))}if(!function(e,t,n){const o=t===Pd.UP||t===Pd.DOWN,{tagName:r}=e,l=e.getAttribute("type");if(o&&!n)return"INPUT"!==r||!["date","datetime-local","month","number","range","time","week"].includes(l);if("INPUT"===r)return["button","checkbox","number","color","file","image","radio","reset","submit"].includes(l);return"TEXTAREA"!==r}(u,c,S))return;y?a||(a=(0,da.computeCaretRect)(x)):a=null;const B=(0,da.isRTL)(u)?!_:_,{keepCaretInsideBlock:I}=n();if(d)(function(e,t){const n=fp(e,t,i);return n&&Ed(n)})(u,_)&&w(u,_)&&(i.contentEditable=!0,i.focus());else if(!y||!(0,da.isVerticalEdge)(u,_)||m&&!(0,da.isHorizontalEdge)(u,B)||I){if(k&&x.getSelection().isCollapsed&&(0,da.isHorizontalEdge)(u,B)&&!I){const e=fp(u,B,i);(0,da.placeCaretAtHorizontalEdge)(e,_),s.preventDefault()}}else{const e=fp(u,_,i,!0);e&&((0,da.placeCaretAtVerticalEdge)(e,m?!_:_,m?void 0:a),s.preventDefault())}}return i.addEventListener("mousedown",s),i.addEventListener("keydown",c),()=>{i.removeEventListener("mousedown",s),i.removeEventListener("keydown",c)}}),[])}function hp(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,f.useSelect)(Jo),{multiSelect:o,selectBlock:r}=(0,f.useDispatch)(Jo),l=(0,lp.__unstableUseShortcutEventMatch)();return(0,p.useRefEffect)((i=>{function a(a){if(!l("core/block-editor/select-all",a))return;const s=t();if(s.length<2&&!(0,da.isEntirelySelected)(a.target))return;a.preventDefault();const[c]=s,u=n(c),d=e(u);s.length!==d.length?o(d[0],d[d.length-1]):u&&(i.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return i.addEventListener("keydown",a),()=>{i.removeEventListener("keydown",a)}}),[])}function bp(e,t){e.contentEditable=t,t&&e.focus()}function vp(){const{startMultiSelect:e,stopMultiSelect:t}=(0,f.useDispatch)(Jo),{isSelectionEnabled:n,hasMultiSelection:o,isDraggingBlocks:r}=(0,f.useSelect)(Jo);return(0,p.useRefEffect)((l=>{const{ownerDocument:i}=l,{defaultView:a}=i;let s,c;function u(){t(),a.removeEventListener("mouseup",u),c=a.requestAnimationFrame((()=>{if(o())return;bp(l,!1);const e=a.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);s.contains(t)&&s.focus()}}))}function d({buttons:t,target:o}){r()||1===t&&"true"===o.getAttribute("contenteditable")&&n()&&(s=o,e(),a.addEventListener("mouseup",u),bp(l,!0))}return l.addEventListener("mouseout",d),()=>{l.removeEventListener("mouseout",d),a.removeEventListener("mouseup",u),a.cancelAnimationFrame(c)}}),[e,t,n,o])}function _p(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t),t&&e.focus()}function kp(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,f.useDispatch)(Jo),{getBlockParents:o,getBlockSelectionStart:r}=(0,f.useSelect)(Jo);return(0,p.useRefEffect)((n=>{const{ownerDocument:l}=n,{defaultView:i}=l;function a(l){const a=i.getSelection();if(!a.rangeCount)return;const s=l.shiftKey&&"mouseup"===l.type;if(a.isCollapsed&&!s)return void _p(n,!1);let c=Ed(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(a)),u=Ed(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(a));if(s){const e=r(),t=Ed(l.target),n=t!==u;(c===u&&a.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0===c&&void 0===u)return void _p(n,!1);if(c===u)t(c);else{const t=[...o(c),c],n=[...o(u),u],r=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[r],n[r])}}function s(){l.addEventListener("selectionchange",a),i.addEventListener("mouseup",a)}function c(){l.removeEventListener("selectionchange",a),i.removeEventListener("mouseup",a)}function u(){c(),s()}return s(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,o])}function yp(){const{selectBlock:e}=(0,f.useDispatch)(Jo),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,f.useSelect)(Jo);return(0,p.useRefEffect)((r=>{function l(l){if(!t()||0!==l.button)return;const i=n(),a=Ed(l.target);l.shiftKey?i!==a&&(r.contentEditable=!0,r.focus()):o()&&e(a)}return r.addEventListener("mousedown",l),()=>{r.removeEventListener("mousedown",l)}}),[e,t,n,o])}function Ep(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:o}=(0,f.useSelect)(Jo),{replaceBlocks:r,__unstableSplitSelection:l,removeBlocks:i,__unstableDeleteSelection:s,__unstableExpandSelection:c}=(0,f.useDispatch)(Jo);return(0,p.useRefEffect)((u=>{function d(e){"true"===u.contentEditable&&e.preventDefault()}function p(d){d.defaultPrevented||o()&&(d.keyCode===Pd.ENTER?(u.contentEditable=!1,d.preventDefault(),e()?r(t(),(0,a.createBlock)((0,a.getDefaultBlockName)())):l()):d.keyCode===Pd.BACKSPACE||d.keyCode===Pd.DELETE?(u.contentEditable=!1,d.preventDefault(),e()?i(t()):n()?s(d.keyCode===Pd.DELETE):c()):1!==d.key.length||d.metaKey||d.ctrlKey||(u.contentEditable=!1,n()?s(d.keyCode===Pd.DELETE):(d.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function m(e){o()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",d),u.addEventListener("keydown",p),u.addEventListener("compositionstart",m),()=>{u.removeEventListener("beforeinput",d),u.removeEventListener("keydown",p),u.removeEventListener("compositionstart",m)}}),[])}function Sp(){const[e,t,n]=function(){const e=(0,c.useRef)(),t=(0,c.useRef)(),n=(0,c.useRef)(),o=(0,c.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:l,getBlockCount:i}=(0,f.useSelect)(Jo),{setNavigationMode:a}=(0,f.useDispatch)(Jo),s=(0,f.useSelect)((e=>e(Jo).isNavigationMode()),[])?void 0:"0",u=(0,c.useRef)();function d(t){if(u.current)u.current=null;else if(r())e.current.focus();else if(l())o.current.focus();else{a(!0);const n=e.current.ownerDocument===t.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement,o=t.target.compareDocumentPosition(n)&t.target.DOCUMENT_POSITION_FOLLOWING,r=da.focus.tabbable.find(e.current);r.length&&(o?r[0]:r[r.length-1]).focus()}}const m=(0,c.createElement)("div",{ref:t,tabIndex:s,onFocus:d}),g=(0,c.createElement)("div",{ref:n,tabIndex:s,onFocus:d}),h=(0,p.useRefEffect)((s=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===Pd.ESCAPE&&!r())return e.preventDefault(),void a(!0);if(e.keyCode!==Pd.TAB)return;const o=e.shiftKey,i=o?"findPrevious":"findNext";if(!r()&&!l())return void(e.target===s&&a(!0));const c=da.focus.tabbable[i](e.target),d=e.target.closest("[data-block]"),p=d&&c&&(kd(d,c)||yd(d,c));if((0,da.isFormElement)(c)&&p)return;const m=o?t:n;u.current=!0,m.current.focus({preventScroll:!0})}function d(e){o.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==i()||s.focus()}function p(o){if(o.keyCode!==Pd.TAB)return;if("region"===o.target?.getAttribute("role"))return;if(e.current===o.target)return;const r=o.shiftKey?"findPrevious":"findNext",l=da.focus.tabbable[r](o.target);l!==t.current&&l!==n.current||(o.preventDefault(),l.focus({preventScroll:!0}))}const{ownerDocument:m}=s,{defaultView:f}=m;return f.addEventListener("keydown",p),s.addEventListener("keydown",c),s.addEventListener("focusout",d),()=>{f.removeEventListener("keydown",p),s.removeEventListener("keydown",c),s.removeEventListener("focusout",d)}}),[]);return[m,(0,p.useMergeRefs)([e,h]),g]}(),o=(0,f.useSelect)((e=>e(Jo).hasMultiSelection()),[]);return[e,(0,p.useMergeRefs)([t,Ep(),vp(),kp(),yp(),mp(),hp(),gp(),(0,p.useRefEffect)((e=>{if(e.tabIndex=0,e.contentEditable=o,o)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,v.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[o])]),n]}var wp=(0,c.forwardRef)((function({children:e,...t},n){const[o,r,l]=Sp();return(0,c.createElement)(c.Fragment,null,o,(0,c.createElement)("div",{...t,ref:(0,p.useMergeRefs)([r,n]),className:d()(t.className,"block-editor-writing-flow")},e),l)}));function Cp(e,t,n){const o={};for(const t in e)o[t]=e[t];if(e instanceof n.contentDocument.defaultView.MouseEvent){const e=n.getBoundingClientRect();o.clientX+=e.left,o.clientY+=e.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault();!n.dispatchEvent(r)&&e.preventDefault()}function xp(e){return(0,p.useRefEffect)((t=>{const{defaultView:n}=e;if(!n)return;const{frameElement:o}=n,r=["dragover","mousemove"],l={};for(const e of r)l[e]=e=>{const t=Object.getPrototypeOf(e).constructor.name;Cp(e,window[t],o)},t.addEventListener(e,l[e]);return()=>{for(const e of r)t.removeEventListener(e,l[e])}}))}function Bp({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,expand:l=!1,readonly:i,forwardedRef:a,...s}){const{resolvedAssets:u,isPreviewMode:g}=(0,f.useSelect)((e=>{const t=e(Jo).getSettings();return{resolvedAssets:t.__unstableResolvedAssets,isPreviewMode:t.__unstableIsPreviewMode}}),[]),{styles:h="",scripts:b=""}=u,[_,k]=(0,c.useState)(),[y,E]=(0,c.useState)([]),S=(0,c.useMemo)((()=>Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:o}=t;if(null===n)return e;if(!o)return e;if("wp-reset-editor-styles-css"===n.id)return e;if(!n.id)return e;if(function e(t){return Array.from(t).find((({selectorText:t,conditionText:n,cssRules:o})=>n?e(o):t&&(t.includes(".editor-styles-wrapper")||t.includes(".wp-block"))))}(o)){const t="STYLE"===n.tagName;if(t){const t=n.id.replace("-inline-css","-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!t){const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}}return e}),[])),[]),w=up(),[C,x,B]=Sp(),[I,{height:T}]=(0,p.useResizeObserver)(),M=(0,p.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(){const{contentDocument:o,ownerDocument:r}=e,{documentElement:l}=o;t=o,w(l),E(Array.from(r.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),o.dir=r.dir;for(const e of S)o.getElementById(e.id)||(o.head.appendChild(e.cloneNode(!0)),g||console.warn(`${e.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,e));t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1)}return e._load=()=>{k(e.contentDocument)},e.addEventListener("load",o),()=>{delete e._load,e.removeEventListener("load",o),t?.removeEventListener("dragover",n),t?.removeEventListener("drop",n)}}),[]),P=(0,p.useDisabled)({isDisabled:!i}),N=(0,p.useMergeRefs)([xp(_),e,w,x,P]),L=`\n\n\t\n\t\t\n\t\t