/*! This file is auto-generated */ (()=>{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()},s=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",s,!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",s,!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:s,update:p}),a()}function a(){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(r{var n; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},1198:(e,t)=>{"use strict";function n(){}function o(e,t,n,o,r){for(var l=0,i=t.length,s=0,a=0;le.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(s,s+c.count));s+=c.count,c.added||(a+=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 s=(t=this.removeEmpty(this.tokenize(t))).length,a=e.length,c=1,u=s+a,d=[{newPos:-1,components:[]}],p=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=s&&p+1>=a)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 h=u&&u.newPos+1=s&&m+1>=a)return i(o(l,r.components,t,e,l.useLongestToken));d[n]=r}else d[n]=void 0}var f;c++}if(r)!function e(){setTimeout((function(){if(c>u)return r();m()||e()}),0)}();else for(;c<=u;){var h=m();if(h)return h}},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,s=i-o,a=0;i+1{"use strict";var o;t.Kx=function(e,t,n){return r.diff(e,t,n)};var r=new(((o=n(1198))&&o.__esModule?o:{default:o}).default)},1345:(e,t,n)=>{"use strict";var o=n(5022);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=o.getWindow(t));var r=n.allowHorizontalScroll,l=n.onlyScrollIfNeeded,i=n.alignWithTop,s=n.alignWithLeft,a=n.offsetTop||0,c=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;r=void 0===r||r;var p=o.isWindow(t),m=o.offset(e),h=o.outerHeight(e),g=o.outerWidth(e),f=void 0,b=void 0,v=void 0,k=void 0,_=void 0,y=void 0,E=void 0,w=void 0,S=void 0,C=void 0;p?(E=t,C=o.height(E),S=o.width(E),w={left:o.scrollLeft(E),top:o.scrollTop(E)},_={left:m.left-w.left-c,top:m.top-w.top-a},y={left:m.left+g-(w.left+S)+d,top:m.top+h-(w.top+C)+u},k=w):(f=o.offset(t),b=t.clientHeight,v=t.clientWidth,k={left:t.scrollLeft,top:t.scrollTop},_={left:m.left-(f.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-c,top:m.top-(f.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-a},y={left:m.left+g-(f.left+v+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:m.top+h-(f.top+b+(parseFloat(o.css(t,"borderBottomWidth"))||0))+u}),_.top<0||y.top>0?!0===i?o.scrollTop(t,k.top+_.top):!1===i?o.scrollTop(t,k.top+y.top):_.top<0?o.scrollTop(t,k.top+_.top):o.scrollTop(t,k.top+y.top):l||((i=void 0===i||!!i)?o.scrollTop(t,k.top+_.top):o.scrollTop(t,k.top+y.top)),r&&(_.left<0||y.left>0?!0===s?o.scrollLeft(t,k.left+_.left):!1===s?o.scrollLeft(t,k.left+y.left):_.left<0?o.scrollLeft(t,k.left+_.left):o.scrollLeft(t,k.left+y.left):l||((s=void 0===s||!!s)?o.scrollLeft(t,k.left+_.left):o.scrollLeft(t,k.left+y.left)))}},5425:(e,t,n)=>{"use strict";e.exports=n(1345)},5022:e=>{"use strict";var t=Object.assign||function(e){for(var t=1;t{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,l;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(l=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,l[r]))return!1;for(r=o;0!=r--;){var i=l[r];if(!e(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}},2303:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,l;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(l=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,l[r]))return!1;for(r=o;0!=r--;){var i=l[r];if(!e(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}},9894:(e,t,n)=>{var o=n(4827);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var l=e.nodeName,i=document.createElement(l);i.innerHTML=" ","TEXTAREA"===l.toUpperCase()&&i.setAttribute("rows","1");var s=o(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i),n=i.offsetHeight,a.removeChild(i)}return n}},7970:(e,t,n)=>{e.exports=n(195)},3110:e=>{"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},3812:e=>{var t,n,o,r,l,i,s,a,c,u,d,p,m,h,g,f=!1;function b(){if(!f){f=!0;var e=navigator.userAgent,b=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),v=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(p=/\b(iPhone|iP[ao]d)/.exec(e),m=/\b(iP[ao]d)/.exec(e),u=/Android/i.exec(e),h=/FBAN\/\w+;/i.exec(e),g=/Mobile/i.exec(e),d=!!/Win64/.exec(e),b){(t=b[1]?parseFloat(b[1]):b[5]?parseFloat(b[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var k=/(?:Trident\/(\d+.\d+))/.exec(e);i=k?parseFloat(k[1])+4:t,n=b[2]?parseFloat(b[2]):NaN,o=b[3]?parseFloat(b[3]):NaN,(r=b[4]?parseFloat(b[4]):NaN)?(b=/(?:Chrome\/(\d+\.\d+))/.exec(e),l=b&&b[1]?parseFloat(b[1]):NaN):l=NaN}else t=n=o=l=r=NaN;if(v){if(v[1]){var _=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);s=!_||parseFloat(_[1].replace("_","."))}else s=!1;a=!!v[2],c=!!v[3]}else s=a=c=!1}}var v={ie:function(){return b()||t},ieCompatibilityMode:function(){return b()||i>t},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()||a},osx:function(){return b()||s},linux:function(){return b()||c},iphone:function(){return b()||p},mobile:function(){return b()||p||m||u||g},nativeApp:function(){return b()||h},android:function(){return b()||u},ipad:function(){return b()||m}};e.exports=v},7939:(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:(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},9122:e=>{var t=String,n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};e.exports=n(),e.exports.createColors=n},6807:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5959:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};n(6807);const r=o(n(4743)),l=o(n(6764));e.exports=(0,l.default)(r.default)},3626:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prefixWrapCSSSelector=t.prefixWrapCSSRule=void 0;const o=n(1146);t.prefixWrapCSSRule=(e,n,r,l,i)=>{const s=e.selector.split(",").filter((e=>!(0,o.cssRuleMatchesPrefixSelector)({selector:e},l)));0!==s.length&&(e.selector=s.map((o=>(0,t.prefixWrapCSSSelector)(o,e,n,r,l,i))).filter(o.isValidCSSSelector).join(", "))};t.prefixWrapCSSSelector=(e,t,n,r,l,i)=>{const s=(0,o.cleanSelector)(e);return""===s?null:null!==n&&s.startsWith(n,0)||(0,o.isKeyframes)(t)||r.some((e=>s.match(e)))?s:(0,o.isNotRootTag)(s)?l+" "+s:i?l+" ."+s:s.replace(/^(body|html|:root)/,l)}},1146:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cssRuleMatchesPrefixSelector=t.isNotRootTag=t.isKeyframes=t.cleanSelector=t.isValidCSSSelector=void 0;const n=/(^\s*|\s*$)/g,o=/^(body|html|:root).*$/;t.isValidCSSSelector=e=>null!==e;t.cleanSelector=e=>e.replace(n,"");t.isKeyframes=e=>{const{parent:t}=e,n=t;return void 0!==t&&"atrule"===n.type&&void 0!==n.name&&null!==n.name.match(/keyframes$/)};t.isNotRootTag=e=>!e.match(o);t.cssRuleMatchesPrefixSelector=(e,t)=>{const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${n}$`).test(e.selector)}},5318:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldIncludeFilePath=void 0;t.shouldIncludeFilePath=(e,t,n)=>t.length>0?null!=e&&t.some((t=>e.match(t))):!(n.length>0)||!(null!=e&&n.some((t=>e.match(t))))},504:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.asPostCSSv7PluginGenerator=void 0;const i=l(n(6483));t.asPostCSSv7PluginGenerator=e=>e.plugin(i.PLUGIN_NAME,((e,t)=>new i.default(e,t).prefix()))},2210:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.asPostCSSv8PluginGenerator=t.isPostCSSv8=void 0;const i=l(n(6483));t.isPostCSSv8=e=>void 0!==e.Root;t.asPostCSSv8PluginGenerator=()=>(e,t)=>{const n=new i.default(e,t);return{postcssPlugin:i.PLUGIN_NAME,Once(e){n.prefixRoot(e)}}}},6764:(e,t,n)=>{"use strict";const o=n(2210),r=n(504);e.exports=e=>(0,o.isPostCSSv8)(e)?(0,o.asPostCSSv8PluginGenerator)():(0,r.asPostCSSv7PluginGenerator)(e)},6483:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PLUGIN_NAME=void 0;const o=n(3626),r=n(5318);t.PLUGIN_NAME="postcss-prefixwrap";t.default=class{blacklist;ignoredSelectors;isPrefixSelector;prefixRootTags;prefixSelector;whitelist;nested;constructor(e,t={}){this.blacklist=t.blacklist??[],this.ignoredSelectors=t.ignoredSelectors??[],this.isPrefixSelector=new RegExp(`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`),this.prefixRootTags=t.prefixRootTags??!1,this.prefixSelector=e,this.whitelist=t.whitelist??[],this.nested=t.nested??null}prefixRoot(e){(0,r.shouldIncludeFilePath)(e.source?.input?.file,this.whitelist,this.blacklist)&&e.walkRules((e=>{(0,o.prefixWrapCSSRule)(e,this.nested,this.ignoredSelectors,this.prefixSelector,this.prefixRootTags)}))}prefix(){return e=>{this.prefixRoot(e)}}}},7036:(e,t,n)=>{const o=n(9069);e.exports=e=>{const t=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(n){const r=o(n.value);let l=!1;r.walk((n=>{if("function"!==n.type||"url"!==n.value)return;const o=n.nodes[0].value,r=new URL(o,e.rootUrl);return r.pathname===o&&t.skipHostRelativeUrls||(n.nodes[0].value=r.toString(),l=!0),!1})),l&&(n.value=o.stringify(r))}}},e.exports.postcss=!0},9069:(e,t,n)=>{var o=n(27),r=n(6714),l=n(6895);function i(e){return this instanceof i?(this.nodes=o(e),this):new i(e)}i.prototype.toString=function(){return Array.isArray(this.nodes)?l(this.nodes):""},i.prototype.walk=function(e,t){return r(this.nodes,e,t),this},i.unit=n(2280),i.walk=r,i.stringify=l,e.exports=i},27:e=>{var t="(".charCodeAt(0),n=")".charCodeAt(0),o="'".charCodeAt(0),r='"'.charCodeAt(0),l="\\".charCodeAt(0),i="/".charCodeAt(0),s=",".charCodeAt(0),a=":".charCodeAt(0),c="*".charCodeAt(0),u="u".charCodeAt(0),d="U".charCodeAt(0),p="+".charCodeAt(0),m=/^[a-f0-9?-]+$/i;e.exports=function(e){for(var h,g,f,b,v,k,_,y,E,w=[],S=e,C=0,x=S.charCodeAt(C),B=S.length,I=[{nodes:w}],T=0,M="",P="",R="";C{function t(e,t){var o,r,l=e.type,i=e.value;return t&&void 0!==(r=t(e))?r:"word"===l||"space"===l?i:"string"===l?(o=e.quote||"")+i+(e.unclosed?"":o):"comment"===l?"/*"+i+(e.unclosed?"":"*/"):"div"===l?(e.before||"")+i+(e.after||""):Array.isArray(e.nodes)?(o=n(e.nodes,t),"function"!==l?o:i+"("+(e.before||"")+o+(e.after||"")+(e.unclosed?"":")")):i}function n(e,n){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=t(e[r],n)+o;return o}return t(e,n)}e.exports=n},2280:e=>{var t="-".charCodeAt(0),n="+".charCodeAt(0),o=".".charCodeAt(0),r="e".charCodeAt(0),l="E".charCodeAt(0);e.exports=function(e){var i,s,a,c=0,u=e.length;if(0===u||!function(e){var r,l=e.charCodeAt(0);if(l===n||l===t){if((r=e.charCodeAt(1))>=48&&r<=57)return!0;var i=e.charCodeAt(2);return r===o&&i>=48&&i<=57}return l===o?(r=e.charCodeAt(1))>=48&&r<=57:l>=48&&l<=57}(e))return!1;for((i=e.charCodeAt(c))!==n&&i!==t||c++;c57);)c+=1;if(i=e.charCodeAt(c),s=e.charCodeAt(c+1),i===o&&s>=48&&s<=57)for(c+=2;c57);)c+=1;if(i=e.charCodeAt(c),s=e.charCodeAt(c+1),a=e.charCodeAt(c+2),(i===r||i===l)&&(s>=48&&s<=57||(s===n||s===t)&&a>=48&&a<=57))for(c+=s===n||s===t?3:2;c57);)c+=1;return{number:e.slice(0,c),unit:e.slice(c)}}},6714:e=>{e.exports=function e(t,n,o){var r,l,i,s;for(r=0,l=t.length;r{"use strict";let o=n(9795);class r extends o{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=r,r.default=r,o.registerAtRule(r)},9882:(e,t,n)=>{"use strict";let o=n(8753);class r extends o{constructor(e){super(e),this.type="comment"}}e.exports=r,r.default=r},9795:(e,t,n)=>{"use strict";let o,r,l,i,{isClean:s,my:a}=n(3719),c=n(5818),u=n(9882),d=n(8753);function p(e){return e.map((e=>(e.nodes&&(e.nodes=p(e.nodes)),delete e.source,e)))}function m(e){if(e[s]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)m(t)}class h extends d{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,o=this.getIterator();for(;this.indexes[o]"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,o=this.index(e),r=this.normalize(t,this.proxyOf.nodes[o]).reverse();o=this.index(e);for(let e of r)this.proxyOf.nodes.splice(o+1,0,e);for(let e in this.indexes)n=this.indexes[e],o(e[a]||h.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[s]&&m(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((o=>{t.props&&!t.props.includes(o.prop)||t.fast&&!o.value.includes(t.fast)||(o.value=o.value.replace(e,n))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,n)=>{let o;try{o=e(t,n)}catch(e){throw t.addToError(e)}return!1!==o&&t.walk&&(o=t.walk(e)),o}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("atrule"===n.type&&e.test(n.name))return t(n,o)})):this.walk(((n,o)=>{if("atrule"===n.type&&n.name===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("decl"===n.type&&e.test(n.prop))return t(n,o)})):this.walk(((n,o)=>{if("decl"===n.type&&n.prop===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,o)=>{if("rule"===n.type&&e.test(n.selector))return t(n,o)})):this.walk(((n,o)=>{if("rule"===n.type&&n.selector===e)return t(n,o)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}h.registerParse=e=>{o=e},h.registerRule=e=>{r=e},h.registerAtRule=e=>{l=e},h.registerRoot=e=>{i=e},e.exports=h,h.default=h,h.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,l.prototype):"rule"===e.type?Object.setPrototypeOf(e,r.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,i.prototype),e[a]=!0,e.nodes&&e.nodes.forEach((e=>{h.rebuild(e)}))}},8743:(e,t,n)=>{"use strict";let o=n(9122),r=n(2868);class l extends Error{constructor(e,t,n,o,r,i){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),o&&(this.source=o),i&&(this.plugin=i),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,l)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=o.isColorSupported),r&&e&&(t=r(t));let n,l,i=t.split(/\r?\n/),s=Math.max(this.line-3,0),a=Math.min(this.line+2,i.length),c=String(a).length;if(e){let{bold:e,gray:t,red:r}=o.createColors(!0);n=t=>e(r(t)),l=e=>t(e)}else n=l=e=>e;return i.slice(s,a).map(((e,t)=>{let o=s+1+t,r=" "+(" "+o).slice(-c)+" | ";if(o===this.line){let t=l(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+l(r)+e+"\n "+t+n("^")}return" "+l(r)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=l,l.default=l},5818:(e,t,n)=>{"use strict";let o=n(8753);class r extends o{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=r,r.default=r},3866:(e,t,n)=>{"use strict";let o,r,l=n(9795);class i extends l{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new o(new r,this,e).stringify()}}i.registerLazyResult=e=>{o=e},i.registerProcessor=e=>{r=e},e.exports=i,i.default=i},3667:(e,t,n)=>{"use strict";let o=n(5818),r=n(2393),l=n(9882),i=n(2433),s=n(9961),a=n(3823),c=n(5871);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:n,...d}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:s.prototype};n.map&&(n.map={...n.map,__proto__:r.prototype}),t.push(n)}}if(d.nodes&&(d.nodes=e.nodes.map((e=>u(e,t)))),d.source){let{inputId:e,...n}=d.source;d.source=n,null!=e&&(d.source.input=t[e])}if("root"===d.type)return new a(d);if("decl"===d.type)return new o(d);if("rule"===d.type)return new c(d);if("comment"===d.type)return new l(d);if("atrule"===d.type)return new i(d);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},9961:(e,t,n)=>{"use strict";let{SourceMapConsumer:o,SourceMapGenerator:r}=n(209),{fileURLToPath:l,pathToFileURL:i}=n(7414),{isAbsolute:s,resolve:a}=n(9830),{nanoid:c}=n(2961),u=n(2868),d=n(8743),p=n(2393),m=Symbol("fromOffsetCache"),h=Boolean(o&&r),g=Boolean(a&&s);class f{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!g||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=a(t.from)),g&&h){let e=new p(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,t,n,o={}){let r,l,s;if(t&&"object"==typeof t){let e=t,o=n;if("number"==typeof e.offset){let o=this.fromOffset(e.offset);t=o.line,n=o.col}else t=e.line,n=e.column;if("number"==typeof o.offset){let e=this.fromOffset(o.offset);l=e.line,s=e.col}else l=o.line,s=o.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let a=this.origin(t,n,l,s);return r=a?new d(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,o.plugin):new d(e,void 0===l?t:{column:n,line:t},void 0===l?n:{column:s,line:l},this.css,this.file,o.plugin),r.input={column:n,endColumn:s,endLine:l,line:t,source:this.css},this.file&&(i&&(r.input.url=i(this.file).toString()),r.input.file=this.file),r}fromOffset(e){let t,n;if(this[m])n=this[m];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let o=0,r=e.length;o=t)o=n.length-1;else{let t,r=n.length-2;for(;o>1),e=n[t+1])){o=t;break}o=t+1}}return{col:e-n[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,o){if(!this.map)return!1;let r,a,c=this.map.consumer(),u=c.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof n&&(r=c.originalPositionFor({column:o,line:n})),a=s(u.source)?i(u.source):new URL(u.source,this.map.consumer().sourceRoot||i(this.map.mapFile));let d={column:u.column,endColumn:r&&r.column,endLine:r&&r.line,line:u.line,url:a.toString()};if("file:"===a.protocol){if(!l)throw new Error("file: protocol is not available in this PostCSS build");d.file=l(a)}let p=c.sourceContentFor(u.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}e.exports=f,f.default=f,u&&u.registerInput&&u.registerInput(f)},3993:(e,t,n)=>{"use strict";let{isClean:o,my:r}=n(3719),l=n(2491),i=n(2530),s=n(9795),a=n(3866),c=(n(7892),n(2072)),u=n(9301),d=n(3823);const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},m={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0},g=0;function f(e){return"object"==typeof e&&"function"==typeof e.then}function b(e){let t=!1,n=p[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,g,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,g,n+"Exit"]:[n,n+"Exit"]}function v(e){let t;return t="document"===e.type?["Document",g,"DocumentExit"]:"root"===e.type?["Root",g,"RootExit"]:b(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function k(e){return e[o]=!1,e.nodes&&e.nodes.forEach((e=>k(e))),e}let _={};class y{constructor(e,t,n){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof y||t instanceof c)o=k(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=u;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(t,n)}catch(e){this.processed=!0,this.error=e}o&&!o[r]&&s.rebuild(o)}else o=k(t);this.result=new c(e,o,n),this.helpers={..._,postcss:_,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!m[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!h[n])if("object"==typeof t[n])for(let o in t[n])e(t,"*"===o?n:n+"-"+o.toLowerCase(),t[n][o]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>n(e,this.helpers)));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new l(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(f(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[o];)e[o]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,o]of e){let e;this.result.lastPlugin=n;try{e=o(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(r.length>0&&t.visitorIndex{e[o]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}y.registerPostcss=e=>{_=e},e.exports=y,y.default=y,d.registerLazyResult(y),a.registerLazyResult(y)},8446:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,n){let o=[],r="",l=!1,i=0,s=!1,a="",c=!1;for(let n of e)c?c=!1:"\\"===n?c=!0:s?n===a&&(s=!1):'"'===n||"'"===n?(s=!0,a=n):"("===n?i+=1:")"===n?i>0&&(i-=1):0===i&&t.includes(n)&&(l=!0),l?(""!==r&&o.push(r.trim()),r="",l=!1):r+=n;return(n||""!==r)&&o.push(r.trim()),o}};e.exports=t,t.default=t},2491:(e,t,n)=>{"use strict";let{SourceMapConsumer:o,SourceMapGenerator:r}=n(209),{dirname:l,relative:i,resolve:s,sep:a}=n(9830),{pathToFileURL:c}=n(7414),u=n(9961),d=Boolean(o&&r),p=Boolean(l&&s&&i&&a);e.exports=class{constructor(e,t,n,o){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||l(e.file);!1===this.mapOpts.sourcesContent?(t=new o(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map((()=>null)))):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),p&&d&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=r.fromSourceMap(e)}else this.map=new r({file:this.outputFile()}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new r({file:this.outputFile()});let e,t,n=1,o=1,l="",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((r,s,a)=>{if(this.css+=r,s&&"end"!==a&&(i.generated.line=n,i.generated.column=o-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=l,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=r.match(/\n/g),e?(n+=e.length,t=r.lastIndexOf("\n"),o=r.length-t):o+=r.length,s&&"start"!==a){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=n,i.generated.column=o-2,this.map.addMapping(i)):(i.source=l,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=o-1,this.map.addMapping(i)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?l(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=l(s(n,this.mapOpts.annotation)));let o=i(n,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let o=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(o,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===a&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}},2882:(e,t,n)=>{"use strict";let o=n(2491),r=n(2530),l=(n(7892),n(9301));const i=n(2072);class s{constructor(e,t,n){let l;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let s=r;this.result=new i(this._processor,l,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let c=new o(s,l,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=l;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=s,s.default=s},8753:(e,t,n)=>{"use strict";let{isClean:o,my:r}=n(3719),l=n(8743),i=n(3951),s=n(2530);function a(e,t){let n=new e.constructor;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if("proxyCache"===o)continue;let r=e[o],l=typeof r;"parent"===o&&"object"===l?t&&(n[o]=t):"source"===o?n[o]=r:Array.isArray(r)?n[o]=r.map((e=>a(e,n))):("object"===l&&null!==r&&(r=a(r)),n[o]=r)}return n}class c{constructor(e={}){this.raws={},this[o]=!1,this[r]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:o}=this.rangeBy(t);return this.source.input.error(e,{column:o.column,line:o.line},{column:n.column,line:n.line},t)}return new l(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[o]){this[o]=!1;let e=this;for(;e=e.parent;)e[o]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){let o=(t=this.toString()).indexOf(e.word);-1!==o&&(n=this.positionInside(o,t))}return n}positionInside(e,t){let n=t||this.toString(),o=this.source.start.column,r=this.source.start.line;for(let t=0;t"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof o&&o.toJSON)n[e]=o.toJSON(null,t);else if("source"===e){let l=t.get(o.input);null==l&&(l=r,t.set(o.input,r),r++),n[e]={end:o.end,inputId:l,start:o.start}}else n[e]=o}return o&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,n){let o={node:this};for(let e in n)o[e]=n[e];return e.warn(t,o)}get proxyOf(){return this}}e.exports=c,c.default=c},9301:(e,t,n)=>{"use strict";let o=n(9795),r=n(3915),l=n(9961);function i(e,t){let n=new l(e,t),o=new r(n);try{o.parse()}catch(e){throw e}return o.root}e.exports=i,i.default=i,o.registerParse(i)},3915:(e,t,n)=>{"use strict";let o=n(5818),r=n(9215),l=n(9882),i=n(2433),s=n(3823),a=n(5871);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,o,r=new i;r.name=e[1].slice(1),""===r.name&&this.unnamedAtrule(r,e),this.init(r,e[2]);let l=!1,s=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(a.length>0){for(o=a.length-1,n=a[o];n&&"space"===n[0];)n=a[--o];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(r.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(r,"params",a),l&&(e=a[a.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),s&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,o=0;for(let r=t-1;r>=0&&(n=e[r],"space"===n[0]||(o+=1,2!==o));r--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,o,r=0;for(let[l,i]of e.entries()){if(t=i,n=t[0],"("===n&&(r+=1),")"===n&&(r-=1),0===r&&":"===n){if(o){if("word"===o[0]&&"progid"===o[1])continue;return l}this.doubleColon(t)}o=t}return!1}comment(e){let t=new l;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=r(this.input)}decl(e,t){let n=new o;this.init(n,e[0][2]);let r,l=e[e.length-1];for(";"===l[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(l[3]||l[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],o=n[3]||n[2];if(o)return o}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let i,s=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)s.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(r=e[t],"!important"===r[1].toLowerCase()){n.important=!0;let o=this.stringFrom(e,t);o=this.spacesFromEnd(e)+o," !important"!==o&&(n.raws.important=o);break}if("important"===r[1].toLowerCase()){let o=e.slice(0),r="";for(let e=t;e>0;e--){let t=o[e][0];if(0===r.trim().indexOf("!")&&"space"!==t)break;r=o.pop()[1]+r}0===r.trim().indexOf("!")&&(n.important=!0,n.raws.important=r,e=o)}if("space"!==r[0]&&"comment"!==r[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=s.map((e=>e[1])).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n=null,o=!1,r=null,l=[],i=e[1].startsWith("--"),s=[],a=e;for(;a;){if(n=a[0],s.push(a),"("===n||"["===n)r||(r=a),l.push("("===n?")":"]");else if(i&&o&&"{"===n)r||(r=a),l.push("}");else if(0===l.length){if(";"===n){if(o)return void this.decl(s,i);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(o=!0)}else n===l[l.length-1]&&(l.pop(),0===l.length&&(r=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(r),t&&o){if(!i)for(;s.length&&(a=s[s.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(s.pop());this.decl(s,i)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,o){let r,l,i,s,a=n.length,u="",d=!0;for(let e=0;ee+t[1]),"");e.raws[t]={raw:o,value:u}}e[t]=u}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let o=t;o{"use strict";let o=n(8743),r=n(5818),l=n(3993),i=n(9795),s=n(5937),a=n(2530),c=n(3667),u=n(3866),d=n(9871),p=n(9882),m=n(2433),h=n(2072),g=n(9961),f=n(9301),b=n(8446),v=n(5871),k=n(3823),_=n(8753);function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new s(e)}y.plugin=function(e,t){let n,o=!1;function r(...n){console&&console.warn&&!o&&(o=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let r=t(...n);return r.postcssPlugin=e,r.postcssVersion=(new s).version,r}return Object.defineProperty(r,"postcss",{get:()=>(n||(n=r()),n)}),r.process=function(e,t,n){return y([r(n)]).process(e,t)},r},y.stringify=a,y.parse=f,y.fromJSON=c,y.list=b,y.comment=e=>new p(e),y.atRule=e=>new m(e),y.decl=e=>new r(e),y.rule=e=>new v(e),y.root=e=>new k(e),y.document=e=>new u(e),y.CssSyntaxError=o,y.Declaration=r,y.Container=i,y.Processor=s,y.Document=u,y.Comment=p,y.Warning=d,y.AtRule=m,y.Result=h,y.Input=g,y.Rule=v,y.Root=k,y.Node=_,l.registerPostcss(y),e.exports=y,y.default=y},2393:(e,t,n)=>{"use strict";let{SourceMapConsumer:o,SourceMapGenerator:r}=n(209),{existsSync:l,readFileSync:i}=n(4777),{dirname:s,join:a}=n(9830);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,o=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new o(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),o=e.indexOf("*/",n);n>-1&&o>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,o)))}loadFile(e){if(this.root=s(e),l(e))return this.mapFile=e,i(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof o)return r.fromSourceMap(t).toString();if(t instanceof r)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=a(s(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},5937:(e,t,n)=>{"use strict";let o=n(2882),r=n(3993),l=n(3866),i=n(3823);class s{constructor(e=[]){this.version="8.4.31",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return 0===this.plugins.length&&void 0===t.parser&&void 0===t.stringifier&&void 0===t.syntax?new o(this,e,t):new r(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=s,s.default=s,i.registerProcessor(s),l.registerProcessor(s)},2072:(e,t,n)=>{"use strict";let o=n(9871);class r{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new o(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=r,r.default=r},3823:(e,t,n)=>{"use strict";let o,r,l=n(9795);class i extends l{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let o=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of o)e.raws.before=t.raws.before;return o}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new o(new r,this,e).stringify()}}i.registerLazyResult=e=>{o=e},i.registerProcessor=e=>{r=e},e.exports=i,i.default=i,l.registerRoot(i)},5871:(e,t,n)=>{"use strict";let o=n(9795),r=n(8446);class l extends o{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return r.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}e.exports=l,l.default=l,o.registerRule(l)},3951:e=>{"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class n{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,o=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o);else{let r=(e.raws.between||"")+(t?";":"");this.builder(n+o+r,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let o=e.parent,r=0;for(;o&&"root"!==o.type;)r+=1,o=o.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let o=0;o{if(r=e.raws[n],void 0!==r)return!1}))}var s;return void 0===r&&(r=t[o]),i.rawCache[o]=r,r}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let o=n.parent;if(o&&o!==e&&o.parent&&o.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let n=e[t],o=e.raws[t];return o&&o.value===n?o.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=n,n.default=n},2530:(e,t,n)=>{"use strict";let o=n(3951);function r(e,t){new o(t).stringify(e)}e.exports=r,r.default=r},3719:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},9215:e=>{"use strict";const t="'".charCodeAt(0),n='"'.charCodeAt(0),o="\\".charCodeAt(0),r="/".charCodeAt(0),l="\n".charCodeAt(0),i=" ".charCodeAt(0),s="\f".charCodeAt(0),a="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),d="]".charCodeAt(0),p="(".charCodeAt(0),m=")".charCodeAt(0),h="{".charCodeAt(0),g="}".charCodeAt(0),f=";".charCodeAt(0),b="*".charCodeAt(0),v=":".charCodeAt(0),k="@".charCodeAt(0),_=/[\t\n\f\r "#'()/;[\\\]{}]/g,y=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,E=/.[\r\n"'(/\\]/,w=/[\da-f]/i;e.exports=function(e,S={}){let C,x,B,I,T,M,P,R,N,A,L=e.css.valueOf(),O=S.ignoreErrors,D=L.length,z=0,V=[],F=[];function H(t){throw e.error("Unclosed "+t,z)}return{back:function(e){F.push(e)},endOfFile:function(){return 0===F.length&&z>=D},nextToken:function(e){if(F.length)return F.pop();if(z>=D)return;let S=!!e&&e.ignoreUnclosed;switch(C=L.charCodeAt(z),C){case l:case i:case a:case c:case s:x=z;do{x+=1,C=L.charCodeAt(x)}while(C===i||C===l||C===a||C===c||C===s);A=["space",L.slice(z,x)],z=x-1;break;case u:case d:case h:case g:case v:case f:case m:{let e=String.fromCharCode(C);A=[e,e,z];break}case p:if(R=V.length?V.pop()[1]:"",N=L.charCodeAt(z+1),"url"===R&&N!==t&&N!==n&&N!==i&&N!==l&&N!==a&&N!==s&&N!==c){x=z;do{if(M=!1,x=L.indexOf(")",x+1),-1===x){if(O||S){x=z;break}H("bracket")}for(P=x;L.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);A=["brackets",L.slice(z,x+1),z,x],z=x}else x=L.indexOf(")",z+1),I=L.slice(z,x+1),-1===x||E.test(I)?A=["(","(",z]:(A=["brackets",I,z,x],z=x);break;case t:case n:B=C===t?"'":'"',x=z;do{if(M=!1,x=L.indexOf(B,x+1),-1===x){if(O||S){x=z+1;break}H("string")}for(P=x;L.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);A=["string",L.slice(z,x+1),z,x],z=x;break;case k:_.lastIndex=z+1,_.test(L),x=0===_.lastIndex?L.length-1:_.lastIndex-2,A=["at-word",L.slice(z,x+1),z,x],z=x;break;case o:for(x=z,T=!0;L.charCodeAt(x+1)===o;)x+=1,T=!T;if(C=L.charCodeAt(x+1),T&&C!==r&&C!==i&&C!==l&&C!==a&&C!==c&&C!==s&&(x+=1,w.test(L.charAt(x)))){for(;w.test(L.charAt(x+1));)x+=1;L.charCodeAt(x+1)===i&&(x+=1)}A=["word",L.slice(z,x+1),z,x],z=x;break;default:C===r&&L.charCodeAt(z+1)===b?(x=L.indexOf("*/",z+2)+1,0===x&&(O||S?x=L.length:H("comment")),A=["comment",L.slice(z,x+1),z,x],z=x):(y.lastIndex=z+1,y.test(L),x=0===y.lastIndex?L.length-1:y.lastIndex-2,A=["word",L.slice(z,x+1),z,x],V.push(A),z=x)}return z++,A},position:function(){return z}}}},7892:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},9871:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},5372:(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 s=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 s.name="Invariant Violation",s}}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:(e,t,n)=>{e.exports=n(5372)()},9567: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;n{"use strict";var o=n(5438);t.Z=o.TextareaAutosize},4793:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),r=new RegExp(n,"");function l(e){return t[e]}var i=function(e){return e.replace(o,l)};e.exports=i,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=i},9196:e=>{"use strict";e.exports=window.React},2868:()=>{},4777:()=>{},9830:()=>{},209:()=>{},7414:()=>{},2961:e=>{e.exports={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let o="",r=n;for(;r--;)o+=e[Math.random()*e.length|0];return o}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var l=t[o]={exports:{}};return e[o].call(l.exports,l,l.exports,n),l.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentControl:()=>Cg,AlignmentToolbar:()=>xg,Autocomplete:()=>tf,BlockAlignmentControl:()=>Ji,BlockAlignmentToolbar:()=>es,BlockBreadcrumb:()=>cf,BlockCanvas:()=>MC,BlockColorsStyleSelector:()=>AC,BlockContextProvider:()=>pf,BlockControls:()=>xl,BlockEdit:()=>bf,BlockEditorKeyboardShortcuts:()=>M_,BlockEditorProvider:()=>R_,BlockFormatControls:()=>Cl,BlockIcon:()=>qh,BlockInspector:()=>AT,BlockList:()=>Vw,BlockMover:()=>lS,BlockNavigationDropdown:()=>gx,BlockPreview:()=>vy,BlockSelectionClearer:()=>A_,BlockSettingsMenu:()=>aC,BlockSettingsMenuControls:()=>jh,BlockStyles:()=>vx,BlockTitle:()=>af,BlockToolbar:()=>EC,BlockTools:()=>IC,BlockVerticalAlignmentControl:()=>di,BlockVerticalAlignmentToolbar:()=>pi,ButtonBlockAppender:()=>QE,ButtonBlockerAppender:()=>XE,ColorPalette:()=>jx,ColorPaletteControl:()=>Wx,ContrastChecker:()=>Xu,CopyHandler:()=>OT,DefaultBlockAppender:()=>qE,FontSizePicker:()=>gg,HeadingLevelDropdown:()=>wx,HeightControl:()=>Np,InnerBlocks:()=>Mw,Inserter:()=>ZE,InspectorAdvancedControls:()=>Cs,InspectorControls:()=>xs,JustifyContentControl:()=>gi,JustifyToolbar:()=>fi,LineHeightControl:()=>Sd,MediaPlaceholder:()=>WB,MediaReplaceFlow:()=>Ja,MediaUpload:()=>Hs,MediaUploadCheck:()=>Gs,MultiSelectScrollIntoView:()=>VT,NavigableToolbar:()=>kC,ObserveTyping:()=>Aw,PanelColorSettings:()=>KB,PlainText:()=>NI,RecursionProvider:()=>WT,ReusableBlocksRenameHint:()=>aM,RichText:()=>MI,RichTextShortcut:()=>OI,RichTextToolbarButton:()=>DI,SETTINGS_DEFAULTS:()=>I,SkipToSelectedBlock:()=>eT,ToolSelector:()=>FI,Typewriter:()=>$T,URLInput:()=>ea,URLInputButton:()=>$I,URLPopover:()=>GB,Warning:()=>kf,WritingFlow:()=>X_,__experimentalBlockAlignmentMatrixControl:()=>lf,__experimentalBlockFullHeightAligmentControl:()=>of,__experimentalBlockPatternSetup:()=>Vx,__experimentalBlockPatternsList:()=>Ky,__experimentalBlockVariationPicker:()=>Cx,__experimentalBlockVariationTransforms:()=>Ux,__experimentalBorderRadiusControl:()=>iu,__experimentalColorGradientControl:()=>Ou,__experimentalColorGradientSettingsDropdown:()=>eB,__experimentalDateFormatPicker:()=>qx,__experimentalDuotoneControl:()=>Fm,__experimentalFontAppearanceControl:()=>Ed,__experimentalFontFamilyControl:()=>vd,__experimentalGetBorderClassesAndStyles:()=>eg,__experimentalGetColorClassesAndStyles:()=>og,__experimentalGetElementClassName:()=>uM,__experimentalGetGapCSSValue:()=>ni,__experimentalGetGradientClass:()=>Bu,__experimentalGetGradientObjectByGradientValue:()=>Tu,__experimentalGetShadowClassesAndStyles:()=>ng,__experimentalGetSpacingClassesAndStyles:()=>lg,__experimentalImageEditor:()=>LB,__experimentalImageSizeControl:()=>zB,__experimentalImageURLInputUI:()=>XI,__experimentalInspectorPopoverHeader:()=>XT,__experimentalLetterSpacingControl:()=>Cd,__experimentalLibrary:()=>zT,__experimentalLinkControl:()=>Ya,__experimentalLinkControlSearchInput:()=>Pa,__experimentalLinkControlSearchItem:()=>fa,__experimentalLinkControlSearchResults:()=>wa,__experimentalListView:()=>mx,__experimentalPanelColorGradientSettings:()=>rB,__experimentalPreviewOptions:()=>QI,__experimentalPublishDateTimePicker:()=>QT,__experimentalRecursionProvider:()=>ZT,__experimentalResponsiveBlockControl:()=>LI,__experimentalSpacingSizesControl:()=>Pp,__experimentalTextDecorationControl:()=>Ld,__experimentalTextTransformControl:()=>Pd,__experimentalUnitControl:()=>HI,__experimentalUseBlockOverlayActive:()=>uf,__experimentalUseBlockPreview:()=>ky,__experimentalUseBorderProps:()=>tg,__experimentalUseColorProps:()=>rg,__experimentalUseCustomSides:()=>mm,__experimentalUseGradient:()=>Pu,__experimentalUseHasRecursion:()=>qT,__experimentalUseMultipleOriginColorsAndGradients:()=>Wc,__experimentalUseResizeCanvas:()=>JI,__experimentalWritingModeControl:()=>Vd,__unstableBlockNameContext:()=>fC,__unstableBlockSettingsMenuFirstItem:()=>nC,__unstableBlockToolbarLastItem:()=>VS,__unstableEditorStyles:()=>my,__unstableIframe:()=>ny,__unstableInserterMenuExtension:()=>LE,__unstableRichTextInputEvent:()=>zI,__unstableUseBlockSelectionClearer:()=>N_,__unstableUseClipboardHandler:()=>LT,__unstableUseMouseMoveTypingReset:()=>Rw,__unstableUseTypewriter:()=>UT,__unstableUseTypingObserver:()=>Nw,createCustomColorsHOC:()=>mg,getColorClassName:()=>jc,getColorObjectByAttributeValues:()=>Uc,getColorObjectByColorValue:()=>$c,getComputedFluidTypographyValue:()=>Gr,getCustomValueFromPreset:()=>Xl,getFontSize:()=>sp,getFontSizeClass:()=>cp,getFontSizeObjectByValue:()=>ap,getGradientSlugByValue:()=>Mu,getGradientValueBySlug:()=>Iu,getPxFromCssUnit:()=>dM,getSpacingPresetCssVar:()=>Jl,getTypographyClassesAndStyles:()=>ig,isValueSpacingPreset:()=>Yl,privateApis:()=>SR,store:()=>wr,storeConfig:()=>Er,transformStyles:()=>dy,useBlockCommands:()=>iM,useBlockDisplayInformation:()=>ih,useBlockEditContext:()=>y,useBlockEditingMode:()=>ts,useBlockProps:()=>h_,useCachedTruthy:()=>sg,useHasRecursion:()=>KT,useInnerBlocksProps:()=>Tw,useSetting:()=>Lr,useSettings:()=>Ar,withColorContext:()=>$x,withColors:()=>hg,withFontSizes:()=>vg});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:()=>un,__experimentalGetAllowedBlocks:()=>Ft,__experimentalGetAllowedPatterns:()=>jt,__experimentalGetBlockListSettingsForBlocks:()=>Qt,__experimentalGetDirectInsertBlock:()=>Gt,__experimentalGetGlobalBlocksByName:()=>_e,__experimentalGetLastBlockAttributeChanges:()=>tn,__experimentalGetParsedPattern:()=>Ut,__experimentalGetPatternTransformItems:()=>Zt,__experimentalGetPatternsByBlockTypes:()=>Kt,__experimentalGetReusableBlockTitle:()=>Jt,__unstableGetBlockWithoutInnerBlocks:()=>pe,__unstableGetClientIdWithClientIdsTree:()=>he,__unstableGetClientIdsTree:()=>ge,__unstableGetContentLockingParent:()=>hn,__unstableGetEditorMode:()=>rn,__unstableGetSelectedBlocksWithPartialSelection:()=>tt,__unstableGetTemporarilyEditingAsBlocks:()=>gn,__unstableGetTemporarilyEditingFocusModeToRevert:()=>fn,__unstableGetVisibleBlocks:()=>mn,__unstableHasActiveBlockOverlayActive:()=>bn,__unstableIsFullySelected:()=>Xe,__unstableIsLastBlockChangeIgnored:()=>en,__unstableIsSelectionCollapsed:()=>Qe,__unstableIsSelectionMergeable:()=>et,__unstableIsWithinBlockOverlay:()=>vn,__unstableSelectionHasUnmergeableBlock:()=>Je,areInnerBlocksControlled:()=>cn,canEditBlock:()=>Mt,canInsertBlockType:()=>St,canInsertBlocks:()=>Ct,canLockBlockType:()=>Pt,canMoveBlock:()=>It,canMoveBlocks:()=>Tt,canRemoveBlock:()=>xt,canRemoveBlocks:()=>Bt,didAutomaticChange:()=>sn,getAdjacentBlockClientId:()=>De,getAllowedBlocks:()=>Vt,getBlock:()=>de,getBlockAttributes:()=>ue,getBlockCount:()=>we,getBlockEditingMode:()=>kn,getBlockHierarchyRootClientId:()=>Le,getBlockIndex:()=>ot,getBlockInsertionPoint:()=>vt,getBlockListSettings:()=>qt,getBlockMode:()=>dt,getBlockName:()=>ae,getBlockNamesByClientId:()=>Ee,getBlockOrder:()=>nt,getBlockParents:()=>Ne,getBlockParentsByBlockName:()=>Ae,getBlockRootClientId:()=>Re,getBlockSelectionEnd:()=>Be,getBlockSelectionStart:()=>xe,getBlockTransformItems:()=>Dt,getBlocks:()=>me,getBlocksByClientId:()=>ye,getBlocksByName:()=>ke,getClientIdsOfDescendants:()=>fe,getClientIdsWithDescendants:()=>be,getDirectInsertBlock:()=>Ht,getDraggedBlockClientIds:()=>ht,getFirstMultiSelectedBlockClientId:()=>$e,getGlobalBlockCount:()=>ve,getInserterItems:()=>Ot,getLastMultiSelectedBlockClientId:()=>je,getLowestCommonAncestorWithSelectedBlock:()=>Oe,getMultiSelectedBlockClientIds:()=>Ge,getMultiSelectedBlocks:()=>Ue,getMultiSelectedBlocksEndClientId:()=>Ye,getMultiSelectedBlocksStartClientId:()=>qe,getNextBlockClientId:()=>Ve,getPatternsByBlockTypes:()=>Wt,getPreviousBlockClientId:()=>ze,getSelectedBlock:()=>Pe,getSelectedBlockClientId:()=>Me,getSelectedBlockClientIds:()=>He,getSelectedBlockCount:()=>Ie,getSelectedBlocksInitialCaretPosition:()=>Fe,getSelectionEnd:()=>Ce,getSelectionStart:()=>Se,getSettings:()=>Yt,getTemplate:()=>yt,getTemplateLock:()=>Et,hasBlockMovingClientId:()=>ln,hasDraggedInnerBlock:()=>it,hasInserterItems:()=>zt,hasMultiSelection:()=>at,hasSelectedBlock:()=>Te,hasSelectedInnerBlock:()=>lt,isAncestorBeingDragged:()=>ft,isAncestorMultiSelected:()=>Ze,isBlockBeingDragged:()=>gt,isBlockHighlighted:()=>an,isBlockInsertionPointVisible:()=>kt,isBlockMultiSelected:()=>Ke,isBlockSelected:()=>rt,isBlockValid:()=>ce,isBlockVisible:()=>pn,isBlockWithinSelection:()=>st,isCaretWithinFormattedText:()=>bt,isDraggingBlocks:()=>mt,isFirstMultiSelectedBlock:()=>We,isGroupable:()=>yn,isLastBlockChangePersistent:()=>Xt,isMultiSelecting:()=>ct,isNavigationMode:()=>on,isSelectionEnabled:()=>ut,isTyping:()=>pt,isUngroupable:()=>_n,isValidTemplate:()=>_t,wasBlockJustInserted:()=>dn});var t={};n.r(t),n.d(t,{__experimentalUpdateSettings:()=>Sn,clearBlockRemovalPrompt:()=>Tn,deleteStyleOverride:()=>Nn,ensureDefaultBlock:()=>In,hideBlockInterface:()=>Cn,privateRemoveBlocks:()=>Bn,registerBlockBindingsSource:()=>Dn,setBlockRemovalRules:()=>Mn,setLastFocus:()=>Ln,setOpenedBlockSettingsMenu:()=>Pn,setStyleOverride:()=>Rn,showBlockInterface:()=>xn,stopEditingAsBlocks:()=>On,syncDerivedUpdates:()=>An});var r={};n.r(r),n.d(r,{getAllBlockBindingsSources:()=>ro,getAllPatterns:()=>no,getBlockBindingsSource:()=>lo,getBlockRemovalRules:()=>qn,getEnabledBlockParents:()=>Kn,getEnabledClientIdsTree:()=>Wn,getFetchedPatterns:()=>eo,getInserterMediaCategories:()=>Jn,getLastFocus:()=>oo,getLastInsertedBlocksClientIds:()=>$n,getOpenedBlockSettingsMenu:()=>Yn,getRegisteredInserterMediaCategories:()=>Qn,getRemovalPromptData:()=>Zn,getStyleOverrides:()=>Xn,hasAllowedPatterns:()=>to,isBlockInterfaceHidden:()=>Un,isBlockSubtreeDisabled:()=>jn});var l={};n.r(l),n.d(l,{getFetchedPatterns:()=>io});var i={};n.r(i),n.d(i,{__unstableDeleteSelection:()=>Fo,__unstableExpandSelection:()=>Go,__unstableMarkAutomaticChange:()=>sr,__unstableMarkLastChangeAsPersistent:()=>lr,__unstableMarkNextChangeAsNotPersistent:()=>ir,__unstableSaveReusableBlock:()=>rr,__unstableSetEditorMode:()=>cr,__unstableSetTemporarilyEditingAsBlocks:()=>vr,__unstableSplitSelection:()=>Ho,clearSelectedBlock:()=>So,duplicateBlocks:()=>dr,enterFormattedText:()=>Qo,exitFormattedText:()=>Jo,flashBlock:()=>gr,hideInsertionPoint:()=>Do,insertAfterBlock:()=>mr,insertBeforeBlock:()=>pr,insertBlock:()=>Ao,insertBlocks:()=>Lo,insertDefaultBlock:()=>tr,mergeBlocks:()=>Uo,moveBlockToPosition:()=>No,moveBlocksDown:()=>Mo,moveBlocksToPosition:()=>Ro,moveBlocksUp:()=>Po,multiSelect:()=>wo,receiveBlocks:()=>go,registerInserterMediaCategory:()=>kr,removeBlock:()=>jo,removeBlocks:()=>$o,replaceBlock:()=>Io,replaceBlocks:()=>Bo,replaceInnerBlocks:()=>Wo,resetBlocks:()=>po,resetSelection:()=>ho,selectBlock:()=>vo,selectNextBlock:()=>_o,selectPreviousBlock:()=>ko,selectionChange:()=>er,setBlockEditingMode:()=>_r,setBlockMovingClientId:()=>ur,setBlockVisibility:()=>br,setHasControlledInnerBlocks:()=>fr,setNavigationMode:()=>ar,setTemplateValidity:()=>zo,showInsertionPoint:()=>Oo,startDraggingBlocks:()=>Yo,startMultiSelect:()=>yo,startTyping:()=>Zo,stopDraggingBlocks:()=>Xo,stopMultiSelect:()=>Eo,stopTyping:()=>qo,synchronizeTemplate:()=>Vo,toggleBlockHighlight:()=>hr,toggleBlockMode:()=>Ko,toggleSelection:()=>Co,unsetBlockEditingMode:()=>yr,updateBlock:()=>bo,updateBlockAttributes:()=>fo,updateBlockListSettings:()=>nr,updateSettings:()=>or,validateBlocksToTemplate:()=>mo});var s={};n.r(s),n.d(s,{AdvancedPanel:()=>MM,BorderPanel:()=>hu,ColorPanel:()=>Yu,DimensionsPanel:()=>Jp,EffectsPanel:()=>km,FiltersPanel:()=>Jm,GlobalStylesContext:()=>nl,ImageSettingsPanel:()=>TM,TypographyPanel:()=>ep,areGlobalStyleConfigsEqual:()=>tl,getBlockCSSSelector:()=>$m,getGlobalStylesChanges:()=>zM,getLayoutStyles:()=>bM,useGlobalSetting:()=>il,useGlobalStyle:()=>sl,useGlobalStylesOutput:()=>BM,useGlobalStylesOutputWithConfig:()=>xM,useGlobalStylesReset:()=>ll,useHasBorderPanel:()=>su,useHasColorPanel:()=>Du,useHasDimensionsPanel:()=>Fp,useHasEffectsPanel:()=>gm,useHasFiltersPanel:()=>Km,useHasImageSettingsPanel:()=>IM,useHasTypographyPanel:()=>Gd,useSettingsForBlockElement:()=>al});var a=n(9196),c=n.n(a);const u=window.wp.blocks,d=window.wp.element,p=window.wp.data,m=window.wp.compose,h=window.wp.hooks,g=Symbol("mayDisplayControls"),f=Symbol("mayDisplayParentControls"),b=Symbol("blockEditingMode"),v={name:"",isSelected:!1},k=(0,d.createContext)(v),{Provider:_}=k;function y(){return(0,d.useContext)(k)}const E=window.wp.deprecated;var w=n.n(E),S=n(5619),C=n.n(S);const x=window.wp.i18n,B={insertUsage:{}},I={alignWide:!1,supportsLayout:!0,colors:[{name:(0,x.__)("Black"),slug:"black",color:"#000000"},{name:(0,x.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,x.__)("White"),slug:"white",color:"#ffffff"},{name:(0,x.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,x.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,x.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,x.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,x.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,x.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,x.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,x.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,x.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,x._x)("Small","font size name"),size:13,slug:"small"},{name:(0,x._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,x._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,x._x)("Large","font size name"),size:36,slug:"large"},{name:(0,x._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,x.__)("Thumbnail")},{slug:"medium",name:(0,x.__)("Medium")},{slug:"large",name:(0,x.__)("Large")},{slug:"full",name:(0,x.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__unstableGalleryWithImageBlocks:!1,__unstableIsPreviewMode:!1,blockInspectorAnimation:{animationParent:"core/navigation","core/navigation":{enterDirection:"leftToRight"},"core/navigation-submenu":{enterDirection:"rightToLeft"},"core/navigation-link":{enterDirection:"rightToLeft"},"core/search":{enterDirection:"rightToLeft"},"core/social-links":{enterDirection:"rightToLeft"},"core/page-list":{enterDirection:"rightToLeft"},"core/spacer":{enterDirection:"rightToLeft"},"core/home-link":{enterDirection:"rightToLeft"},"core/site-title":{enterDirection:"rightToLeft"},"core/site-logo":{enterDirection:"rightToLeft"}},generateAnchors:!1,gradients:[{name:(0,x.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,x.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,x.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,x.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,x.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,x.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,x.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,x.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,x.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,x.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,x.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,x.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function T(e,t,n){return[...e.slice(0,n),...Array.isArray(t)?t:[t],...e.slice(n)]}function M(e,t,n,o=1){const r=[...e];return r.splice(t,o),T(r,e.slice(t,t+o),n)}const P=e=>e;function R(e,t=""){const n=new Map,o=[];return n.set(t,o),e.forEach((e=>{const{clientId:t,innerBlocks:r}=e;o.push(t),R(r,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function N(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 A(e,t=P){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 L(e){return A(e,(e=>{const{attributes:t,...n}=e;return n}))}function O(e){return A(e,(e=>e.attributes))}function D(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&C()(e.clientIds,t.clientIds)&&function(e,t){return C()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function z(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 V(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 F=(0,m.pipe)(p.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),z(o,n.blocks),V(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)}),V(o,[n.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":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)})})),V(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)})),z(o,n.blocks),V(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));V(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)})),V(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),V(o,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=new Map(o.tree),V(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})})),V(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(L(n.blocks)),attributes:new Map(O(n.blocks)),order:R(n.blocks),parents:new Map(N(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(t?.tree),z(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,o=!1;return(r,l)=>{let i,s=e(r,l);var a;"SET_EXPLICIT_PERSISTENT"===l.type&&(n=l.isPersistentChange,i=null===(a=r.isPersistentChange)||void 0===a||a);if(void 0!==n)return i=n,i===s.isPersistentChange?s:{...s,isPersistentChange:i};const c="MARK_LAST_CHANGE_AS_PERSISTENT"===l.type||o;var u;return r!==s||c?(s={...s,isPersistentChange:c?!o:!D(l,t)},t=l,o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===l.type,s):(o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===l.type,i=null===(u=r?.isPersistentChange)||void 0===u||u,r.isPersistentChange===i?r:{...s,isPersistentChange:i})}}),(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 L(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)})),L(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 O(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"SYNC_DERIVED_BLOCK_ATTRIBUTES":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 s=!1;const a=e.get(l),c={};i.forEach((([e,t])=>{a[e]!==t&&(s=!0,c[e]=t)})),o=o||s,s&&r.set(l,{...a,...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)})),O(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=R(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=R(t.blocks,n),{index:l=o.length}=t,i=new Map(e);return r.forEach(((e,t)=>{i.set(t,e)})),i.set(n,T(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,M(e.get(r),t,i,l.length)),n}const s=new Map(e);return s.set(n,null!==(o=e.get(n)?.filter((e=>!l.includes(e))))&&void 0!==o?o:[]),s.set(r,T(e.get(r),l,i)),s}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),s=new Map(e);return s.set(o,M(l,i,i-1,n.length)),s}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 s=i.indexOf(r),a=new Map(e);return a.set(o,M(i,s,s+1,n.length)),a}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=R(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 N(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return N(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)})),N(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})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function H(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 G=(0,p.combineReducers)({blocks:F,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,s=e?.selectionEnd?.clientId;if(!i&&!s)return e;if(!t.blocks.some((e=>e.clientId===i)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===s)))return{...e,selectionEnd:e.selectionStart}}const n=H(e.selectionStart,t),o=H(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 C()(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,nearestSide:i}=t,s={rootClientId:n,index:o,__unstableWithInserter:r,operation:l,nearestSide:i};return C()(e,s)?e:s}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=I,t){return"UPDATE_SETTINGS"===t.type?t.reset?{...I,...t.settings}:{...e,...t.settings}:e},preferences:function(e=B,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,p.select)(u.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},lastFocus:function(e=!1,t){return"LAST_FOCUS"===t.type?t.lastFocus: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},temporarilyEditingFocusModeRevert:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.focusModeToRevert: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},blockBindingsSources:function(e={},t){return"REGISTER_BLOCK_BINDINGS_SOURCE"===t.type?{...e,[t.sourceName]:{label:t.sourceLabel,useSource:t.useSource,lockAttributesEditing:t.lockAttributesEditing}}:e},blockPatterns:function(e=[],t){return"RECEIVE_BLOCK_PATTERNS"===t.type?t.patterns:e}});const U=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}}(G);var $={};function j(e){return[e]}function W(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,Q=(e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){const e=n.shift();if(!X(t,e.name||e.blockName,!0))return!1;e.innerBlocks?.forEach((e=>{n.push(e)}))}return!0},J=e=>[e.settings.__experimentalBlockPatterns,e.settings.__experimentalUserPatternCategories,e.settings.__experimentalReusableBlocks,e.settings.__experimentalFetchBlockPatterns,e.blockPatterns],ee=(e,t,n)=>(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 s=t.findIndex((e=>e===o)),a=t.findIndex((e=>e===r));return s>a?1:a>s?-1:0};function te(e,t,n="asc"){return e.concat().sort(ee(t,e,n))}const ne="core/block-editor",oe=window.wp.privateApis,{lock:re,unlock:le}=(0,oe.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/block-editor"),ie=[],se=new Set;function ae(e,t){const n=e.blocks.byClientId.get(t),o="core/social-link";if("web"!==d.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 ce(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function ue(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function de(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const pe=K(((e,t)=>e.blocks.byClientId.has(t)?{...e.blocks.byClientId.get(t),attributes:ue(e,t)}:null),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function me(e,t){const n=t&&cn(e,t)?"controlled||"+t:t||"";return e.blocks.tree.get(n)?.innerBlocks||ie}const he=K(((e,t)=>(w()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:ge(e,t)})),(e=>[e.blocks.order])),ge=K(((e,t="")=>(w()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),nt(e,t).map((t=>he(e,t))))),(e=>[e.blocks.order])),fe=K(((e,t)=>{const n=Array.isArray(t)?t:[t],o=[];for(const t of n)for(const n of nt(e,t))o.push(n,...fe(e,n));return o}),(e=>[e.blocks.order])),be=K((e=>{const t=[];for(const n of nt(e))t.push(n,...fe(e,n));return t}),(e=>[e.blocks.order])),ve=K(((e,t)=>{const n=be(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])),ke=K(((e,t)=>{if(!t)return ie;const n=Array.isArray(t)?t:[t],o=be(e).filter((t=>{const o=e.blocks.byClientId.get(t);return n.includes(o.name)}));return o.length>0?o:ie}),(e=>[e.blocks.order,e.blocks.byClientId]));function _e(e,t){return w()("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),ke(e,t)}const ye=K(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>de(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),Ee=K(((e,t)=>ye(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>ye(e,t)));function we(e,t){return nt(e,t).length}function Se(e){return e.selection.selectionStart}function Ce(e){return e.selection.selectionEnd}function xe(e){return e.selection.selectionStart.clientId}function Be(e){return e.selection.selectionEnd.clientId}function Ie(e){const t=Ge(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function Te(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function Me(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function Pe(e){const t=Me(e);return t?de(e,t):null}function Re(e,t){return e.blocks.parents.has(t)?e.blocks.parents.get(t):null}const Ne=K(((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():ie}),(e=>[e.blocks.parents])),Ae=K(((e,t,n,o=!1)=>{const r=Ne(e,t,o),l=Array.isArray(n)?e=>n.includes(e):e=>n===e;return r.filter((t=>l(ae(e,t))))}),(e=>[e.blocks.parents]));function Le(e,t){let n,o=t;do{n=o,o=e.blocks.parents.get(o)}while(o);return n}function Oe(e,t){const n=Me(e),o=[...Ne(e,t),t],r=[...Ne(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 ie;if(t.clientId===n.clientId)return[t.clientId];const o=Re(e,t.clientId);if(null===o)return ie;const r=nt(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 Ge(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?ie:He(e)}const Ue=K((e=>{const t=Ge(e);return t.length?t.map((t=>de(e,t))):ie}),(e=>[...He.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function $e(e){return Ge(e)[0]||null}function je(e){const t=Ge(e);return t[t.length-1]||null}function We(e,t){return $e(e)===t}function Ke(e,t){return-1!==Ge(e).indexOf(t)}const Ze=K(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=Re(e,n),o=Ke(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function qe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Ye(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Xe(e){const t=Se(e),n=Ce(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Qe(e){const t=Se(e),n=Ce(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function Je(e){return He(e).some((t=>{const n=ae(e,t);return!(0,u.getBlockType)(n).merge}))}function et(e,t){const n=Se(e),o=Ce(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=Re(e,n.clientId);if(r!==Re(e,o.clientId))return!1;const l=nt(e,r);let i,s;l.indexOf(n.clientId)>l.indexOf(o.clientId)?(i=o,s=n):(i=n,s=o);const a=t?s.clientId:i.clientId,c=t?i.clientId:s.clientId,d=ae(e,a);if(!(0,u.getBlockType)(d).merge)return!1;const p=de(e,c);if(p.name===d)return!0;const m=(0,u.switchToBlockType)(p,d);return m&&m.length}const tt=e=>{const t=Se(e),n=Ce(e);if(t.clientId===n.clientId)return ie;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return ie;const o=Re(e,t.clientId);if(o!==Re(e,n.clientId))return ie;const r=nt(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId),[s,a]=l>i?[n,t]:[t,n],c=de(e,s.clientId),u=de(e,a.clientId),d=c.attributes[s.attributeKey],p=u.attributes[a.attributeKey];let m=(0,Y.create)({html:d}),h=(0,Y.create)({html:p});return m=(0,Y.remove)(m,0,s.offset),h=(0,Y.remove)(h,a.offset,h.text.length),[{...c,attributes:{...c.attributes,[s.attributeKey]:(0,Y.toHTMLString)({value:m})}},{...u,attributes:{...u.attributes,[a.attributeKey]:(0,Y.toHTMLString)({value:h})}}]};function nt(e,t){return e.blocks.order.get(t||"")||ie}function ot(e,t){return nt(e,Re(e,t)).indexOf(t)}function rt(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function lt(e,t,n=!1){return nt(e,t).some((t=>rt(e,t)||Ke(e,t)||n&<(e,t,n)))}function it(e,t,n=!1){return nt(e,t).some((t=>gt(e,t)||n&&it(e,t,n)))}function st(e,t){if(!t)return!1;const n=Ge(e),o=n.indexOf(t);return o>-1&&ogt(e,t)))}function bt(){return w()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const vt=K((e=>{let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=Re(e,l)||void 0,n=ot(e,r.clientId)+1):n=nt(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionPoint,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function kt(e){return null!==e.insertionPoint}function _t(e){return e.template.isValid}function yt(e){return e.settings.template}function Et(e,t){var n,o;return t?null!==(n=qt(e,t)?.templateLock)&&void 0!==n&&n:null!==(o=e.settings.templateLock)&&void 0!==o&&o}const wt=(e,t,n=null)=>{let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=(0,u.getBlockType)(t),!o)return!1;const{allowedBlockTypes:r}=Yt(e);if(!X(r,t,!0))return!1;if(!!Et(e,n))return!1;if("disabled"===kn(e,null!=n?n:""))return!1;const l=qt(e,n);if(n&&void 0===l)return!1;const i=l?.allowedBlocks,s=X(i,t),a=o.parent,c=ae(e,n),d=X(a,c);let p=!0;const m=o.ancestor;if(m){p=[n,...Ne(e,n)].some((t=>X(m,ae(e,t))))}const g=p&&(null===s&&null===d||!0===s||!0===d);return g?(0,h.applyFilters)("blockEditor.__unstableCanInsertBlockType",g,o,n,{getBlock:de.bind(null,e),getBlockParentsByBlockName:Ae.bind(null,e)}):g},St=K(wt,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId.get(n),e.settings.allowedBlockTypes,e.settings.templateLock,e.blockEditingModes]));function Ct(e,t,n=null){return t.every((t=>St(e,ae(e,t),n)))}function xt(e,t,n=null){const o=ue(e,t);return null===o||(void 0!==o.lock?.remove?!o.lock.remove:!Et(e,n)&&"disabled"!==kn(e,n))}function Bt(e,t,n=null){return t.every((t=>xt(e,t,n)))}function It(e,t,n=null){const o=ue(e,t);return null===o||(void 0!==o.lock?.move?!o.lock.move:"all"!==Et(e,n)&&"disabled"!==kn(e,n))}function Tt(e,t,n=null){return t.every((t=>It(e,t,n)))}function Mt(e,t){const n=ue(e,t);if(null===n)return!0;const{lock:o}=n;return!o?.edit}function Pt(e,t){return!!(0,u.hasBlockSupport)(t,"lock",!0)&&!!e.settings?.canLockBlocks}function Rt(e,t){var n;return null!==(n=e.preferences.insertUsage?.[t])&&void 0!==n?n:null}const Nt=(e,t,n)=>!!(0,u.hasBlockSupport)(t,"inserter",!0)&&wt(e,t.name,n),At=(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}},Lt=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;(0,u.hasBlockSupport)(n.name,"multiple",!0)||(r=ye(e,be(e)).some((({name:e})=>e===n.name)));const{time:l,count:i=0}=Rt(e,o)||{},s={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:At(l,i)};if("transform"===t)return s;const a=(0,u.getBlockVariations)(n.name,"inserter");return{...s,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,variations:a,example:n.example,utility:1}},Ot=K(((e,t=null)=>{const n=wt(e,"core/block",t)?nn(e).map((t=>{const n=t.wp_pattern_sync_status?q:{src:q,foreground:"var(--wp-block-synced-color)"},o=`core/block/${t.id}`,{time:r,count:l=0}=Rt(e,o)||{},i=At(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=Lt(e,{buildScope:"inserter"}),r=(0,u.getBlockTypes)().filter((n=>Nt(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}=Rt(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:At(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.get(t),e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,nn(e),(0,u.getBlockTypes)()])),Dt=K(((e,t,n=null)=>{const o=Array.isArray(t)?t:[t],r=Lt(e,{buildScope:"transform"}),l=(0,u.getBlockTypes)().filter((t=>Nt(e,t,n))).map(r),i=Object.fromEntries(Object.entries(l).map((([,e])=>[e.name,e]))),s=(0,u.getPossibleBlockTransformations)(o).reduce(((e,t)=>(i[t?.name]&&e.push(i[t.name]),e)),[]);return te(s,(e=>i[e.name].frecency),"desc")}),((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId.get(n),e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,u.getBlockTypes)()])),zt=K(((e,t=null)=>{if((0,u.getBlockTypes)().some((n=>Nt(e,n,t))))return!0;return wt(e,"core/block",t)&&nn(e).length>0}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,nn(e),(0,u.getBlockTypes)()])),Vt=K(((e,t=null)=>{if(!t)return;const n=(0,u.getBlockTypes)().filter((n=>Nt(e,n,t)));return wt(e,"core/block",t)&&nn(e).length>0&&n.push("core/block"),n}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,nn(e),(0,u.getBlockTypes)()])),Ft=K(((e,t=null)=>(w()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),Vt(e,t))),((e,t)=>[...Vt.getDependants(e,t)])),Ht=K(((e,t=null)=>{if(!t)return;const n=e.blockListSettings[t]?.defaultBlock,o=e.blockListSettings[t]?.directInsert;return n&&o?"function"==typeof o?o(de(e,t))?n:null:n:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)])),Gt=K(((e,t=null)=>(w()('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),Ht(e,t))),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)])),Ut=(0,p.createRegistrySelector)((e=>K(((t,n)=>{const{getAllPatterns:o}=le(e(ne)),r=o().find((({name:e})=>e===n));return r?{...r,blocks:(0,u.parse)(r.content,{__unstableSkipMigrationLogs:!0})}:null}),J))),$t=(e,t)=>[...J(e),e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId.get(t)],jt=(0,p.createRegistrySelector)((e=>K(((t,n=null)=>{const{getAllPatterns:o,__experimentalGetParsedPattern:r}=le(e(ne)),l=o(),{allowedBlockTypes:i}=Yt(t),s=l.filter((({inserter:e=!0})=>!!e)).map((({name:e})=>r(e))),a=s.filter((({blocks:e})=>Q(e,i))),c=a.filter((({blocks:e})=>e.every((({name:e})=>St(t,e,n)))));return c}),$t))),Wt=(0,p.createRegistrySelector)((e=>K(((t,n,o=null)=>{if(!n)return ie;const r=e(ne).__experimentalGetAllowedPatterns(o),l=Array.isArray(n)?n:[n],i=r.filter((e=>e?.blockTypes?.some?.((e=>l.includes(e)))));return 0===i.length?ie:i}),((e,t,n)=>$t(e,n))))),Kt=(0,p.createRegistrySelector)((e=>(w()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(ne).getPatternsByBlockTypes))),Zt=(0,p.createRegistrySelector)((e=>K(((t,n,o=null)=>{if(!n)return ie;if(n.some((({clientId:e,innerBlocks:n})=>n.length||cn(t,e))))return ie;const r=Array.from(new Set(n.map((({name:e})=>e))));return e(ne).getPatternsByBlockTypes(r,o)}),((e,t,n)=>$t(e,n)))));function qt(e,t){return e.blockListSettings[t]}function Yt(e){return e.settings}function Xt(e){return e.blocks.isPersistentChange}const Qt=K(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),Jt=K(((e,t)=>{const n=nn(e).find((e=>e.id===t));return n?n.title?.raw:null}),(e=>[nn(e)]));function en(e){return e.blocks.isIgnoredChange}function tn(e){return e.lastBlockAttributesChange}function nn(e){var t;return null!==(t=e.settings.__experimentalReusableBlocks)&&void 0!==t?t:ie}function on(e){return"navigation"===e.editorMode}function rn(e){return e.editorMode}function ln(e){return e.hasBlockMovingClientId}function sn(e){return!!e.automaticChangeStatus}function an(e,t){return e.highlightedBlock===t}function cn(e,t){return!!e.blocks.controlledInnerBlocks[t]}const un=K(((e,t)=>{if(!t.length)return null;const n=Me(e);if(t.includes(ae(e,n)))return n;const o=Ge(e),r=Ae(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function dn(e,t,n){const{lastBlockInserted:o}=e;return o.clientIds?.includes(t)&&o.source===n}function pn(e,t){var n;return null===(n=e.blockVisibility?.[t])||void 0===n||n}const mn=K((e=>{const t=new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])));return 0===t.size?se:t}),(e=>[e.blockVisibility])),hn=K(((e,t)=>{let n,o=t;for(;e.blocks.parents.has(o);)o=e.blocks.parents.get(o),(o&&"core/block"===ae(e,o)||o&&"contentOnly"===Et(e,o))&&(n=o);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function gn(e){return e.temporarilyEditingAsBlocks}function fn(e){return e.temporarilyEditingFocusModeRevert}function bn(e,t){if("default"!==kn(e,t))return!1;if(!Mt(e,t))return!0;const n=rn(e);if("zoom-out"===n&&t&&!Re(e,t))return!0;const o=(0,u.hasBlockSupport)(ae(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!o&&cn(e,t))&&!rt(e,t)&&!lt(e,t,!0)}function vn(e,t){let n=e.blocks.parents.get(t);for(;n;){if(bn(e,n))return!0;n=e.blocks.parents.get(n)}return!1}const kn=(0,p.createRegistrySelector)((e=>(t,n="")=>{if(t.blockEditingModes.has(n))return t.blockEditingModes.get(n);if(!n)return"default";const o=Re(t,n);if("contentOnly"===Et(t,o)){const o=ae(t,n);return e(u.store).__experimentalHasContentRoleAttribute(o)?"contentOnly":"disabled"}const r=kn(t,o);return"contentOnly"===r?"default":r})),_n=(0,p.createRegistrySelector)((e=>(t,n="")=>{const o=n||Me(t);if(!o)return!1;const{getGroupingBlockName:r}=e(u.store),l=de(t,o),i=r();return l&&(l.name===i||(0,u.getBlockType)(l.name)?.transforms?.ungroup)&&!!l.innerBlocks.length&&xt(t,o)})),yn=(0,p.createRegistrySelector)((e=>(t,n=ie)=>{const{getGroupingBlockName:o}=e(u.store),r=o(),l=n?.length?n:He(t),i=l?.length?Re(t,l[0]):void 0;return St(t,r,i)&&l.length&&Bt(t,l,i)})),En=new WeakSet,wn=["inserterMediaCategories","blockInspectorAnimation"];function Sn(e,{stripExperimentalSettings:t=!1,reset:n=!1}={}){let o=e;if(t&&"web"===d.Platform.OS){o={};for(const t in e)wn.includes(t)||(o[t]=e[t])}return{type:"UPDATE_SETTINGS",settings:o,reset:n}}function Cn(){return{type:"HIDE_BLOCK_INTERFACE"}}function xn(){return{type:"SHOW_BLOCK_INTERFACE"}}const Bn=(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 s=o.getBlockRootClientId(e[0]);if(!o.canRemoveBlocks(e,s))return;const a=!n&&o.getBlockRemovalRules();if(a){const n=new Set,l=[...e];for(;l.length;){const e=l.shift(),t=o.getBlockName(e);a[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(In())}))},In=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;const{__unstableHasCustomAppender:n}=e.getSettings();n||t.insertDefaultBlock()};function Tn(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Mn(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Pn(e){return{type:"SET_OPENED_BLOCK_SETTINGS_MENU",clientId:e}}function Rn(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function Nn(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function An(e){return({dispatch:t,select:n,registry:o})=>{o.batch((()=>{t({type:"SET_EXPLICIT_PERSISTENT",isPersistentChange:!1}),e(),t({type:"SET_EXPLICIT_PERSISTENT",isPersistentChange:void 0});const o=n.getBlocks();En.add(o)}))}}function Ln(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function On(e){return({select:t,dispatch:n})=>{const o=t.__unstableGetTemporarilyEditingFocusModeToRevert();n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:"contentOnly"}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:"contentOnly"}),n.updateSettings({focusMode:o}),n.__unstableSetTemporarilyEditingAsBlocks()}}function Dn(e){return{type:"REGISTER_BLOCK_BINDINGS_SOURCE",sourceName:e.name,sourceLabel:e.label,useSource:e.useSource,lockAttributesEditing:e.lockAttributesEditing}}const zn={user:"user",theme:"theme",directory:"directory"},Vn={full:"fully",unsynced:"unsynced"},Fn={name:"allPatterns",label:(0,x.__)("All")},Hn={name:"myPatterns",label:(0,x.__)("My patterns")};function Gn(e,t,n){const o=e.name.startsWith("core/block"),r="core"===e.source||e.source?.startsWith("pattern-directory");return!(t!==zn.theme||!o&&!r)||(!(t!==zn.directory||!o&&r)||(t===zn.user&&e.type!==zn.user||(n===Vn.full&&""!==e.syncStatus||!(n!==Vn.unsynced||"unsynced"===e.syncStatus||!o))))}function Un(e){return e.isBlockInterfaceHidden}function $n(e){return e?.lastBlockInserted?.clientIds}const jn=K(((e,t)=>{const n=t=>"disabled"===kn(e,t)&&nt(e,t).every(n);return"disabled"===kn(e,t)&&nt(e,t).every(n)}),(e=>[e.blocks.parents,e.blocks.order,e.blockEditingModes,e.blockListSettings])),Wn=K(((e,t="")=>nt(e,t).flatMap((t=>"disabled"!==kn(e,t)?[{clientId:t,innerBlocks:Wn(e,t)}]:Wn(e,t)))),(e=>[e.blocks.order,e.blockEditingModes,e.settings.templateLock,e.blockListSettings])),Kn=K(((e,t,n=!1)=>Ne(e,t,n).filter((t=>"disabled"!==kn(e,t)))),(e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]));function Zn(e){return e.removalPromptData}function qn(e){return e.blockRemovalRules}function Yn(e){return e.openedBlockSettingsMenu}function Xn(e){return e.styleOverrides}function Qn(e){return e.registeredInserterMediaCategories}const Jn=K((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]));function eo(e){return e.blockPatterns}const to=(0,p.createRegistrySelector)((e=>K(((t,n=null)=>{const{getAllPatterns:o,__experimentalGetParsedPattern:r}=le(e(wr)),l=o(),{allowedBlockTypes:i}=Yt(t);return l.some((({name:e,inserter:o=!0})=>{if(!o)return!1;const{blocks:l}=r(e);return Q(l,i)&&l.every((({name:e})=>St(t,e,n)))}))}),((e,t)=>[J(e),e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId.get(t)])))),no=(0,p.createRegistrySelector)((e=>K((t=>{const{__experimentalBlockPatterns:n=[],__experimentalUserPatternCategories:o=[],__experimentalReusableBlocks:r=[]}=t.settings,l=(null!=r?r:[]).map((e=>({name:`core/block/${e.id}`,id:e.id,type:zn.user,title:e.title.raw,categories:e.wp_pattern_category.map((e=>{const t=(null!=o?o:[]).find((({id:t})=>t===e));return t?t.slug:e})),content:e.content.raw,syncStatus:e.wp_pattern_sync_status})));return[...l,...n,...le(e(wr)).getFetchedPatterns()].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))}),J)));function oo(e){return e.lastFocus}function ro(e){return e.blockBindingsSources}function lo(e,t){return e.blockBindingsSources[t]}const io=()=>async({dispatch:e,select:t})=>{const{__experimentalFetchBlockPatterns:n}=t.getSettings();if(!n)return[];e({type:"RECEIVE_BLOCK_PATTERNS",patterns:await n()})};io.shouldInvalidate=e=>"UPDATE_SETTINGS"===e.type&&!!e.settings.__experimentalFetchBlockPatterns;const so=window.wp.a11y,ao="†";function co(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return("string"==typeof n||n instanceof Y.RichTextData)&&-1!==n.toString().indexOf(ao)}))}const uo=e=>Array.isArray(e)?e:[e],po=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(mo(e))},mo=e=>({select:t,dispatch:n})=>{const o=t.getTemplate(),r=t.getTemplateLock(),l=!o||"all"!==r||(0,u.doBlocksMatchTemplate)(e,o);if(l!==t.isValidTemplate())return n.setTemplateValidity(l),l};function ho(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function go(e){return w()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function fo(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:uo(e),attributes:t,uniqueByBlock:n}}function bo(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function vo(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const ko=(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)}},_o=e=>({select:t,dispatch:n})=>{const o=t.getNextBlockClientId(e);o&&n.selectBlock(o)};function yo(){return{type:"START_MULTI_SELECT"}}function Eo(){return{type:"STOP_MULTI_SELECT"}}const wo=(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,so.speak)((0,x.sprintf)((0,x._n)("%s block selected.","%s blocks selected.",l),l),"assertive")};function So(){return{type:"CLEAR_SELECTED_BLOCK"}}function Co(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function xo(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,u.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 Bo=(e,t,n,o=0,r)=>({select:l,dispatch:i,registry:s})=>{e=uo(e),t=xo(uo(t),l.getSettings());const a=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 Io(e,t){return Bo(e,t)}const To=e=>(t,n)=>({select:o,dispatch:r})=>{o.canMoveBlocks(t,n)&&r({type:e,clientIds:uo(t),rootClientId:n})},Mo=To("MOVE_BLOCKS_DOWN"),Po=To("MOVE_BLOCKS_UP"),Ro=(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 No(e,t="",n="",o){return Ro([e],t,n,o)}function Ao(e,t,n,o,r){return Lo([e],t,n,o,0,r)}const Lo=(e,t,n,o=!0,r=0,l)=>({select:i,dispatch:s})=>{null!==r&&"object"==typeof r&&(l=r,r=0,w()("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=xo(uo(e),i.getSettings());const a=[];for(const t of e){i.canInsertBlockType(t.name,n)&&a.push(t)}a.length&&s({type:"INSERT_BLOCKS",blocks:a,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l})};function Oo(e,t,n={}){const{__unstableWithInserter:o,operation:r,nearestSide:l}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o,operation:r,nearestSide:l}}const Do=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function zo(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Vo=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});const n=e.getBlocks(),o=e.getTemplate(),r=(0,u.synchronizeBlocksWithTemplate)(n,o);t.resetBlocks(r)},Fo=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 a,c;s.indexOf(r.clientId)>s.indexOf(l.clientId)?(a=l,c=r):(a=r,c=l);const d=e?c:a,p=n.getBlock(d.clientId),m=(0,u.getBlockType)(p.name);if(!m.merge)return;const h=a,g=c,f=n.getBlock(h.clientId),b=n.getBlock(g.clientId),v=f.attributes[h.attributeKey],k=b.attributes[g.attributeKey];let _=(0,Y.create)({html:v}),y=(0,Y.create)({html:k});_=(0,Y.remove)(_,h.offset,_.text.length),y=(0,Y.insert)(y,ao,0,g.offset);const E=(0,u.cloneBlock)(f,{[h.attributeKey]:(0,Y.toHTMLString)({value:_})}),w=(0,u.cloneBlock)(b,{[g.attributeKey]:(0,Y.toHTMLString)({value:y})}),S=e?E:w,C=f.name===b.name?[S]:(0,u.switchToBlockType)(S,m.name);if(!C||!C.length)return;let x;if(e){const e=C.pop();x=m.merge(e.attributes,w.attributes)}else{const e=C.shift();x=m.merge(E.attributes,e.attributes)}const B=co(x),I=x[B],T=(0,Y.create)({html:I}),M=T.text.indexOf(ao),P=(0,Y.remove)(T,M,M+1),R=(0,Y.toHTMLString)({value:P});x[B]=R;const N=n.getSelectedBlockClientIds(),A=[...e?C:[],{...p,attributes:{...p.attributes,...x}},...e?[]:C];t.batch((()=>{o.selectionChange(p.clientId,B,M,M),o.replaceBlocks(N,A,0,n.getSelectedBlocksInitialCaretPosition())}))},Ho=()=>({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 a=i,c=s,u=e.getBlock(a.clientId),d=e.getBlock(c.clientId),p=u.attributes[a.attributeKey],m=d.attributes[c.attributeKey];let h=(0,Y.create)({html:p}),g=(0,Y.create)({html:m});h=(0,Y.remove)(h,a.offset,h.text.length),g=(0,Y.remove)(g,0,c.offset),t.replaceBlocks(e.getSelectedBlockClientIds(),[{...u,attributes:{...u.attributes,[a.attributeKey]:(0,Y.toHTMLString)({value:h})}},{...d,attributes:{...d.attributes,[c.attributeKey]:(0,Y.toHTMLString)({value:g})}}])},Go=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();t.selectionChange({start:{clientId:n.clientId},end:{clientId:o.clientId}})},Uo=(e,t)=>({registry:n,select:o,dispatch:r})=>{const l=[e,t];r({type:"MERGE_BLOCKS",blocks:l});const[i,s]=l,a=o.getBlock(i),c=(0,u.getBlockType)(a.name);if(!c)return;const d=o.getBlock(s);if(!c.merge&&(0,u.getBlockSupport)(a.name,"__experimentalOnMerge")){const e=(0,u.switchToBlockType)(d,c.name);if(1!==e?.length)return void r.selectBlock(a.clientId);const[t]=e;return t.innerBlocks.length<1?void r.selectBlock(a.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))}}))}if((0,u.isUnmodifiedDefaultBlock)(a))return void r.removeBlock(i,o.isBlockSelected(i));if((0,u.isUnmodifiedDefaultBlock)(d))return void r.removeBlock(s,o.isBlockSelected(s));if(!c.merge)return void r.selectBlock(a.clientId);const p=(0,u.getBlockType)(d.name),{clientId:m,attributeKey:h,offset:g}=o.getSelectionStart(),f=(m===i?c:p).attributes[h],b=(m===i||m===s)&&void 0!==h&&void 0!==g&&!!f;f||("number"==typeof h?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 h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const v=(0,u.cloneBlock)(a),k=(0,u.cloneBlock)(d);if(b){const e=m===i?v:k,t=e.attributes[h],n=(0,Y.insert)((0,Y.create)({html:t}),ao,g,g);e.attributes[h]=(0,Y.toHTMLString)({value:n})}const _=a.name===d.name?[k]:(0,u.switchToBlockType)(k,a.name);if(!_||!_.length)return;const y=c.merge(v.attributes,_[0].attributes);if(b){const e=co(y),t=y[e],n=(0,Y.create)({html:t}),o=n.text.indexOf(ao),l=(0,Y.remove)(n,o,o+1),i=(0,Y.toHTMLString)({value:l});y[e]=i,r.selectionChange(a.clientId,e,o,o)}r.replaceBlocks([a.clientId,d.clientId],[{...a,attributes:{...a.attributes,...y}},..._.slice(1)],0)},$o=(e,t=!0)=>Bn(e,t);function jo(e,t){return $o([e],t)}function Wo(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 Ko(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Zo(){return{type:"START_TYPING"}}function qo(){return{type:"STOP_TYPING"}}function Yo(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Xo(){return{type:"STOP_DRAGGING_BLOCKS"}}function Qo(){return w()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Jo(){return w()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function er(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const tr=(e,t,n)=>({dispatch:o})=>{const r=(0,u.getDefaultBlockName)();if(!r)return;const l=(0,u.createBlock)(r,e);return o.insertBlock(l,n,t)};function nr(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function or(e){return Sn(e,{stripExperimentalSettings:!0})}function rr(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function lr(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function ir(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const sr=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:t=(e=>setTimeout(e,100))}=window;t((()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},ar=(e=!0)=>({dispatch:t})=>{t.__unstableSetEditorMode(e?"navigation":"edit")},cr=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,so.speak)((0,x.__)("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,so.speak)((0,x.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,so.speak)((0,x.__)("You are currently in zoom-out mode."))},ur=(e=null)=>({dispatch:t})=>{t({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,so.speak)((0,x.__)("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."))},dr=(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,u.hasBlockSupport)(e,"multiple",!0))))return;const i=n.getBlockRootClientId(e[0]),s=uo(e),a=n.getBlockIndex(s[s.length-1]),c=r.map((e=>(0,u.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(c,a+1,i,t),c.length>1&&t&&o.multiSelect(c[0].clientId,c[c.length-1].clientId),c.map((e=>e.clientId))},pr=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)},mr=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 hr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const gr=e=>async({dispatch:t})=>{t(hr(e,!0)),await new Promise((e=>setTimeout(e,150))),t(hr(e,!1))};function fr(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function br(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function vr(e,t){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e,focusModeToRevert:t}}const kr=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 _r(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function yr(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}const Er={reducer:U,selectors:e,resolvers:l,actions:i},wr=(0,p.createReduxStore)(ne,{...Er,persist:["preferences"]}),Sr=(0,p.registerStore)(ne,{...Er,persist:["preferences"]});function Cr(e,t,n){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};const o=t.pop();let r=e;for(const e of t){const t=r[e];r=r[e]=Array.isArray(t)?[...t]:{...t}}return r[o]=n,e}le(Sr).registerPrivateActions(t),le(Sr).registerPrivateSelectors(r),le(wr).registerPrivateActions(t),le(wr).registerPrivateSelectors(r);const xr=(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},Br=["color","border","dimensions","typography","spacing"],Ir={"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},Tr={"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"},Mr=e=>Tr[e]||e;function Pr(e){let t=Rr.get(e);return t||(t=["default","theme","custom"].flatMap((t=>{var n;return null!==(n=e[t])&&void 0!==n?n:[]})),Rr.set(e,t)),t}const Rr=new WeakMap;function Nr(e){return["default","theme","custom"].some((t=>e?.[t]?.length))}function Ar(...e){const{name:t,clientId:n=null}=y();return e=(0,d.useMemo)((()=>e),e),(0,p.useSelect)((o=>{const r=n?[n,...o(wr).getBlockParents(n,!0)].filter((e=>{const t=o(wr).getBlockName(e);return(0,u.hasBlockSupport)(t,"__experimentalSettings",!1)})):[];return e.map((e=>{if(Br.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let l=(0,h.applyFilters)("blockEditor.useSetting.before",void 0,e,n,t);if(void 0!==l)return l;const i=Mr(e);for(const e of r){var s;const n=o(wr).getBlockAttributes(e);if(l=null!==(s=xr(n.settings?.blocks?.[t],i))&&void 0!==s?s:xr(n.settings,i),void 0!==l)break}const a=o(wr).getSettings();if(void 0===l&&t&&(l=xr(a.__experimentalFeatures?.blocks?.[t],i)),void 0===l&&(l=xr(a.__experimentalFeatures,i)),void 0!==l)return u.__EXPERIMENTAL_PATHS_WITH_MERGE[i]?Pr(l):l;const c=Ir[i]?.(a);return void 0!==c?c:"typography.dropCap"===i||void 0}))}),[t,n,e])}function Lr(e){w()("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});const[t]=Ar(e);return t}const Or="1600px",Dr="320px",zr=1,Vr=.25,Fr=.75,Hr="14px";function Gr({minimumFontSize:e,maximumFontSize:t,fontSize:n,minimumViewportWidth:o=Dr,maximumViewportWidth:r=Or,scaleFactor:l=zr,minimumFontSizeLimit:i}){if(i=Ur(i)?i:Hr,n){const o=Ur(n);if(!o?.unit)return null;const r=Ur(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),Vr),Fr),l=$r(o.value*n,3);e=r?.value&&l0}function Kr(e){const t=e?.typography,n=e?.layout,o=Ur(n?.wideSize)?n?.wideSize:null;return Wr(t)&&o?{fluid:{maxViewportWidth:o,...t.fluid}}:{fluid:t?.fluid}}const Zr="body",qr=[{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)=>jr(e,Kr(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:[]}],Yr={"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"},Xr={popoverProps:{placement:"left-start",offset:259}};function Qr(e,t,n,o,r){const l=[xr(e,["blocks",t,...n]),xr(e,n)];for(const i of l)if(i){const l=["custom","theme","default"];for(const s of l){const l=i[s];if(l){const i=l.find((e=>e[o]===r));if(i){if("slug"===o)return i;return Qr(e,t,n,"slug",i.slug)[o]===i[o]?i:void 0}}}}}function Jr(e,t,n){if(!n||"string"!=typeof n){if(!n?.ref||"string"!=typeof n?.ref)return n;{const t=n.ref.split(".");if(!(n=xr(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,...s]=l;return"preset"===i?function(e,t,n,[o,r]){const l=qr.find((e=>e.cssVarInfix===o));if(!l)return n;const i=Qr(e.settings,t,l.path,"slug",r);if(i){const{valueKey:n}=l;return Jr(e,t,i[n])}return n}(e,t,n,s):"custom"===i?function(e,t,n,o){var r;const l=null!==(r=xr(e.settings,["blocks",t,"custom",...o]))&&void 0!==r?r:xr(e.settings,["custom",...o]);return l?Jr(e,t,l):n}(e,t,n,s):n}function el(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 tl(e,t){return"object"!=typeof e||"object"!=typeof t?e===t:C()(e?.styles,t?.styles)&&C()(e?.settings,t?.settings)}const nl=(0,d.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),ol={settings:{},styles:{}},rl=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","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.aspectRatio","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"],ll=()=>{const{user:e,setUserConfig:t}=(0,d.useContext)(nl);return[!!e&&!C()(e,ol),(0,d.useCallback)((()=>t((()=>ol))),[t])]};function il(e,t,n="all"){const{setUserConfig:o,...r}=(0,d.useContext)(nl),l=t?".blocks."+t:"",i=e?"."+e:"",s=`settings${l}${i}`,a=`settings${i}`,c="all"===n?"merged":n;return[(0,d.useMemo)((()=>{const t=r[c];if(!t)throw"Unsupported source";var n;if(e)return null!==(n=xr(t,s))&&void 0!==n?n:xr(t,a);let o={};return rl.forEach((e=>{var n;const r=null!==(n=xr(t,`settings${l}.${e}`))&&void 0!==n?n:xr(t,`settings.${e}`);void 0!==r&&(o=Cr(o,e.split("."),r))})),o}),[r,c,e,s,a,l]),e=>{o((t=>Cr(t,s.split("."),e)))}]}function sl(e,t,n="all",{shouldDecodeEncode:o=!0}={}){const{merged:r,base:l,user:i,setUserConfig:s}=(0,d.useContext)(nl),a=e?"."+e:"",c=t?`styles.blocks.${t}${a}`:`styles${a}`;let u,p;switch(n){case"all":u=xr(r,c),p=o?Jr(r,t,u):u;break;case"user":u=xr(i,c),p=o?Jr(r,t,u):u;break;case"base":u=xr(l,c),p=o?Jr(l,t,u):u;break;default:throw"Unsupported source"}return[p,n=>{s((l=>Cr(l,c.split("."),o?function(e,t,n,o){if(!o)return o;const r=Yr[n],l=qr.find((e=>e.cssVarInfix===r));if(!l)return o;const{valueKey:i,path:s}=l,a=Qr(e,t,s,i,o);return a?`var:preset|${r}|${a.slug}`:o}(r.settings,t,e,n):n)))}]}function al(e,t,n){const{supportedStyles:o,supports:r}=(0,p.useSelect)((e=>({supportedStyles:le(e(u.store)).getSupportedStyles(t,n),supports:e(u.store).getBlockType(t)?.supports})),[t,n]);return(0,d.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}})})),["aspectRatio","minHeight"].forEach((e=>{o.includes(e)||(t.dimensions={...t.dimensions,[e]:!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 cl(e){const t=e?.color?.palette?.custom,n=e?.color?.palette?.theme,o=e?.color?.palette?.default,r=e?.color?.defaultPalette;return(0,d.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,x._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,x._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,x._x)("Custom","Indicates this palette is created by the user."),colors:t}),e}),[t,n,o,r])}function ul(e){const t=e?.color?.gradients?.custom,n=e?.color?.gradients?.theme,o=e?.color?.gradients?.default,r=e?.color?.defaultGradients;return(0,d.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,x._x)("Theme","Indicates this palette comes from the theme."),gradients:n}),r&&o&&o.length&&e.push({name:(0,x._x)("Default","Indicates this palette comes from WordPress."),gradients:o}),t&&t.length&&e.push({name:(0,x._x)("Custom","Indicates this palette is created by the user."),gradients:t}),e}),[t,n,o,r])}var dl=n(4403),pl=n.n(dl);const ml=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map((([e,t])=>[e,ml(t)])).filter((([,e])=>void 0!==e));return t.length?Object.fromEntries(t):void 0};function hl(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 s=n;return Object.entries(e).forEach((([e,n])=>{n&&t[e].forEach((e=>{const t=xr(i,e);t&&(s={...s,attributes:Cr(s.attributes,e,t)})}))})),s}function gl(e,t,n){const o=(0,u.getBlockSupport)(e,t),r=o?.__experimentalSkipSerialization;return Array.isArray(r)?r.includes(n):r}function fl({id:e,css:t,assets:n,__unstableType:o}={}){const{setStyleOverride:r,deleteStyleOverride:l}=le((0,p.useDispatch)(wr)),i=(0,d.useId)();(0,d.useEffect)((()=>{if(!t&&!n)return;const s=e||i;return r(s,{id:e,css:t,assets:n,__unstableType:o}),()=>{l(s)}}),[e,t,n,o,i,r,l])}function bl(e,t){const[n,o,r,l,i,s,a,c,u,p,m,h,g,f,b,v,k,_,y,E,w,S,C,x,B,I,T,M,P,R,N,A,L,O,D,z,V,F,H,G,U,$,j,W,K,Z]=Ar("background.backgroundImage","background.backgroundSize","typography.fontFamilies","typography.fontSizes","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textColumns","typography.textDecoration","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.spacingSizes","spacing.units","dimensions.aspectRatio","dimensions.minHeight","layout","border.color","border.radius","border.style","border.width","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow");return al((0,d.useMemo)((()=>({background:{backgroundImage:n,backgroundSize:o},color:{palette:{custom:T,theme:P,default:R},gradients:{custom:z,theme:V,default:F},duotone:{custom:L,theme:O,default:D},defaultGradients:H,defaultPalette:N,defaultDuotone:A,custom:I,customGradient:G,customDuotone:M,background:U,link:$,heading:W,button:K,text:j},typography:{fontFamilies:{custom:r},fontSizes:{custom:l},customFontSize:i,fontStyle:s,fontWeight:a,lineHeight:c,textColumns:u,textDecoration:p,textTransform:h,letterSpacing:g,writingMode:m},spacing:{spacingSizes:{custom:k},padding:f,margin:b,blockGap:v,units:_},border:{color:S,radius:C,style:x,width:B},dimensions:{aspectRatio:y,minHeight:E},layout:w,parentLayout:t,shadow:Z})),[n,o,r,l,i,s,a,c,u,p,h,g,m,f,b,v,k,_,y,E,w,t,S,C,x,B,I,T,M,P,R,N,A,L,O,D,z,V,F,H,G,U,$,j,W,K,Z]),e)}const vl=(0,d.memo)((function({index:e,useBlockProps:t,setAllWrapperProps:n,...o}){const r=t(o),l=t=>n((n=>{const o=[...n];return o[e]=t,o}));return(0,d.useEffect)((()=>(l(r),()=>{l(void 0)}))),null}));(0,h.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,u.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));const kl=window.wp.components,_l={default:(0,kl.createSlotFill)("BlockControls"),block:(0,kl.createSlotFill)("BlockControlsBlock"),inline:(0,kl.createSlotFill)("BlockFormatControls"),other:(0,kl.createSlotFill)("BlockControlsOther"),parent:(0,kl.createSlotFill)("BlockControlsParent")};function yl({group:e="default",controls:t,children:n,__experimentalShareWithChildBlocks:o=!1}){const r=function(e,t){const n=y();return n[g]?_l[e]?.Fill:n[f]&&t?_l.parent.Fill:null}(e,o);if(!r)return null;const l=(0,a.createElement)(a.Fragment,null,"default"===e&&(0,a.createElement)(kl.ToolbarGroup,{controls:t}),n);return(0,a.createElement)(kl.__experimentalStyleProvider,{document},(0,a.createElement)(r,null,(e=>{const{forwardedContext:t=[]}=e;return t.reduce(((e,[t,n])=>(0,a.createElement)(t,{...n},e)),l)})))}window.wp.warning;const{ComponentsContext:El}=le(kl.privateApis);function wl({group:e="default",...t}){const n=(0,d.useContext)(kl.__experimentalToolbarContext),o=(0,d.useContext)(El),r=(0,d.useMemo)((()=>({forwardedContext:[[kl.__experimentalToolbarContext.Provider,{value:n}],[El.Provider,{value:o}]]})),[n,o]),l=_l[e]?.Slot,i=(0,kl.__experimentalUseSlotFills)(l?.__unstableName);if(!l)return null;if(!i?.length)return null;const s=(0,a.createElement)(l,{...t,bubblesVirtually:!0,fillProps:r});return"default"===e?s:(0,a.createElement)(kl.ToolbarGroup,null,s)}const Sl=yl;Sl.Slot=wl;const Cl=e=>(0,a.createElement)(yl,{group:"inline",...e});Cl.Slot=e=>(0,a.createElement)(wl,{group:"inline",...e});const xl=Sl,Bl=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),Il=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})),Tl=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),Ml=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),Pl=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})),Rl=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})),Nl=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.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"})),Al={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 Ll(e,t=""){return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function Ol(e,t=Al,n,o){let r="";return t?.[n]?.spacingStyles?.length&&o&&t[n].spacingStyles.forEach((t=>{r+=`${Ll(e,t.selector.trim())} { `,r+=Object.entries(t.rules).map((([e,t])=>`${e}: ${t||o}`)).join("; "),r+="; }"})),r}function Dl(e){const{contentSize:t,wideSize:n,type:o="default"}=e,r={},l=/^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;return l.test(t)&&"constrained"===o&&(r.none=(0,x.sprintf)((0,x.__)("Max %s wide"),t)),l.test(n)&&(r.wide=(0,x.sprintf)((0,x.__)("Max %s wide"),n)),r}const zl=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})),Vl=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.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,a.createElement)(Z.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,a.createElement)(Z.Path,{d:"m18 7.5v9h1.5v-9z"})),Fl=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.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,a.createElement)(Z.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,a.createElement)(Z.Path,{d:"m7.5 19.5h9v-1.5h-9z"})),Hl=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.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,a.createElement)(Z.Path,{d:"m16.5 6h-9v-1.5h9z"})),Gl=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.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,a.createElement)(Z.Path,{d:"m18 16.5v-9h1.5v9z"})),Ul=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.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,a.createElement)(Z.Path,{d:"m16.5 19.5h-9v-1.5h9z",style:{fill:"#1e1e1e"}})),$l=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.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,a.createElement)(Z.Path,{d:"m4.5 16.5v-9h1.5v9z"})),jl=["top","right","bottom","left"],Wl={top:void 0,right:void 0,bottom:void 0,left:void 0},Kl={custom:zl,axial:zl,horizontal:Vl,vertical:Fl,top:Hl,right:Gl,bottom:Ul,left:$l},Zl={default:(0,x.__)("Spacing control"),top:(0,x.__)("Top"),bottom:(0,x.__)("Bottom"),left:(0,x.__)("Left"),right:(0,x.__)("Right"),mixed:(0,x.__)("Mixed"),vertical:(0,x.__)("Vertical"),horizontal:(0,x.__)("Horizontal"),axial:(0,x.__)("Horizontal & vertical"),custom:(0,x.__)("Custom")},ql={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function Yl(e){return!!e?.includes&&("0"===e||e.includes("var:preset|spacing|"))}function Xl(e,t){if(!Yl(e))return e;const n=ei(e),o=t.find((e=>String(e.slug)===n));return o?.size}function Ql(e,t){if(!e||Yl(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 Jl(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function ei(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 ti(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 ni(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=Jl(n?.top)||t,r=Jl(n?.left)||t;return o===r?o:`${o} ${r}`}const oi=(0,a.createElement)(kl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(kl.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),ri=(0,a.createElement)(kl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(kl.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),li=(0,a.createElement)(kl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(kl.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),ii=(0,a.createElement)(kl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(kl.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})),si=(0,a.createElement)(kl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(kl.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})),ai={top:{icon:li,title:(0,x._x)("Align top","Block vertical alignment setting")},center:{icon:ri,title:(0,x._x)("Align middle","Block vertical alignment setting")},bottom:{icon:oi,title:(0,x._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:ii,title:(0,x._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:si,title:(0,x._x)("Space between","Block vertical alignment setting")}},ci=["top","center","bottom"];const ui=function({value:e,onChange:t,controls:n=ci,isCollapsed:o=!0,isToolbar:r}){function l(n){return()=>t(e===n?void 0:n)}const i=ai[e],s=ai.top,c=r?kl.ToolbarGroup:kl.ToolbarDropdownMenu,u=r?{isCollapsed:o}:{};return(0,a.createElement)(c,{icon:i?i.icon:s.icon,label:(0,x._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((t=>({...ai[t],isActive:e===t,role:o?"menuitemradio":void 0,onClick:l(t)}))),...u})},di=e=>(0,a.createElement)(ui,{...e,isToolbar:!1}),pi=e=>(0,a.createElement)(ui,{...e,isToolbar:!0}),mi={left:Bl,center:Il,right:Tl,"space-between":Ml,stretch:Pl};const hi=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)},s=o?mi[o]:mi.left,c=[{name:"left",icon:Bl,title:(0,x.__)("Justify items left"),isActive:"left"===o,onClick:()=>i("left")},{name:"center",icon:Il,title:(0,x.__)("Justify items center"),isActive:"center"===o,onClick:()=>i("center")},{name:"right",icon:Tl,title:(0,x.__)("Justify items right"),isActive:"right"===o,onClick:()=>i("right")},{name:"space-between",icon:Ml,title:(0,x.__)("Space between items"),isActive:"space-between"===o,onClick:()=>i("space-between")},{name:"stretch",icon:Pl,title:(0,x.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>i("stretch")}],u=l?kl.ToolbarGroup:kl.ToolbarDropdownMenu,d=l?{isCollapsed:t}:{};return(0,a.createElement)(u,{icon:s,popoverProps:r,label:(0,x.__)("Change items justification"),controls:c.filter((t=>e.includes(t.name))),...d})},gi=e=>(0,a.createElement)(hi,{...e,isToolbar:!1}),fi=e=>(0,a.createElement)(hi,{...e,isToolbar:!0}),bi={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},vi={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},ki={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},_i=["wrap","nowrap"],yi={name:"flex",label:(0,x.__)("Flex"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowOrientation:o=!0}=n;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kl.Flex,null,(0,a.createElement)(kl.FlexItem,null,(0,a.createElement)(Si,{layout:e,onChange:t})),(0,a.createElement)(kl.FlexItem,null,o&&(0,a.createElement)(xi,{layout:e,onChange:t}))),(0,a.createElement)(Ci,{layout:e,onChange:t}))},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){if(n?.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=n;return(0,a.createElement)(xl,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(Si,{layout:e,onChange:t,isToolbar:!0}),o&&(0,a.createElement)(Ei,{layout:e,onChange:t,isToolbar:!0}))},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:l=Al}){const{orientation:i="horizontal"}=t,s=n?.spacing?.blockGap&&!gl(o,"spacing","blockGap")?ni(n?.spacing?.blockGap,"0.5em"):void 0,a=bi[t.justifyContent],c=_i.includes(t.flexWrap)?t.flexWrap:"wrap",u=ki[t.verticalAlignment],d=vi[t.justifyContent]||vi.left;let p="";const m=[];return c&&"wrap"!==c&&m.push(`flex-wrap: ${c}`),"horizontal"===i?(u&&m.push(`align-items: ${u}`),a&&m.push(`justify-content: ${a}`)):(u&&m.push(`justify-content: ${u}`),m.push("flex-direction: column"),m.push(`align-items: ${d}`)),m.length&&(p=`${Ll(e)} {\n\t\t\t\t${m.join("; ")};\n\t\t\t}`),r&&s&&(p+=Ol(e,l,"flex",s)),p},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function Ei({layout:e,onChange:t,isToolbar:n=!1}){const{orientation:o="horizontal"}=e,r="horizontal"===o?ki.center:ki.top,{verticalAlignment:l=r}=e,i=n=>{t({...e,verticalAlignment:n})};if(n)return(0,a.createElement)(di,{onChange:i,value:l,controls:"horizontal"===o?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]});const s=[{value:"flex-start",label:(0,x.__)("Align items top")},{value:"center",label:(0,x.__)("Align items center")},{value:"flex-end",label:(0,x.__)("Align items bottom")}];return(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,a.createElement)("legend",null,(0,x.__)("Vertical alignment")),(0,a.createElement)("div",null,s.map(((e,t,n)=>(0,a.createElement)(kl.Button,{key:e,label:n,icon:t,isPressed:l===e,onClick:()=>i(e)})))))}const wi={placement:"bottom-start"};function Si({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,a.createElement)(gi,{allowedControls:i,value:o,onChange:l,popoverProps:wi});const s=[{value:"left",icon:Bl,label:(0,x.__)("Justify items left")},{value:"center",icon:Il,label:(0,x.__)("Justify items center")},{value:"right",icon:Tl,label:(0,x.__)("Justify items right")}];return"horizontal"===r?s.push({value:"space-between",icon:Ml,label:(0,x.__)("Space between items")}):s.push({value:"stretch",icon:Pl,label:(0,x.__)("Stretch items")}),(0,a.createElement)(kl.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Justification"),value:o,onChange:l,className:"block-editor-hooks__flex-layout-justification-controls"},s.map((({value:e,icon:t,label:n})=>(0,a.createElement)(kl.__experimentalToggleGroupControlOptionIcon,{key:e,value:e,icon:t,label:n}))))}function Ci({layout:e,onChange:t}){const{flexWrap:n="wrap"}=e;return(0,a.createElement)(kl.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Allow to wrap to multiple lines"),onChange:n=>{t({...e,flexWrap:n?"wrap":"nowrap"})},checked:"wrap"===n})}function xi({layout:e,onChange:t}){const{orientation:n="horizontal",verticalAlignment:o,justifyContent:r}=e;return(0,a.createElement)(kl.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,x.__)("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,a.createElement)(kl.__experimentalToggleGroupControlOptionIcon,{icon:Rl,value:"horizontal",label:(0,x.__)("Horizontal")}),(0,a.createElement)(kl.__experimentalToggleGroupControlOptionIcon,{icon:Nl,value:"vertical",label:(0,x.__)("Vertical")}))}const Bi={name:"default",label:(0,x.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,style:t,blockName:n,hasBlockGapSupport:o,layoutDefinitions:r=Al}){const l=ni(t?.spacing?.blockGap);let i="";gl(n,"spacing","blockGap")||(l?.top?i=ni(l?.top):"string"==typeof l&&(i=ni(l)));let s="";return o&&i&&(s+=Ol(e,r,"default",i)),s},getOrientation:()=>"vertical",getAlignments(e,t){const n=Dl(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}};const Ii=(0,d.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,d.cloneElement)(e,{width:t,height:t,...n,ref:o})})),Ti=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})),Mi=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})),Pi=window.wp.styleEngine,Ri={name:"constrained",label:(0,x.__)("Constrained"),inspectorControls:function({layout:e,onChange:t,layoutBlockSupport:n={}}){const{wideSize:o,contentSize:r,justifyContent:l="center"}=e,{allowJustification:i=!0,allowCustomContentAndWideSize:s=!0}=n,c=[{value:"left",icon:Bl,label:(0,x.__)("Justify items left")},{value:"center",icon:Il,label:(0,x.__)("Justify items center")},{value:"right",icon:Tl,label:(0,x.__)("Justify items right")}],[u]=Ar("spacing.units"),d=(0,kl.__experimentalUseCustomUnits)({availableUnits:u||["%","px","em","rem","vw"]});return(0,a.createElement)(a.Fragment,null,s&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,a.createElement)(kl.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,x.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:d}),(0,a.createElement)(Ii,{icon:Ti})),(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,a.createElement)(kl.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,x.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:d}),(0,a.createElement)(Ii,{icon:Mi}))),(0,a.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,x.__)("Customize the width for all elements that are assigned to the center or wide columns."))),i&&(0,a.createElement)(kl.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Justification"),value:l,onChange:n=>{t({...e,justifyContent:n})}},c.map((({value:e,icon:t,label:n})=>(0,a.createElement)(kl.__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=Al}){const{contentSize:i,wideSize:s,justifyContent:a}=t,c=ni(n?.spacing?.blockGap);let u="";gl(o,"spacing","blockGap")||(c?.top?u=ni(c?.top):"string"==typeof c&&(u=ni(c)));const d="left"===a?"0 !important":"auto !important",p="right"===a?"0 !important":"auto !important";let m=i||s?`\n\t\t\t\t\t${Ll(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=i?i:s};\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${Ll(e,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=s?s:i};\n\t\t\t\t\t}\n\t\t\t\t\t${Ll(e,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===a?m+=`${Ll(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${d}; }`:"right"===a&&(m+=`${Ll(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${p}; }`),n?.spacing?.padding){(0,Pi.getCSSRules)(n).forEach((t=>{"paddingRight"===t.key?m+=`\n\t\t\t\t\t${Ll(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${Ll(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+=Ol(e,l,"constrained",u)),m},getOrientation:()=>"vertical",getAlignments(e){const t=Dl(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}},Ni={px:600,"%":100,vw:100,vh:100,em:38,rem:38,svw:100,lvw:100,dvw:100,svh:100,lvh:100,dvh:100,vi:100,svi:100,lvi:100,dvi:100,vb:100,svb:100,lvb:100,dvb:100,vmin:100,svmin:100,lvmin:100,dvmin:100,vmax:100,svmax:100,lvmax:100,dvmax:100},Ai={name:"grid",label:(0,x.__)("Grid"),inspectorControls:function({layout:e={},onChange:t}){return e?.columnCount?(0,a.createElement)(Oi,{layout:e,onChange:t}):(0,a.createElement)(Li,{layout:e,onChange:t})},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:l=Al}){const{minimumColumnWidth:i="12rem",columnCount:s=null}=t,a=n?.spacing?.blockGap&&!gl(o,"spacing","blockGap")?ni(n?.spacing?.blockGap,"0.5em"):void 0;let c="";const u=[];return s?u.push(`grid-template-columns: repeat(${s}, minmax(0, 1fr))`):i&&u.push(`grid-template-columns: repeat(auto-fill, minmax(min(${i}, 100%), 1fr))`),u.length&&(c=`${Ll(e)} { ${u.join("; ")}; }`),r&&a&&(c+=Ol(e,l,"grid",a)),c},getOrientation:()=>"horizontal",getAlignments:()=>[]};function Li({layout:e,onChange:t}){const{minimumColumnWidth:n="12rem"}=e,[o,r]=(0,kl.__experimentalParseQuantityAndUnitFromRawValue)(n);return(0,a.createElement)("fieldset",null,(0,a.createElement)(kl.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Minimum column width")),(0,a.createElement)(kl.Flex,{gap:4},(0,a.createElement)(kl.FlexItem,{isBlock:!0},(0,a.createElement)(kl.__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","%","svw","lvw","dvw","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(n)&&o>100&&(l=100+n),t({...e,minimumColumnWidth:l})},value:n,min:0})),(0,a.createElement)(kl.FlexItem,{isBlock:!0},(0,a.createElement)(kl.RangeControl,{onChange:n=>{t({...e,minimumColumnWidth:[n,r].join("")})},value:o,min:0,max:Ni[r]||600,withInputField:!1}))))}function Oi({layout:e,onChange:t}){const{columnCount:n=3}=e;return(0,a.createElement)(kl.RangeControl,{label:(0,x.__)("Columns"),value:n,onChange:n=>t({...e,columnCount:n}),min:1,max:6})}const Di=[Bi,yi,Ri,Ai];function zi(e="default"){return Di.find((t=>t.name===e))}const Vi={type:"default"},Fi=(0,d.createContext)(Vi),Hi=Fi.Provider;function Gi(){return(0,d.useContext)(Fi)}const Ui=[],$i=["none","left","center","right","wide","full"],ji=["wide","full"];function Wi(e=$i){e.includes("none")||(e=["none",...e]);const t=1===e.length&&"none"===e[0],[n,o,r]=(0,p.useSelect)((e=>{var n;if(t)return[!1,!1,!1];const o=e(wr).getSettings();return[null!==(n=o.alignWide)&&void 0!==n&&n,o.supportsLayout,o.__unstableIsBlockBasedTheme]}),[t]),l=Gi();if(t)return Ui;const i=zi(l?.type);if(o){const t=i.getAlignments(l,r).filter((t=>e.includes(t.name)));return 1===t.length&&"none"===t[0].name?Ui:t}if("default"!==i.name&&"constrained"!==i.name)return Ui;const s=e.filter((e=>l.alignments?l.alignments.includes(e):!(!n&&ji.includes(e))&&$i.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?Ui:s}const Ki=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})),Zi=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})),qi=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})),Yi=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})),Xi={none:{icon:Ki,title:(0,x._x)("None","Alignment option")},left:{icon:Zi,title:(0,x.__)("Align left")},center:{icon:Ti,title:(0,x.__)("Align center")},right:{icon:qi,title:(0,x.__)("Align right")},wide:{icon:Mi,title:(0,x.__)("Wide width")},full:{icon:Yi,title:(0,x.__)("Full width")}};const Qi=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const l=Wi(n);if(!!!l.length)return null;function i(n){t([e,"none"].includes(n)?void 0:n)}const s=Xi[e],c=Xi.none,u=o?kl.ToolbarGroup:kl.ToolbarDropdownMenu,d={icon:s?s.icon:c.icon,label:(0,x.__)("Align")},p=o?{isCollapsed:r,controls:l.map((({name:t})=>({...Xi[t],isActive:e===t||!e&&"none"===t,role:r?"menuitemradio":void 0,onClick:()=>i(t)})))}:{toggleProps:{describedBy:(0,x.__)("Change alignment")},children:({onClose:t})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kl.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},l.map((({name:n,info:o})=>{const{icon:r,title:l}=Xi[n],s=n===e||!e&&"none"===n;return(0,a.createElement)(kl.MenuItem,{key:n,icon:r,iconPosition:"left",className:pl()("components-dropdown-menu__menu-item",{"is-active":s}),isSelected:s,onClick:()=>{i(n),t()},role:"menuitemradio",info:o},l)}))))};return(0,a.createElement)(u,{...d,...p})},Ji=e=>(0,a.createElement)(Qi,{...e,isToolbar:!1}),es=e=>(0,a.createElement)(Qi,{...e,isToolbar:!0});function ts(e){const t=y(),{clientId:n=""}=t,{setBlockEditingMode:o,unsetBlockEditingMode:r}=(0,p.useDispatch)(wr),l=(0,p.useSelect)((e=>n?null:e(wr).getBlockEditingMode()),[n]);return(0,d.useEffect)((()=>(e&&o(n,e),()=>{e&&r(n)})),[n,e,o,r]),n?t[b]:l}const ns=["left","center","right","wide","full"],os=["wide","full"];function rs(e,t=!0,n=!0){let o;return o=Array.isArray(e)?ns.filter((t=>e.includes(t))):!0===e?[...ns]:[],!n||!0===e&&!t?o.filter((e=>!os.includes(e))):o}const ls={shareWithChildBlocks:!0,edit:function({name:e,align:t,setAttributes:n}){const o=Wi(rs((0,u.getBlockSupport)(e,"align"),(0,u.hasBlockSupport)(e,"alignWide",!0))).map((({name:e})=>e)),r=ts();return o.length&&"default"===r?(0,a.createElement)(xl,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(Ji,{value:t,onChange:t=>{if(!t){const n=(0,u.getBlockType)(e),o=n?.attributes?.align?.default;o&&(t="")}n({align:t})},controls:o})):null},useBlockProps:function({name:e,align:t}){const n=rs((0,u.getBlockSupport)(e,"align"),(0,u.hasBlockSupport)(e,"alignWide",!0));if(Wi(n).some((e=>e.name===t)))return{"data-align":t};return{}},addSaveProps:function(e,t,n){const{align:o}=n,r=(0,u.getBlockSupport)(t,"align"),l=(0,u.hasBlockSupport)(t,"alignWide",!0),i=rs(r,l).includes(o);i&&(e.className=pl()(`align${o}`,e.className));return e},attributeKeys:["align"],hasSupport:e=>(0,u.hasBlockSupport)(e,"align",!1)};(0,h.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.align)&&void 0!==t?t:{})||(0,u.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...ns,""]}}),e})),(0,h.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 is=(0,kl.createSlotFill)("InspectorControls"),ss=(0,kl.createSlotFill)("InspectorAdvancedControls"),as=(0,kl.createSlotFill)("InspectorControlsBackground"),cs=(0,kl.createSlotFill)("InspectorControlsBorder"),us=(0,kl.createSlotFill)("InspectorControlsColor"),ds=(0,kl.createSlotFill)("InspectorControlsFilter"),ps=(0,kl.createSlotFill)("InspectorControlsDimensions"),ms=(0,kl.createSlotFill)("InspectorControlsPosition"),hs=(0,kl.createSlotFill)("InspectorControlsTypography"),gs=(0,kl.createSlotFill)("InspectorControlsListView"),fs=(0,kl.createSlotFill)("InspectorControlsStyles"),bs={default:is,advanced:ss,background:as,border:cs,color:us,dimensions:ps,effects:(0,kl.createSlotFill)("InspectorControlsEffects"),filter:ds,list:gs,position:ms,settings:is,styles:fs,typography:hs};function vs({children:e,group:t="default",__experimentalGroup:n,resetAllFilter:o}){n&&(w()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=n);const r=y(),l=bs[t]?.Fill;return l&&r[g]?(0,a.createElement)(kl.__experimentalStyleProvider,{document},(0,a.createElement)(l,null,(t=>(0,a.createElement)(_s,{fillProps:t,children:e,resetAllFilter:o})))):null}function ks({resetAllFilter:e,children:t}){const{registerResetAllFilter:n,deregisterResetAllFilter:o}=(0,d.useContext)(kl.__experimentalToolsPanelContext);return(0,d.useEffect)((()=>{if(e&&n&&o)return n(e),()=>{o(e)}}),[e,n,o]),t}function _s({children:e,resetAllFilter:t,fillProps:n}){const{forwardedContext:o=[]}=n,r=(0,a.createElement)(ks,{resetAllFilter:t},e);return o.reduce(((e,[t,n])=>(0,a.createElement)(t,{...n},e)),r)}function ys({children:e,group:t,label:n}){const{updateBlockAttributes:o}=(0,p.useDispatch)(wr),{getBlockAttributes:r,getMultiSelectedBlockClientIds:l,getSelectedBlockClientId:i,hasMultiSelection:s}=(0,p.useSelect)(wr),c=i(),u=(0,d.useCallback)(((e=[])=>{const t={},n=s()?l():[c];n.forEach((n=>{const{style:o}=r(n);let l={style:o};e.forEach((e=>{l={...l,...e(l)}})),l={...l,style:ml(l.style)},t[n]=l})),o(n,t,!0)}),[r,l,s,c,o]);return(0,a.createElement)(kl.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:n,resetAll:u,key:c,panelId:c,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:Xr},e)}function Es({Slot:e,fillProps:t,...n}){const o=(0,d.useContext)(kl.__experimentalToolsPanelContext),r=(0,d.useMemo)((()=>{var e;return{...null!=t?t:{},forwardedContext:[...null!==(e=t?.forwardedContext)&&void 0!==e?e:[],[kl.__experimentalToolsPanelContext.Provider,{value:o}]]}}),[o,t]);return(0,a.createElement)(e,{...n,fillProps:r,bubblesVirtually:!0})}function ws({__experimentalGroup:e,group:t="default",label:n,fillProps:o,...r}){e&&(w()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);const l=bs[t]?.Slot,i=(0,kl.__experimentalUseSlotFills)(l?.__unstableName),s=(0,d.useContext)(kl.__unstableMotionContext),c=(0,d.useMemo)((()=>{var e;return{...null!=o?o:{},forwardedContext:[...null!==(e=o?.forwardedContext)&&void 0!==e?e:[],[kl.__unstableMotionContext.Provider,{value:s}]]}}),[s,o]);return l&&i?.length?n?(0,a.createElement)(ys,{group:t,label:n},(0,a.createElement)(Es,{...r,fillProps:c,Slot:l})):(0,a.createElement)(l,{...r,fillProps:c,bubblesVirtually:!0}):null}const Ss=vs;Ss.Slot=ws;const Cs=e=>(0,a.createElement)(vs,{...e,group:"advanced"});Cs.Slot=e=>(0,a.createElement)(ws,{...e,group:"advanced"}),Cs.slotName="InspectorAdvancedControls";const xs=Ss,Bs=/[\s#]/g,Is={type:"string",source:"attribute",attribute:"id",selector:"*"};const Ts={addSaveProps:function(e,t,n){(0,u.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor);return e},edit:function({name:e,anchor:t,setAttributes:n}){const o=ts(),r="web"===d.Platform.OS,l=(0,a.createElement)(kl.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,x.__)("HTML anchor"),help:(0,a.createElement)(a.Fragment,null,(0,x.__)("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."),r&&(0,a.createElement)(kl.ExternalLink,{href:(0,x.__)("https://wordpress.org/documentation/article/page-jumps/")},(0,x.__)("Learn more about anchors"))),value:t||"",placeholder:r?null:(0,x.__)("Add an anchor"),onChange:e=>{e=e.replace(Bs,"-"),n({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,a.createElement)(a.Fragment,null,r&&"default"===o&&(0,a.createElement)(xs,{group:"advanced"},l),!r&&"core/heading"===e&&(0,a.createElement)(xs,null,(0,a.createElement)(kl.PanelBody,{title:(0,x.__)("Heading settings")},l)))},attributeKeys:["anchor"],hasSupport:e=>(0,u.hasBlockSupport)(e,"anchor")};(0,h.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.anchor)&&void 0!==t?t:{})||(0,u.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Is}),e}));const Ms={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};const Ps={addSaveProps:function(e,t,n){return(0,u.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e},attributeKeys:["ariaLabel"],hasSupport:e=>(0,u.hasBlockSupport)(e,"ariaLabel")};(0,h.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){return e?.attributes?.ariaLabel?.type||(0,u.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:Ms}),e}));const Rs={edit:function({className:e,setAttributes:t}){return"default"!==ts()?null:(0,a.createElement)(xs,{group:"advanced"},(0,a.createElement)(kl.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,x.__)("Additional CSS class(es)"),value:e||"",onChange:e=>{t({className:""!==e?e:void 0})},help:(0,x.__)("Separate multiple classes with spaces.")}))},addSaveProps:function(e,t,n){(0,u.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=pl()(e.className,n.className));return e},attributeKeys:["className"],hasSupport:e=>(0,u.hasBlockSupport)(e,"customClassName",!0)};(0,h.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",(function(e){return(0,u.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,h.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){if(!(0,u.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,h.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,u.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,u.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,u.getBlockDefaultClassName)(t.name)),e}));const Ns=window.wp.blob,As=window.wp.dom,Ls=window.wp.notices,Os=window.wp.url,Ds=window.wp.keycodes,zs=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,a.createElement)(Z.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})),Vs=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})),Fs=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})),Hs=(0,kl.withFilters)("editor.MediaUpload")((()=>null));const Gs=function({fallback:e=null,children:t}){const n=(0,p.useSelect)((e=>{const{getSettings:t}=e(wr);return!!t().mediaUpload}),[]);return n?t:e},Us=window.wp.isShallowEqual;var $s=n.n(Us);const js=window.wp.preferences,Ws=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(Z.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),Ks=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),Zs=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));const qs=function e({children:t,settingsOpen:n,setSettingsOpen:o}){const r=(0,m.useReducedMotion)(),l=r?d.Fragment:kl.__unstableAnimatePresence,i=r?"div":kl.__unstableMotion.div,s=`link-control-settings-drawer-${(0,m.useInstanceId)(e)}`;return(0,a.createElement)(d.Fragment,null,(0,a.createElement)(kl.Button,{className:"block-editor-link-control__drawer-toggle","aria-expanded":n,onClick:()=>o(!n),icon:(0,x.isRTL)()?Ks:Zs,"aria-controls":s},(0,x._x)("Advanced","Additional link settings")),(0,a.createElement)(l,null,n&&(0,a.createElement)(i,{className:"block-editor-link-control__drawer",hidden:!n,id:s,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1}},(0,a.createElement)("div",{className:"block-editor-link-control__drawer-inner"},t))))};var Ys=n(5425),Xs=n.n(Ys);function Qs(e){return"function"==typeof e}class Js extends d.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,d.createRef)(),this.inputRef=(0,d.createRef)(),this.updateSuggestions=(0,m.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,suggestionsValue:null,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Xs()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===o||this.props.disableSuggestions||(o?.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!e?.length;if(e=e.trim(),!o&&(e.length<2||!n&&(0,Os.isURL)(e)))return this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:e,selectedSuggestion:null,loading:!1});this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then((t=>{this.suggestionsRequest===r&&(this.setState({suggestions:t,suggestionsValue:e,loading:!1,showSuggestions:!!t.length}),t.length?this.props.debouncedSpeak((0,x.sprintf)((0,x._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):this.props.debouncedSpeak((0,x.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===r&&this.setState({loading:!1})})).finally((()=>{this.suggestionsRequest===r&&(this.suggestionsRequest=null)})),this.suggestionsRequest=r}onChange(e){this.props.onChange(e.target.value)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||e&&e.length||null!==this.suggestionsRequest||this.updateSuggestions(n)}onKeyDown(e){this.props.onKeyDown?.(e);const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case Ds.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case Ds.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case Ds.ENTER:this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e))}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Ds.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case Ds.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case Ds.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,x.__)("Link selected.")));break;case Ds.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(l),this.props.onSubmit&&this.props.onSubmit(l,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let l=r;const i=e&&e.length;return o||i||(l=!1),!0===n&&(l=!1),{showSuggestions:l,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,a.createElement)(a.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{__nextHasNoMarginBottom:e=!1,label:t=null,className:n,isFullWidth:o,instanceId:r,placeholder:l=(0,x.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:c=!1}=this.props,{loading:u,showSuggestions:d,selectedSuggestion:p,suggestionsListboxId:m,suggestionOptionIdPrefix:h}=this.state,g=`url-input-control-${r}`,f={id:g,label:t,className:pl()("block-editor-url-input",n,{"is-full-width":o}),hideLabelFromVision:c},b={id:g,value:s,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:l,onKeyDown:this.onKeyDown,role:"combobox","aria-label":t?void 0:(0,x.__)("URL"),"aria-expanded":d,"aria-autocomplete":"list","aria-owns":m,"aria-activedescendant":null!==p?`${h}-${p}`:void 0,ref:this.inputRef};return i?i(f,b,u):(e||w()("Bottom margin styles for wp.blockEditor.URLInput",{since:"6.2",version:"6.5",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),(0,a.createElement)(kl.BaseControl,{__nextHasNoMarginBottom:e,...f},(0,a.createElement)("input",{...b}),u&&(0,a.createElement)(kl.Spinner,null)))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:o,suggestionsValue:r,selectedSuggestion:l,suggestionsListboxId:i,suggestionOptionIdPrefix:s,loading:c}=this.state;if(!n||0===o.length)return null;const u={id:i,ref:this.autocompleteRef,role:"listbox"},d=(e,t)=>({role:"option",tabIndex:"-1",id:`${s}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===l||void 0});return Qs(t)?t({suggestions:o,selectedSuggestion:l,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!r?.length,currentInputValue:r}):(0,a.createElement)(kl.Popover,{placement:"bottom",focusOnMount:!1},(0,a.createElement)("div",{...u,className:pl()("block-editor-url-input__suggestions",`${e}__suggestions`)},o.map(((e,t)=>(0,a.createElement)(kl.Button,{...d(0,t),key:e.id,className:pl()("block-editor-url-input__suggestion",{"is-selected":t===l}),onClick:()=>this.handleOnClick(e)},e.title)))))}}const ea=(0,m.compose)(m.withSafeTimeout,kl.withSpokenMessages,m.withInstanceId,(0,p.withSelect)(((e,t)=>{if(Qs(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(wr);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(Js),ta=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),na=({searchTerm:e,onClick:t,itemProps:n,buttonText:o})=>{if(!e)return null;let r;return r=o?"function"==typeof o?o(e):o:(0,d.createInterpolateElement)((0,x.sprintf)((0,x.__)("Create: %s"),e),{mark:(0,a.createElement)("mark",null)}),(0,a.createElement)(kl.MenuItem,{...n,iconPosition:"left",icon:ta,className:"block-editor-link-control__search-item",onClick:t},r)},oa=(0,a.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(Z.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})),ra=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,a.createElement)(Z.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})),la=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})),ia=(0,a.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(Z.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})),sa=(0,a.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(Z.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})),aa=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),ca=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),ua=(0,a.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(Z.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})),da={post:oa,page:ra,post_tag:la,category:ia,attachment:sa};function pa({isURL:e,suggestion:t}){let n=null;return e?n=aa:t.type in da&&(n=da[t.type],"page"===t.type&&(t.isFrontPage&&(n=ca),t.isBlogHome&&(n=ua))),n?(0,a.createElement)(Ii,{className:"block-editor-link-control__search-item-icon",icon:n}):null}function ma(e){const t=e?.trim();return t?.length?e?.replace(/^\/?/,"/"):e}function ha(e){const t=e?.trim();return t?.length?e?.replace(/\/$/,""):e}function ga(e){return e.isFrontPage?"front page":e.isBlogHome?"blog home":"post_tag"===e.type?"tag":e.type}const fa=({itemProps:e,suggestion:t,searchTerm:n,onClick:o,isURL:r=!1,shouldShowType:l=!1})=>{const i=r?(0,x.__)("Press ENTER to add this link"):(s=t.url)?(0,m.pipe)(Os.safeDecodeURI,Os.getPath,(e=>t=>null==t||t!=t?e:t)(""),((e,...t)=>(...n)=>e(...n,...t))(Os.filterURLForDisplay,24),ha,ma)(s):s;var s;return(0,a.createElement)(kl.MenuItem,{...e,info:i,iconPosition:"left",icon:(0,a.createElement)(pa,{suggestion:t,isURL:r}),onClick:o,shortcut:l&&ga(t),className:"block-editor-link-control__search-item"},(0,a.createElement)(kl.TextHighlight,{text:(0,As.__unstableStripHTML)(t.title),highlight:n}))},ba="__CREATE__",va="link",ka="mailto",_a="internal",ya=[va,ka,"tel",_a],Ea=[{id:"opensInNewTab",title:(0,x.__)("Open in new tab")}];function wa({instanceId:e,withCreateSuggestion:t,currentInputValue:n,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:l,suggestions:i,selectedSuggestion:s,isLoading:c,isInitialSuggestions:u,createSuggestionButtonText:d,suggestionsQuery:p}){const m=pl()("block-editor-link-control__search-results",{"is-loading":c}),h=1===i.length&&ya.includes(i[0].type),g=t&&!h&&!u,f=!p?.type,b=`block-editor-link-control-search-results-label-${e}`,v=u?(0,x.__)("Suggestions"):(0,x.sprintf)((0,x.__)('Search results for "%s"'),n),k=(0,a.createElement)(kl.VisuallyHidden,{id:b},v);return(0,a.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},k,(0,a.createElement)("div",{...r,className:m,"aria-labelledby":b},(0,a.createElement)(kl.MenuGroup,null,i.map(((e,t)=>g&&ba===e.type?(0,a.createElement)(na,{searchTerm:n,buttonText:d,onClick:()=>o(e),key:e.type,itemProps:l(e,t),isSelected:t===s}):ba===e.type?null:(0,a.createElement)(fa,{key:`${e.id}-${e.type}`,itemProps:l(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===s,isURL:ya.includes(e.type),searchTerm:n,shouldShowType:f,isFrontPage:e?.isFrontPage,isBlogHome:e?.isBlogHome}))))))}function Sa(e){if(e.includes(" "))return!1;const t=(0,Os.getProtocol)(e),n=(0,Os.isValidProtocol)(t),o=function(e,t=6){const n=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(n)}(e),r=e?.startsWith("www."),l=e?.startsWith("#")&&(0,Os.isValidFragment)(e);return n||r||l||o}const Ca=()=>Promise.resolve([]),xa=e=>{let t=va;const n=(0,Os.getProtocol)(e)||"";return n.includes("mailto")&&(t=ka),n.includes("tel")&&(t="tel"),e?.startsWith("#")&&(t=_a),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,Os.prependHTTP)(e):e,type:t}])};function Ba(e,t,n){const{fetchSearchSuggestions:o,pageOnFront:r,pageForPosts:l}=(0,p.useSelect)((e=>{const{getSettings:t}=e(wr);return{pageOnFront:t().pageOnFront,pageForPosts:t().pageForPosts,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),i=t?xa:Ca;return(0,d.useCallback)(((t,{isInitialSuggestions:s})=>Sa(t)?i(t,{isInitialSuggestions:s}):(async(e,t,n,o,r,l)=>{const{isInitialSuggestions:i}=t,s=await n(e,t);return s.map((e=>Number(e.id)===r?(e.isFrontPage=!0,e):Number(e.id)===l?(e.isBlogHome=!0,e):e)),i||Sa(e)||!o?s:s.concat({title:e,url:e,type:ba})})(t,{...e,isInitialSuggestions:s},o,n,r,l)),[i,o,r,l,e,n])}const Ia=()=>Promise.resolve([]),Ta=()=>{},Ma=(0,d.forwardRef)((({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:l=!1,onCreateSuggestion:i=Ta,onChange:s=Ta,onSelect:c=Ta,showSuggestions:u=!0,renderSuggestions:p=(e=>(0,a.createElement)(wa,{...e})),fetchSuggestions:h=null,allowDirectEntry:g=!0,showInitialSuggestions:f=!1,suggestionsQuery:b={},withURLSuggestion:v=!0,createSuggestionButtonText:k,hideLabelFromVision:_=!1},y)=>{const E=Ba(b,g,l),w=u?h||E:Ia,S=(0,m.useInstanceId)(Ma),[C,B]=(0,d.useState)(),I=async e=>{let t=e;if(ba!==e.type){if(g||t&&Object.keys(t).length>=1){const{id:e,url:o,...r}=null!=n?n:{};c({...r,...t},t)}}else try{t=await i(e.title),t?.url&&c(t)}catch(e){}};return(0,a.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,a.createElement)(ea,{disableSuggestions:n?.url===e,__nextHasNoMarginBottom:!0,label:(0,x.__)("Link"),hideLabelFromVision:_,className:o,value:e,onChange:(e,t)=>{s(e),B(t)},placeholder:null!=r?r:(0,x.__)("Search or type url"),__experimentalRenderSuggestions:u?e=>p({...e,instanceId:S,withCreateSuggestion:l,createSuggestionButtonText:k,suggestionsQuery:b,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),I(t)}}):null,__experimentalFetchLinkSuggestions:w,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:f,onSubmit:(t,n)=>{const o=t||C;o||e?.trim()?.length?I(o||{url:e}):n.preventDefault()},ref:y}),t)})),Pa=Ma,Ra=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),Na=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),Aa=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})),La=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})),{Slot:Oa,Fill:Da}=(0,kl.createSlotFill)("BlockEditorLinkControlViewer");function za(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}const Va=function(e){const[t,n]=(0,d.useReducer)(za,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,p.useSelect)((e=>{const{getSettings:t}=e(wr);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,d.useEffect)((()=>{if(e?.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function Fa({value:e,onEditClick:t,hasRichPreviews:n=!1,hasUnlinkControl:o=!1,onRemove:r,additionalControls:l}){const i=n?e?.url:null,{richData:s,isFetching:c}=Va(i),u=s&&Object.keys(s).length,d=e&&(0,Os.filterURLForDisplay)((0,Os.safeDecodeURI)(e.url),24)||"",h=!e?.url?.length,g=!h&&(0,As.__unstableStripHTML)(s?.title||e?.title||d);let f;f=s?.icon?(0,a.createElement)("img",{src:s?.icon,alt:""}):h?(0,a.createElement)(Ii,{icon:Ra,size:32}):(0,a.createElement)(Ii,{icon:aa});const{createNotice:b}=(0,p.useDispatch)(Ls.store),v=(0,m.useCopyToClipboard)(e.url,(()=>{b("info",(0,x.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,a.createElement)("div",{"aria-label":(0,x.__)("Currently selected"),className:pl()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":u,"is-fetching":!!c,"is-preview":!0,"is-error":h,"is-url-title":g===d})},(0,a.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:pl()("block-editor-link-control__search-item-icon",{"is-image":s?.icon})},f),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-details"},h?(0,a.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},(0,x.__)("Link is empty")):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kl.Tooltip,{text:e.url},(0,a.createElement)(kl.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url},(0,a.createElement)(kl.__experimentalTruncate,{numberOfLines:1},g))),e?.url&&g!==d&&(0,a.createElement)("span",{className:"block-editor-link-control__search-item-info"},(0,a.createElement)(kl.__experimentalTruncate,{numberOfLines:1},d))))),(0,a.createElement)(kl.Button,{icon:Na,label:(0,x.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:t,size:"compact"}),o&&(0,a.createElement)(kl.Button,{icon:Aa,label:(0,x.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:r,size:"compact"}),(0,a.createElement)(kl.Button,{icon:La,label:(0,x.__)("Copy URL"),className:"block-editor-link-control__search-item-action block-editor-link-control__copy",ref:v,disabled:h,size:"compact"}),(0,a.createElement)(Oa,{fillProps:e})),l&&l())}const Ha=()=>{},Ga=({value:e,onChange:t=Ha,settings:n})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map((t=>(0,a.createElement)(kl.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-link-control__setting",key:t.id,label:t.title,onChange:o(t),checked:!!e&&!!e[t.id],help:t?.help})));return(0,a.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,a.createElement)(kl.VisuallyHidden,{as:"legend"},(0,x.__)("Currently selected link settings")),r)};const Ua=e=>{let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}};var $a=n(2303),ja=n.n($a);const Wa=()=>{},Ka="core/block-editor",Za="linkControlSettingsDrawer";function qa({searchInputPlaceholder:e,value:t,settings:n=Ea,onChange:o=Wa,onRemove:r,onCancel:l,noDirectEntry:i=!1,showSuggestions:s=!0,showInitialSuggestions:c,forceIsEditingLink:u,createSuggestion:m,withCreateSuggestion:h,inputValue:g="",suggestionsQuery:f={},noURLSuggestion:b=!1,createSuggestionButtonText:v,hasRichPreviews:k=!1,hasTextControl:_=!1,renderControlBottom:y=null}){void 0===h&&m&&(h=!0);const[E,w]=(0,d.useState)(!1),{advancedSettingsPreference:S}=(0,p.useSelect)((e=>{var t;return{advancedSettingsPreference:null!==(t=e(js.store).get(Ka,Za))&&void 0!==t&&t}}),[]),{set:C}=(0,p.useDispatch)(js.store),B=S||E,I=(0,d.useRef)(!0),T=(0,d.useRef)(),M=(0,d.useRef)(),P=(0,d.useRef)(!1),R=n.map((({id:e})=>e)),[N,A,L,O,D]=function(e){const[t,n]=(0,d.useState)(e||{}),[o,r]=(0,d.useState)(e);return ja()(e,o)||(r(e),n(e)),[t,n,e=>{n({...t,url:e})},e=>{n({...t,title:e})},e=>o=>{const r=Object.keys(o).reduce(((t,n)=>(e.includes(n)&&(t[n]=o[n]),t)),{});n({...t,...r})}]}(t),z=t&&!(0,Us.isShallowEqualObjects)(N,t),[V,F]=(0,d.useState)(void 0!==u?u:!t||!t.url),{createPage:H,isCreatingPage:G,errorMessage:U}=function(e){const t=(0,d.useRef)(),[n,o]=(0,d.useState)(!1),[r,l]=(0,d.useState)(null);return(0,d.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),l(null);try{return t.current=Ua(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw l(e.message||(0,x.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(m);(0,d.useEffect)((()=>{void 0!==u&&F(u)}),[u]),(0,d.useEffect)((()=>{if(I.current)return void(I.current=!1);(As.focus.focusable.find(T.current)[0]||T.current).focus(),P.current=!1}),[V,G]);const $=t?.url?.trim()?.length>0,j=()=>{P.current=!!T.current?.contains(T.current.ownerDocument.activeElement),F(!1)},W=()=>{z&&o({...t,...N,url:K}),j()},K=g||N?.url||"",Z=!K?.trim()?.length,q=r&&t&&!V&&!G,Y=V&&$,X=$&&_,Q=(V||!t)&&!G,J=!z||Z,ee=!!n?.length&&V&&$;return(0,a.createElement)("div",{tabIndex:-1,ref:T,className:"block-editor-link-control"},G&&(0,a.createElement)("div",{className:"block-editor-link-control__loading"},(0,a.createElement)(kl.Spinner,null)," ",(0,x.__)("Creating"),"…"),Q&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:pl()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":X,"has-actions":Y})},X&&(0,a.createElement)(kl.TextControl,{__nextHasNoMarginBottom:!0,ref:M,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,x.__)("Text"),value:N?.title,onChange:O,onKeyDown:e=>{const{keyCode:t}=e;t!==Ds.ENTER||Z||(e.preventDefault(),W())},size:"__unstable-large"}),(0,a.createElement)(Pa,{currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:K,withCreateSuggestion:h,onCreateSuggestion:H,onChange:L,onSelect:e=>{const t=Object.keys(e).reduce(((t,n)=>(R.includes(n)||(t[n]=e[n]),t)),{});o({...N,...t,title:N?.title||e?.title}),j()},showInitialSuggestions:c,allowDirectEntry:!i,showSuggestions:s,suggestionsQuery:f,withURLSuggestion:!b,createSuggestionButtonText:v,hideLabelFromVision:!X}),!Y&&(0,a.createElement)("div",{className:"block-editor-link-control__search-enter"},(0,a.createElement)(kl.Button,{onClick:J?Wa:W,label:(0,x.__)("Submit"),icon:Ws,className:"block-editor-link-control__search-submit","aria-disabled":J}))),U&&(0,a.createElement)(kl.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},U)),t&&!V&&!G&&(0,a.createElement)(Fa,{key:t?.url,value:t,onEditClick:()=>F(!0),hasRichPreviews:k,hasUnlinkControl:q,additionalControls:()=>{if(n?.find((e=>"opensInNewTab"===e.id)))return(0,a.createElement)(Ga,{value:N,settings:n?.filter((({id:e})=>"opensInNewTab"===e)),onChange:o})},onRemove:()=>{r(),F(!0)}}),ee&&(0,a.createElement)("div",{className:"block-editor-link-control__tools"},!Z&&(0,a.createElement)(qs,{settingsOpen:B,setSettingsOpen:e=>{C&&C(Ka,Za,e),w(e)}},(0,a.createElement)(Ga,{value:N,settings:n,onChange:D(R)}))),Y&&(0,a.createElement)(kl.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions"},(0,a.createElement)(kl.Button,{variant:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),A(t),$?j():r?.(),l?.()}},(0,x.__)("Cancel")),(0,a.createElement)(kl.Button,{variant:"primary",onClick:J?Wa:W,className:"block-editor-link-control__search-submit","aria-disabled":J},(0,x.__)("Save"))),y&&y())}qa.ViewerFill=Da,qa.DEFAULT_LINK_SETTINGS=Ea;const Ya=qa,Xa=()=>{};let Qa=0;const Ja=(0,m.compose)([(0,p.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Ls.store);return{createNotice:t,removeNotice:n}})),(0,kl.withFilters)("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,mediaIds:n,allowedTypes:o,accept:r,onError:l,onSelect:i,onSelectURL:s,onToggleFeaturedImage:c,useFeaturedImage:u,onFilesUpload:m=Xa,name:h=(0,x.__)("Replace"),createNotice:g,removeNotice:f,children:b,multiple:v=!1,addToGallery:k,handleUpload:_=!0,popoverProps:y})=>{const E=(0,p.useSelect)((e=>e(wr).getSettings().mediaUpload),[]),w=!!E,S=(0,d.useRef)(),C="block-editor/media-replace-flow/error-notice/"+ ++Qa,B=e=>{const t=(0,As.__unstableStripHTML)(e);l?l(t):setTimeout((()=>{g("error",t,{speak:!0,id:C,isDismissible:!0})}),1e3)},I=(e,t)=>{u&&c&&c(),t(),i(e),(0,so.speak)((0,x.__)("The media file has been replaced")),f(C)},T=e=>{e.keyCode===Ds.DOWN&&(e.preventDefault(),e.target.click())},M=v&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,a.createElement)(kl.Dropdown,{popoverProps:y,contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>(0,a.createElement)(kl.ToolbarButton,{ref:S,"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:T},h),renderContent:({onClose:l})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kl.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,a.createElement)(Gs,null,(0,a.createElement)(Hs,{gallery:M,addToGallery:k,multiple:v,value:v?n:t,onSelect:e=>I(e,l),allowedTypes:o,render:({open:e})=>(0,a.createElement)(kl.MenuItem,{icon:zs,onClick:e},(0,x.__)("Open Media Library"))}),(0,a.createElement)(kl.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!_)return t(),i(n);m(n),E({allowedTypes:o,filesList:n,onFileChange:([e])=>{I(e,t)},onError:B})})(e,l)},accept:r,multiple:!!v,render:({openFileDialog:e})=>(0,a.createElement)(kl.MenuItem,{icon:Vs,onClick:()=>{e()}},(0,x.__)("Upload"))})),c&&(0,a.createElement)(kl.MenuItem,{icon:Fs,onClick:c,isPressed:u},(0,x.__)("Use featured image")),b),s&&(0,a.createElement)("form",{className:pl()("block-editor-media-flow__url-input",{"has-siblings":w||c})},(0,a.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,x.__)("Current media URL:")),(0,a.createElement)(Ya,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:e})=>{s(e),S.current.focus()}})))})})),ec="background",tc="image";function nc(e){return!!e?.background?.backgroundImage?.id||!!e?.background?.backgroundImage?.url}function oc(e,t="any"){if("web"!==d.Platform.OS)return!1;const n=(0,u.getBlockSupport)(e,ec);return!0===n||("any"===t?!!n?.backgroundImage||!!n?.backgroundSize||!!n?.backgroundRepeat:!!n?.[t])}function rc(e={},t){t({style:ml({...e,background:{...e?.background,backgroundImage:void 0}})})}function lc(e){return nc(e)?"has-background":""}function ic({label:e,filename:t,url:n}){const o=e||(0,Os.getFilename)(n);return(0,a.createElement)(kl.__experimentalItemGroup,{as:"span"},(0,a.createElement)(kl.__experimentalHStack,{justify:"flex-start",as:"span"},(0,a.createElement)("span",{className:pl()("block-editor-hooks__background__inspector-image-indicator-wrapper",{"has-image":n}),"aria-hidden":!0},n&&(0,a.createElement)("span",{className:"block-editor-hooks__background__inspector-image-indicator",style:{backgroundImage:`url(${n})`}})),(0,a.createElement)(kl.FlexItem,{as:"span"},(0,a.createElement)(kl.__experimentalTruncate,{numberOfLines:1,className:"block-editor-hooks__background__inspector-media-replace-title"},o),(0,a.createElement)(kl.VisuallyHidden,{as:"span"},t?(0,x.sprintf)((0,x.__)("Selected image: %s"),t):(0,x.__)("No image selected")))))}function sc({clientId:e,isShownByDefault:t,setAttributes:n}){const{style:o,mediaUpload:r}=(0,p.useSelect)((t=>{const{getBlockAttributes:n,getSettings:o}=t(wr);return{style:n(e)?.style,mediaUpload:o().mediaUpload}}),[e]),{id:l,title:i,url:s}=o?.background?.backgroundImage||{},c=(0,d.useRef)(),{createErrorNotice:u}=(0,p.useDispatch)(Ls.store),m=e=>{u(e,{type:"snackbar"})},h=e=>{if(!e||!e.url){const e={...o,background:{...o?.background,backgroundImage:void 0}},t={style:ml(e)};return void n(t)}if((0,Ns.isBlobURL)(e.url))return;if(e.media_type&&e.media_type!==tc||!e.media_type&&e.type&&e.type!==tc)return void m((0,x.__)("Only images can be used as a background image."));const t={...o,background:{...o?.background,backgroundImage:{url:e.url,id:e.id,source:"file",title:e.title||void 0}}},r={style:ml(t)};n(r)},g=(0,d.useCallback)((e=>({...e,style:{...e.style,background:void 0}})),[]),f=nc(o);return(0,a.createElement)(kl.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>f,label:(0,x.__)("Background image"),onDeselect:()=>rc(o,n),isShownByDefault:t,resetAllFilter:g,panelId:e},(0,a.createElement)("div",{className:"block-editor-hooks__background__inspector-media-replace-container",ref:c},(0,a.createElement)(Ja,{mediaId:l,mediaURL:s,allowedTypes:[tc],accept:"image/*",onSelect:h,name:(0,a.createElement)(ic,{label:(0,x.__)("Background image"),filename:i,url:s}),variant:"secondary"},f&&(0,a.createElement)(kl.MenuItem,{onClick:()=>{const[e]=As.focus.tabbable.find(c.current);e?.focus(),e?.click(),rc(o,n)}},(0,x.__)("Reset "))),(0,a.createElement)(kl.DropZone,{onFilesDrop:e=>{r({allowedTypes:["image"],filesList:e,onFileChange([e]){(0,Ns.isBlobURL)(e?.url)||h(e)},onError:m})},label:(0,x.__)("Drop to upload")})))}function ac({clientId:e,isShownByDefault:t,setAttributes:n}){const o=(0,p.useSelect)((t=>t(wr).getBlockAttributes(e)?.style),[e]),r=o?.background?.backgroundSize,l=o?.background?.backgroundRepeat,i=void 0!==r&&"cover"!==r&&"contain"!==r||""===r?"auto":r||"cover",s="no-repeat"!==l&&("cover"!==i||void 0!==l),c=function(e){return void 0!==e?.background?.backgroundSize}(o),u=(0,d.useCallback)((e=>({...e,style:{...e.style,background:{...e.style?.background,backgroundRepeat:void 0,backgroundSize:void 0}}})),[]),m=e=>{let t=l;"contain"===e&&(t="no-repeat"),"cover"!==i&&"contain"!==i||"auto"!==e||(t=void 0),n({style:ml({...o,background:{...o?.background,backgroundRepeat:t,backgroundSize:e}})})};return(0,a.createElement)(kl.__experimentalVStack,{as:kl.__experimentalToolsPanelItem,spacing:2,className:"single-column",hasValue:()=>c,label:(0,x.__)("Size"),onDeselect:()=>function(e={},t){t({style:ml({...e,background:{...e?.background,backgroundRepeat:void 0,backgroundSize:void 0}})})}(o,n),isShownByDefault:t,resetAllFilter:u,panelId:e},(0,a.createElement)(kl.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:(0,x.__)("Size"),value:i,onChange:m,isBlock:!0,help:(h=r,"cover"===h||void 0===h?(0,x.__)("Stretch image to cover the block."):"contain"===h?(0,x.__)("Resize image to fit without cropping."):(0,x.__)("Set a fixed width."))},(0,a.createElement)(kl.__experimentalToggleGroupControlOption,{key:"cover",value:"cover",label:(0,x.__)("Cover")}),(0,a.createElement)(kl.__experimentalToggleGroupControlOption,{key:"contain",value:"contain",label:(0,x.__)("Contain")}),(0,a.createElement)(kl.__experimentalToggleGroupControlOption,{key:"fixed",value:"auto",label:(0,x.__)("Fixed")})),void 0!==r&&"cover"!==r&&"contain"!==r?(0,a.createElement)(kl.__experimentalUnitControl,{size:"__unstable-large",onChange:m,value:r}):null,"cover"!==i&&(0,a.createElement)(kl.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Repeat image"),checked:s,onChange:()=>{n({style:ml({...o,background:{...o?.background,backgroundRepeat:!0===s?"no-repeat":void 0}})})}}));var h}function cc(e){const[t,n]=Ar("background.backgroundImage","background.backgroundSize");if(!t||!oc(e.name,"backgroundImage"))return null;const o=!(!n||!oc(e.name,"backgroundSize")),r=(0,u.getBlockSupport)(e.name,[ec,"__experimentalDefaultControls"]);return(0,a.createElement)(xs,{group:"background"},(0,a.createElement)(sc,{isShownByDefault:r?.backgroundImage,...e}),o&&(0,a.createElement)(ac,{isShownByDefault:r?.backgroundSize,...e}))}var uc={grad:.9,turn:360,rad:360/(2*Math.PI)},dc=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},pc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},mc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},hc=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},gc=function(e){return{r:mc(e.r,0,255),g:mc(e.g,0,255),b:mc(e.b,0,255),a:mc(e.a)}},fc=function(e){return{r:pc(e.r),g:pc(e.g),b:pc(e.b),a:pc(e.a,3)}},bc=/^#([0-9a-f]{3,8})$/i,vc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},kc=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=Math.max(t,n,o),i=l-Math.min(t,n,o),s=i?l===t?(n-o)/i:l===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(s<0?s+6:s),s:l?i/l*100:0,v:l/255*100,a:r}},_c=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),i=o*(1-n),s=o*(1-(t-l)*n),a=o*(1-(1-t+l)*n),c=l%6;return{r:255*[o,s,i,i,a,o][c],g:255*[a,o,o,s,i,i][c],b:255*[i,i,a,o,o,s][c],a:r}},yc=function(e){return{h:hc(e.h),s:mc(e.s,0,100),l:mc(e.l,0,100),a:mc(e.a)}},Ec=function(e){return{h:pc(e.h),s:pc(e.s),l:pc(e.l),a:pc(e.a,3)}},wc=function(e){return _c((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},Sc=function(e){return{h:(t=kc(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},Cc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ic=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Tc={string:[[function(e){var t=bc.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?pc(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?pc(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Bc.exec(e)||Ic.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:gc({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Cc.exec(e)||xc.exec(e);if(!t)return null;var n,o,r=yc({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(uc[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return wc(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=void 0===r?1:r;return dc(t)&&dc(n)&&dc(o)?gc({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,l=void 0===r?1:r;if(!dc(t)||!dc(n)||!dc(o))return null;var i=yc({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return wc(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,l=void 0===r?1:r;if(!dc(t)||!dc(n)||!dc(o))return null;var i=function(e){return{h:hc(e.h),s:mc(e.s,0,100),v:mc(e.v,0,100),a:mc(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return _c(i)},"hsv"]]},Mc=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=fc(this.rgba)).r,n=e.g,o=e.b,l=(r=e.a)<1?vc(pc(255*r)):"","#"+vc(t)+vc(n)+vc(o)+l;var e,t,n,o,r,l},e.prototype.toRgb=function(){return fc(this.rgba)},e.prototype.toRgbString=function(){return t=(e=fc(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return Ec(Sc(this.rgba))},e.prototype.toHslString=function(){return t=(e=Ec(Sc(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=kc(this.rgba),{h:pc(e.h),s:pc(e.s),v:pc(e.v),a:pc(e.a,3)};var e},e.prototype.invert=function(){return Oc({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Oc(Rc(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Oc(Rc(this.rgba,-e))},e.prototype.grayscale=function(){return Oc(Rc(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Oc(Ac(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Oc(Ac(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Oc({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):pc(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Sc(this.rgba);return"number"==typeof e?Oc({h:e,s:t.s,l:t.l,a:t.a}):pc(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Oc(e).toHex()},e}(),Oc=function(e){return e instanceof Lc?e:new Lc(e)},Dc=[],zc=function(e){e.forEach((function(e){Dc.indexOf(e)<0&&(e(Lc,Tc),Dc.push(e))}))};function Vc(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var l={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,i,s=o[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!l.length)for(var d in n)l[d]=new e(n[d]).toRgb();for(var p in n){var m=(r=a,i=l[p],Math.pow(r.r-i.r,2)+Math.pow(r.g-i.g,2)+Math.pow(r.b-i.b,2));m(a=Hc(i))?(s+.05)/(a+.05):(a+.05)/(s+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(l=(n=t).size)?"normal":l,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===i?7:"AA"===r&&"large"===i?3:4.5);var n,o,r,l,i}}zc([Vc,Gc]);const Uc=(e,t,n)=>{if(t){const n=e?.find((e=>e.slug===t));if(n)return n}return{color:n}},$c=(e,t)=>e?.find((e=>e.color===t));function jc(e,t){if(!e||!t)return;const{kebabCase:n}=le(kl.privateApis);return`has-${n(t)}-${e}`}function Wc(){const[e,t,n,o,r,l,i,s,a,c]=Ar("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),u={disableCustomColors:!e,disableCustomGradients:!l};return u.colors=(0,d.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,x._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,x._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,x._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[t,n,o,r]),u.gradients=(0,d.useMemo)((()=>{const e=[];return s&&s.length&&e.push({name:(0,x._x)("Theme","Indicates this palette comes from the theme."),gradients:s}),c&&a&&a.length&&e.push({name:(0,x._x)("Default","Indicates this palette comes from WordPress."),gradients:a}),i&&i.length&&e.push({name:(0,x._x)("Custom","Indicates this palette is created by the user."),gradients:i}),e}),[i,s,a,c]),u.hasColorsOrGradients=!!u.colors.length||!!u.gradients.length,u}function Kc(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Zc(e={}){const{flat:t,...n}=e;return t||Kc(Object.values(n).filter(Boolean))||"px"}function qc(e={}){if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,kl.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",l=Kc(o);return 0===r||r?`${r}${l}`:void 0}function Yc(e={}){const t=qc(e);return"string"!=typeof e&&isNaN(parseFloat(t))}function Xc(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function Qc({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){let l=qc(o);void 0===l&&(l=Zc(t));const i=Xc(o)&&Yc(o),s=i?(0,x.__)("Mixed"):null;return(0,a.createElement)(kl.__experimentalUnitControl,{...r,"aria-label":(0,x.__)("Border radius"),disableUnits:i,isOnly:!0,value:l,onChange:t=>{const n=!isNaN(parseFloat(t));e(n?t:void 0)},onUnitChange:e=>{n({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:s,size:"__unstable-large"})}const Jc={topLeft:(0,x.__)("Top left"),topRight:(0,x.__)("Top right"),bottomLeft:(0,x.__)("Bottom left"),bottomRight:(0,x.__)("Bottom right")};function eu({onChange:e,selectedUnits:t,setSelectedUnits:n,values:o,...r}){const l=t=>n=>{if(!e)return;const o=!isNaN(parseFloat(n))?n:void 0;e({...i,[t]:o})},i="string"!=typeof o?o:{topLeft:o,topRight:o,bottomLeft:o,bottomRight:o};return(0,a.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(Jc).map((([e,o])=>{const[s,c]=(0,kl.__experimentalParseQuantityAndUnitFromRawValue)(i[e]),u=i[e]?c:t[e]||t.flat;return(0,a.createElement)(kl.Tooltip,{text:o,placement:"top",key:e},(0,a.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,a.createElement)(kl.__experimentalUnitControl,{...r,"aria-label":o,value:[s,u].join(""),onChange:l(e),onUnitChange:(d=e,e=>{const o={...t};o[d]=e,n(o)}),size:"__unstable-large"})));var d})))}const tu=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"}));function nu({isLinked:e,...t}){const n=e?(0,x.__)("Unlink radii"):(0,x.__)("Link radii");return(0,a.createElement)(kl.Tooltip,{text:n},(0,a.createElement)(kl.Button,{...t,className:"component-border-radius-control__linked-button",size:"small",icon:e?tu:Aa,iconSize:24,"aria-label":n}))}const ou={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},ru=0,lu={px:100,em:20,rem:20};function iu({onChange:e,values:t}){const[n,o]=(0,d.useState)(!Xc(t)||!Yc(t)),[r,l]=(0,d.useState)({flat:"string"==typeof t?(0,kl.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,kl.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,kl.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,kl.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,kl.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[i]=Ar("spacing.units"),s=(0,kl.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"]}),c=Zc(r),u=s&&s.find((e=>e.value===c)),p=u?.step||1,[m]=(0,kl.__experimentalParseQuantityAndUnitFromRawValue)(qc(t));return(0,a.createElement)("fieldset",{className:"components-border-radius-control"},(0,a.createElement)(kl.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Radius")),(0,a.createElement)("div",{className:"components-border-radius-control__wrapper"},n?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Qc,{className:"components-border-radius-control__unit-control",values:t,min:ru,onChange:e,selectedUnits:r,setSelectedUnits:l,units:s}),(0,a.createElement)(kl.RangeControl,{label:(0,x.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=m?m:"",min:ru,max:lu[c],initialPosition:0,withInputField:!1,onChange:t=>{e(void 0!==t?`${t}${c}`:void 0)},step:p,__nextHasNoMarginBottom:!0})):(0,a.createElement)(eu,{min:ru,onChange:e,selectedUnits:r,setSelectedUnits:l,values:t||ou,units:s}),(0,a.createElement)(nu,{onClick:()=>o(!n),isLinked:n})))}function su(e){return[au(e),cu(e),uu(e),du(e)].some(Boolean)}function au(e){return e?.border?.color}function cu(e){return e?.border?.radius}function uu(e){return e?.border?.style}function du(e){return e?.border?.width}function pu({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,a.createElement)(kl.__experimentalToolsPanel,{label:(0,x.__)("Border"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:Xr},r)}const mu={radius:!0,color:!0,width:!0};function hu({as:e=pu,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=mu}){const s=cl(r),c=(0,d.useCallback)((e=>Jr({settings:r},"",e)),[r]),u=e=>{const t=s.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},p=(0,d.useMemo)((()=>{if((0,kl.__experimentalHasSplitBorders)(o?.border)){const e={...o?.border};return["top","right","bottom","left"].forEach((t=>{e[t]={...e[t],color:c(e[t]?.color)}})),e}return{...o?.border,color:o?.border?.color?c(o?.border?.color):void 0}}),[o?.border,c]),m=e=>n({...t,border:e}),h=au(r),g=uu(r),f=du(r),b=cu(r),v=c(p?.radius),k=e=>m({...p,radius:e}),_=()=>{const e=t?.border?.radius;return"object"==typeof e?Object.entries(e).some(Boolean):!!e},y=(0,d.useCallback)((e=>({...e,border:void 0})),[]),E=i?.color||i?.width;return(0,a.createElement)(e,{resetAllFilter:y,value:t,onChange:n,panelId:l},(f||h)&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{hasValue:()=>(0,kl.__experimentalIsDefinedBorder)(t?.border),label:(0,x.__)("Border"),onDeselect:()=>(()=>{if(_())return m({radius:t?.border?.radius});m(void 0)})(),isShownByDefault:E,panelId:l},(0,a.createElement)(kl.__experimentalBorderBoxControl,{colors:s,enableAlpha:!0,enableStyle:g,onChange:e=>{const t={...e};(0,kl.__experimentalHasSplitBorders)(t)?["top","right","bottom","left"].forEach((e=>{t[e]&&(t[e]={...t[e],color:u(t[e]?.color)})})):t&&(t.color=u(t.color)),m({radius:p?.radius,...t})},popoverOffset:40,popoverPlacement:"left-start",value:p,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large"})),b&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{hasValue:_,label:(0,x.__)("Radius"),onDeselect:()=>k(void 0),isShownByDefault:i.radius,panelId:l},(0,a.createElement)(iu,{values:v,onChange:e=>{k(e||void 0)}})))}const gu="__experimentalBorder",fu=(e,t,n)=>{let o;return e.some((e=>e.colors.some((e=>e[t]===n&&(o=e,!0))))),o},bu=({colors:e,namedColor:t,customColor:n})=>{if(t){const n=fu(e,"slug",t);if(n)return n}if(!n)return{color:void 0};const o=fu(e,"color",n);return o||{color:n}};function vu(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function ku(e){if((0,kl.__experimentalHasSplitBorders)(e?.border))return{style:e,borderColor:void 0};const t=e?.border?.color,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o={...e};return o.border={...o.border,color:n?void 0:t},{style:ml(o),borderColor:n}}function _u(e){return(0,kl.__experimentalHasSplitBorders)(e.style?.border)?e.style:{...e.style,border:{...e.style?.border,color:e.borderColor?"var:preset|color|"+e.borderColor:e.style?.border?.color}}}function yu({children:e,resetAllFilter:t}){const n=(0,d.useCallback)((e=>{const n=_u(e),o=t(n);return{...e,...ku(o)}}),[t]);return(0,a.createElement)(xs,{group:"border",resetAllFilter:n},e)}function Eu({clientId:e,name:t,setAttributes:n,settings:o}){const r=su(o);const{style:l,borderColor:i}=(0,p.useSelect)((function(t){const{style:n,borderColor:o}=t(wr).getBlockAttributes(e)||{};return{style:n,borderColor:o}}),[e]),s=(0,d.useMemo)((()=>_u({style:l,borderColor:i})),[l,i]);if(!r)return null;const c=(0,u.getBlockSupport)(t,[gu,"__experimentalDefaultControls"]);return(0,a.createElement)(hu,{as:yu,panelId:e,settings:o,value:s,onChange:e=>{n(ku(e))},defaultControls:c})}function wu(e,t="any"){if("web"!==d.Platform.OS)return!1;const n=(0,u.getBlockSupport)(e,gu);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}function Su(e,t,n){if(!wu(t,"color")||gl(t,gu,"color"))return e;const o=Cu(n),r=pl()(e.className,o);return e.className=r||void 0,e}function Cu(e){const{borderColor:t,style:n}=e,o=jc("border-color",t);return pl()({"has-border-color":t||n?.border?.color,[o]:!!o})}const xu={useBlockProps:function({name:e,borderColor:t,style:n}){const{colors:o}=Wc();if(!wu(e,"color")||gl(e,gu,"color"))return{};const{color:r}=bu({colors:o,namedColor:t}),{color:l}=bu({colors:o,namedColor:vu(n?.border?.top?.color)}),{color:i}=bu({colors:o,namedColor:vu(n?.border?.right?.color)}),{color:s}=bu({colors:o,namedColor:vu(n?.border?.bottom?.color)}),{color:a}=bu({colors:o,namedColor:vu(n?.border?.left?.color)});return Su({style:ml({borderTopColor:l||r,borderRightColor:i||r,borderBottomColor:s||r,borderLeftColor:a||r})||{}},e,{borderColor:t,style:n})},addSaveProps:Su,attributeKeys:["borderColor","style"],hasSupport:e=>wu(e,"color")};function Bu(e){if(e)return`has-${e}-gradient-background`}function Iu(e,t){const n=e?.find((e=>e.slug===t));return n&&n.gradient}function Tu(e,t){const n=e?.find((e=>e.gradient===t));return n}function Mu(e,t){const n=Tu(e,t);return n&&n.slug}function Pu({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=y(),[o,r,l]=Ar("color.gradients.custom","color.gradients.theme","color.gradients.default"),i=(0,d.useMemo)((()=>[...o||[],...r||[],...l||[]]),[o,r,l]),{gradient:s,customGradient:a}=(0,p.useSelect)((o=>{const{getBlockAttributes:r}=o(wr),l=r(n)||{};return{customGradient:l[t],gradient:l[e]}}),[n,e,t]),{updateBlockAttributes:c}=(0,p.useDispatch)(wr),u=(0,d.useCallback)((o=>{const r=Mu(i,o);c(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[i,n,c]),m=Bu(s);let h;return h=s?Iu(i,s):a,{gradientClass:m,gradientValue:h,setGradient:u}}(0,h.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return wu(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e}));const Ru=["colors","disableCustomColors","gradients","disableCustomGradients"],Nu={color:"color",gradient:"gradient"};function Au({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,className:l,label:i,onColorChange:s,onGradientChange:c,colorValue:u,gradientValue:d,clearable:p,showTitle:m=!0,enableAlpha:h,headingLevel:g}){const f=s&&(e&&e.length>0||!n),b=c&&(t&&t.length>0||!o);if(!f&&!b)return null;const v={[Nu.color]:(0,a.createElement)(kl.ColorPalette,{value:u,onChange:b?e=>{s(e),c()}:s,colors:e,disableCustomColors:n,__experimentalIsRenderedInSidebar:r,clearable:p,enableAlpha:h,headingLevel:g}),[Nu.gradient]:(0,a.createElement)(kl.GradientPicker,{__nextHasNoMargin:!0,value:d,onChange:f?e=>{c(e),s()}:c,gradients:t,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,clearable:p,headingLevel:g})},k=e=>(0,a.createElement)("div",{className:"block-editor-color-gradient-control__panel"},v[e]),{Tabs:_}=le(kl.privateApis);return(0,a.createElement)(kl.BaseControl,{__nextHasNoMarginBottom:!0,className:pl()("block-editor-color-gradient-control",l)},(0,a.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,a.createElement)(kl.__experimentalVStack,{spacing:1},m&&(0,a.createElement)("legend",null,(0,a.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,a.createElement)(kl.BaseControl.VisualLabel,null,i))),f&&b&&(0,a.createElement)("div",null,(0,a.createElement)(_,{initialTabId:d?Nu.gradient:!!f&&Nu.color},(0,a.createElement)(_.TabList,null,(0,a.createElement)(_.Tab,{tabId:Nu.color},(0,x.__)("Solid")),(0,a.createElement)(_.Tab,{tabId:Nu.gradient},(0,x.__)("Gradient"))),(0,a.createElement)(_.TabPanel,{tabId:Nu.color,className:"block-editor-color-gradient-control__panel",focusable:!1},v.color),(0,a.createElement)(_.TabPanel,{tabId:Nu.gradient,className:"block-editor-color-gradient-control__panel",focusable:!1},v.gradient))),!b&&k(Nu.color),!f&&k(Nu.gradient))))}function Lu(e){const[t,n,o,r]=Ar("color.palette","color.gradients","color.custom","color.customGradient");return(0,a.createElement)(Au,{colors:t,gradients:n,disableCustomColors:!o,disableCustomGradients:!r,...e})}const Ou=function(e){return Ru.every((t=>e.hasOwnProperty(t)))?(0,a.createElement)(Au,{...e}):(0,a.createElement)(Lu,{...e})};function Du(e){const t=zu(e),n=Uu(e),o=Vu(e),r=Hu(e),l=Gu(e),i=Fu(e);return t||n||o||r||l||i}function zu(e){const t=cl(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function Vu(e){const t=cl(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Fu(e){const t=cl(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function Hu(e){const t=cl(e),n=ul(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function Gu(e){const t=cl(e),n=ul(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function Uu(e){const t=cl(e),n=ul(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function $u({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,a.createElement)(kl.__experimentalToolsPanel,{label:(0,x.__)("Color"),resetAll:()=>{const o=e(n);t(o)},panelId:o,hasInnerWrapper:!0,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:Xr},(0,a.createElement)("div",{className:"color-block-support-panel__inner-wrapper"},r))}const ju={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},Wu={placement:"left-start",offset:36,shift:!0},Ku=({indicators:e,label:t})=>(0,a.createElement)(kl.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(kl.__experimentalZStack,{isLayered:!1,offset:-8},e.map(((e,t)=>(0,a.createElement)(kl.Flex,{key:t,expanded:!1},(0,a.createElement)(kl.ColorIndicator,{colorValue:e}))))),(0,a.createElement)(kl.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t},t));function Zu({isGradient:e,inheritedValue:t,userValue:n,setValue:o,colorGradientControlSettings:r}){return(0,a.createElement)(Ou,{...r,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:o,onGradientChange:e?o:void 0,clearable:t===n,headingLevel:3})}function qu({label:e,hasValue:t,resetValue:n,isShownByDefault:o,indicators:r,tabs:l,colorGradientControlSettings:i,panelId:s}){const c=l.find((e=>void 0!==e.userValue)),{Tabs:u}=le(kl.privateApis);return(0,a.createElement)(kl.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:n,isShownByDefault:o,panelId:s},(0,a.createElement)(kl.Dropdown,{popoverProps:Wu,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:t,isOpen:n})=>{const o={onClick:t,className:pl()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":n}),"aria-expanded":n,"aria-label":(0,x.sprintf)((0,x.__)("Color %s styles"),e)};return(0,a.createElement)(kl.Button,{...o},(0,a.createElement)(Ku,{indicators:r,label:e}))},renderContent:()=>(0,a.createElement)(kl.__experimentalDropdownContentWrapper,{paddingSize:"none"},(0,a.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},1===l.length&&(0,a.createElement)(Zu,{...l[0],colorGradientControlSettings:i}),l.length>1&&(0,a.createElement)(u,{initialTabId:c?.key},(0,a.createElement)(u.TabList,null,l.map((e=>(0,a.createElement)(u.Tab,{key:e.key,tabId:e.key},e.label)))),l.map((e=>(0,a.createElement)(u.TabPanel,{key:e.key,tabId:e.key,focusable:!1},(0,a.createElement)(Zu,{...e,colorGradientControlSettings:i})))))))}))}function Yu({as:e=$u,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=ju,children:s}){const c=cl(r),u=ul(r),p=r?.color?.custom,m=r?.color?.customGradient,h=c.length>0||p,g=u.length>0||m,f=e=>Jr({settings:r},"",e),b=e=>{const t=c.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},v=e=>{const t=u.flatMap((({gradients:e})=>e)).find((({gradient:t})=>t===e));return t?"var:preset|gradient|"+t.slug:e},k=Uu(r),_=f(o?.color?.background),y=f(t?.color?.background),E=f(o?.color?.gradient),w=f(t?.color?.gradient),S=Vu(r),C=f(o?.elements?.link?.color?.text),B=f(t?.elements?.link?.color?.text),I=f(o?.elements?.link?.[":hover"]?.color?.text),T=f(t?.elements?.link?.[":hover"]?.color?.text),M=zu(r),P=f(o?.color?.text),R=f(t?.color?.text),N=e=>{let o=Cr(t,["color","text"],b(e));P===C&&(o=Cr(o,["elements","link","color","text"],b(e))),n(o)},A=[{name:"caption",label:(0,x.__)("Captions"),showPanel:Fu(r)},{name:"button",label:(0,x.__)("Button"),showPanel:Gu(r)},{name:"heading",label:(0,x.__)("Heading"),showPanel:Hu(r)},{name:"h1",label:(0,x.__)("H1"),showPanel:Hu(r)},{name:"h2",label:(0,x.__)("H2"),showPanel:Hu(r)},{name:"h3",label:(0,x.__)("H3"),showPanel:Hu(r)},{name:"h4",label:(0,x.__)("H4"),showPanel:Hu(r)},{name:"h5",label:(0,x.__)("H5"),showPanel:Hu(r)},{name:"h6",label:(0,x.__)("H6"),showPanel:Hu(r)}],L=(0,d.useCallback)((e=>({...e,color:void 0,elements:{...e?.elements,link:{...e?.elements?.link,color:void 0,":hover":{color:void 0}},...A.reduce(((t,n)=>({...t,[n.name]:{...e?.elements?.[n.name],color:void 0}})),{})}})),[]),O=[M&&{key:"text",label:(0,x.__)("Text"),hasValue:()=>!!R,resetValue:()=>N(void 0),isShownByDefault:i.text,indicators:[P],tabs:[{key:"text",label:(0,x.__)("Text"),inheritedValue:P,setValue:N,userValue:R}]},k&&{key:"background",label:(0,x.__)("Background"),hasValue:()=>!!y||!!w,resetValue:()=>{const e=Cr(t,["color","background"],void 0);e.color.gradient=void 0,n(e)},isShownByDefault:i.background,indicators:[null!=E?E:_],tabs:[h&&{key:"background",label:(0,x.__)("Solid"),inheritedValue:_,setValue:e=>{const o=Cr(t,["color","background"],b(e));o.color.gradient=void 0,n(o)},userValue:y},g&&{key:"gradient",label:(0,x.__)("Gradient"),inheritedValue:E,setValue:e=>{const o=Cr(t,["color","gradient"],v(e));o.color.background=void 0,n(o)},userValue:w,isGradient:!0}].filter(Boolean)},S&&{key:"link",label:(0,x.__)("Link"),hasValue:()=>!!B||!!T,resetValue:()=>{let e=Cr(t,["elements","link",":hover","color","text"],void 0);e=Cr(e,["elements","link","color","text"],void 0),n(e)},isShownByDefault:i.link,indicators:[C,I],tabs:[{key:"link",label:(0,x.__)("Default"),inheritedValue:C,setValue:e=>{n(Cr(t,["elements","link","color","text"],b(e)))},userValue:B},{key:"hover",label:(0,x.__)("Hover"),inheritedValue:I,setValue:e=>{n(Cr(t,["elements","link",":hover","color","text"],b(e)))},userValue:T}]}].filter(Boolean);return A.forEach((({name:e,label:r,showPanel:l})=>{if(!l)return;const s=f(o?.elements?.[e]?.color?.background),a=f(o?.elements?.[e]?.color?.gradient),c=f(o?.elements?.[e]?.color?.text),u=f(t?.elements?.[e]?.color?.background),d=f(t?.elements?.[e]?.color?.gradient),p=f(t?.elements?.[e]?.color?.text),m="caption"!==e;O.push({key:e,label:r,hasValue:()=>!!(p||u||d),resetValue:()=>{const o=Cr(t,["elements",e,"color","background"],void 0);o.elements[e].color.gradient=void 0,o.elements[e].color.text=void 0,n(o)},isShownByDefault:i[e],indicators:m?[c,null!=a?a:s]:[c],tabs:[h&&{key:"text",label:(0,x.__)("Text"),inheritedValue:c,setValue:o=>{n(Cr(t,["elements",e,"color","text"],b(o)))},userValue:p},h&&m&&{key:"background",label:(0,x.__)("Background"),inheritedValue:s,setValue:o=>{const r=Cr(t,["elements",e,"color","background"],b(o));r.elements[e].color.gradient=void 0,n(r)},userValue:u},g&&m&&{key:"gradient",label:(0,x.__)("Gradient"),inheritedValue:a,setValue:o=>{const r=Cr(t,["elements",e,"color","gradient"],v(o));r.elements[e].color.background=void 0,n(r)},userValue:d,isGradient:!0}].filter(Boolean)})})),(0,a.createElement)(e,{resetAllFilter:L,value:t,onChange:n,panelId:l},O.map((e=>(0,a.createElement)(qu,{key:e.key,...e,colorGradientControlSettings:{colors:c,disableCustomColors:!p,gradients:u,disableCustomGradients:!m},panelId:l}))),s)}zc([Vc,Gc]);const Xu=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fallbackLinkColor:o,fontSize:r,isLargeText:l,textColor:i,linkColor:s,enableAlphaChecker:c=!1}){const u=e||t;if(!u)return null;const d=i||n,p=s||o;if(!d&&!p)return null;const m=[{color:d,description:(0,x.__)("text color")},{color:p,description:(0,x.__)("link color")}],h=Oc(u),g=h.alpha()<1,f=h.brightness(),b={level:"AA",size:l||!1!==l&&r>=24?"large":"small"};let v="",k="";for(const e of m){if(!e.color)continue;const t=Oc(e.color),n=t.isReadable(h,b),o=t.alpha()<1;if(!n){if(g||o)continue;v=f({refs:new Map,callbacks:new Map})),[]);return(0,a.createElement)(Qu.Provider,{value:t},e)}function ed(e){const{refs:t,callbacks:n}=(0,d.useContext)(Qu),o=(0,d.useRef)();return(0,d.useLayoutEffect)((()=>(t.set(o,e),()=>{t.delete(o)})),[e]),(0,m.useRefEffect)((t=>{o.current=t,n.forEach(((n,o)=>{e===n&&o(t)}))}),[e])}function td(e){const{refs:t}=(0,d.useContext)(Qu),n=(0,d.useRef)();return n.current=e,(0,d.useMemo)((()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}})),[])}function nd(e){const{callbacks:t}=(0,d.useContext)(Qu),n=td(e),[o,r]=(0,d.useState)(null);return(0,d.useLayoutEffect)((()=>{if(e)return t.set(r,e),()=>{t.delete(r)}}),[e]),n.current||o}function od(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function rd({clientId:e}){const[t,n]=(0,d.useState)(),[o,r]=(0,d.useState)(),[l,i]=(0,d.useState)(),s=td(e);return(0,d.useEffect)((()=>{if(!s.current)return;r(od(s.current).color);const e=s.current?.querySelector("a");e&&e.innerText&&i(od(e).color);let t=s.current,o=od(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&t.parentNode&&t.parentNode.nodeType===t.parentNode.ELEMENT_NODE;)t=t.parentNode,o=od(t).backgroundColor;n(o)})),(0,a.createElement)(Xu,{backgroundColor:t,textColor:o,enableAlphaChecker:!0,linkColor:l})}const ld="color",id=e=>{const t=(0,u.getBlockSupport)(e,ld);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},sd=e=>{if("web"!==d.Platform.OS)return!1;const t=(0,u.getBlockSupport)(e,ld);return null!==t&&"object"==typeof t&&!!t.link},ad=e=>{const t=(0,u.getBlockSupport)(e,ld);return null!==t&&"object"==typeof t&&!!t.gradients},cd=e=>{const t=(0,u.getBlockSupport)(e,ld);return t&&!1!==t.background},ud=e=>{const t=(0,u.getBlockSupport)(e,ld);return t&&!1!==t.text};function dd(e,t,n){if(!id(t)||gl(t,ld))return e;const o=ad(t),{backgroundColor:r,textColor:l,gradient:i,style:s}=n,a=e=>!gl(t,ld,e),c=a("text")?jc("color",l):void 0,u=a("gradients")?Bu(i):void 0,d=a("background")?jc("background-color",r):void 0,p=a("background")||a("gradients"),m=r||s?.color?.background||o&&(i||s?.color?.gradient),h=pl()(e.className,c,u,{[d]:!(o&&s?.color?.gradient||!d),"has-text-color":a("text")&&(l||s?.color?.text),"has-background":p&&m,"has-link-color":a("link")&&s?.elements?.link?.color});return e.className=h||void 0,e}function pd(e){const t=e?.color?.text,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o=e?.color?.background,r=o?.startsWith("var:preset|color|")?o.substring(17):void 0,l=e?.color?.gradient,i=l?.startsWith("var:preset|gradient|")?l.substring(20):void 0,s={...e};return s.color={...s.color,text:n?void 0:t,background:r?void 0:o,gradient:i?void 0:l},{style:ml(s),textColor:n,backgroundColor:r,gradient:i}}function md(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function hd({children:e,resetAllFilter:t}){const n=(0,d.useCallback)((e=>{const n=md(e),o=t(n);return{...e,...pd(o)}}),[t]);return(0,a.createElement)(xs,{group:"color",resetAllFilter:n},e)}function gd({clientId:e,name:t,setAttributes:n,settings:o}){const r=Du(o);const{style:l,textColor:i,backgroundColor:s,gradient:c}=(0,p.useSelect)((function(t){const{style:n,textColor:o,backgroundColor:r,gradient:l}=t(wr).getBlockAttributes(e)||{};return{style:n,textColor:o,backgroundColor:r,gradient:l}}),[e]),m=(0,d.useMemo)((()=>md({style:l,textColor:i,backgroundColor:s,gradient:c})),[l,i,s,c]);if(!r)return null;const h=(0,u.getBlockSupport)(t,[ld,"__experimentalDefaultControls"]),g="web"===d.Platform.OS&&!m?.color?.gradient&&(o?.color?.text||o?.color?.link)&&!1!==(0,u.getBlockSupport)(t,[ld,"enableContrastChecker"]);return(0,a.createElement)(Yu,{as:hd,panelId:e,settings:o,value:m,onChange:e=>{n(pd(e))},defaultControls:h,enableContrastChecker:!1!==(0,u.getBlockSupport)(t,[ld,"enableContrastChecker"])},g&&(0,a.createElement)(rd,{clientId:e}))}const fd={useBlockProps:function({name:e,backgroundColor:t,textColor:n,gradient:o,style:r}){const[l,i,s]=Ar("color.palette.custom","color.palette.theme","color.palette.default"),a=(0,d.useMemo)((()=>[...l||[],...i||[],...s||[]]),[l,i,s]);if(!id(e)||gl(e,ld))return{};const c={};n&&!gl(e,ld,"text")&&(c.color=Uc(a,n)?.color),t&&!gl(e,ld,"background")&&(c.backgroundColor=Uc(a,t)?.color);const u=dd({style:c},e,{textColor:n,backgroundColor:t,gradient:o,style:r}),p=t||r?.color?.background||o||r?.color?.gradient;return{...u,className:pl()(u.className,!p&&lc(r))}},addSaveProps:dd,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:id},bd={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function vd({value:e="",onChange:t,fontFamilies:n,...o}){const[r]=Ar("typography.fontFamilies");if(n||(n=r),!n||0===n.length)return null;const l=[{value:"",label:(0,x.__)("Default")},...n.map((({fontFamily:e,name:t})=>({value:e,label:t||e})))];return(0,a.createElement)(kl.SelectControl,{label:(0,x.__)("Font"),options:l,value:e,onChange:t,labelPosition:"top",...o})}(0,h.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return id(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),ad(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,h.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return hl({linkColor:sd(r),textColor:ud(r),backgroundColor:cd(r),gradient:ad(r)},bd,e,t,n,o)}));const kd=[{name:(0,x._x)("Regular","font style"),value:"normal"},{name:(0,x._x)("Italic","font style"),value:"italic"}],_d=[{name:(0,x._x)("Thin","font weight"),value:"100"},{name:(0,x._x)("Extra Light","font weight"),value:"200"},{name:(0,x._x)("Light","font weight"),value:"300"},{name:(0,x._x)("Regular","font weight"),value:"400"},{name:(0,x._x)("Medium","font weight"),value:"500"},{name:(0,x._x)("Semi Bold","font weight"),value:"600"},{name:(0,x._x)("Bold","font weight"),value:"700"},{name:(0,x._x)("Extra Bold","font weight"),value:"800"},{name:(0,x._x)("Black","font weight"),value:"900"}],yd=(e,t)=>e?t?(0,x.__)("Appearance"):(0,x.__)("Font style"):(0,x.__)("Font weight");function Ed(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:l},...i}=e,s=n||o,c=yd(n,o),u={key:"default",name:(0,x.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},p=(0,d.useMemo)((()=>n&&o?(()=>{const e=[u];return kd.forEach((({name:t,value:n})=>{_d.forEach((({name:o,value:r})=>{const l="normal"===n?o:(0,x.sprintf)((0,x.__)("%1$s %2$s"),o,t);e.push({key:`${n}-${r}`,name:l,style:{fontStyle:n,fontWeight:r}})}))})),e})():n?(()=>{const e=[u];return kd.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})})),e})():(()=>{const e=[u];return _d.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})})),e})()),[e.options]),m=p.find((e=>e.style.fontStyle===r&&e.style.fontWeight===l))||p[0];return s&&(0,a.createElement)(kl.CustomSelectControl,{...i,className:"components-font-appearance-control",label:c,describedBy:m?n?o?(0,x.sprintf)((0,x.__)("Currently selected font appearance: %s"),m.name):(0,x.sprintf)((0,x.__)("Currently selected font style: %s"),m.name):(0,x.sprintf)((0,x.__)("Currently selected font weight: %s"),m.name):(0,x.__)("No selected font appearance"),options:p,value:m,onChange:({selectedItem:e})=>t(e.style),__nextUnconstrainedWidth:!0})}const wd=1.5;const Sd=({value:e,onChange:t,__nextHasNoMarginBottom:n=!1,__unstableInputWidth:o="60px",...r})=>{const l=function(e){return void 0!==e&&""!==e}(e),i=(e,t)=>{if(l)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return wd;default:return e}},s=l?e:"";n||w()("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"});const c=n?void 0:{marginBottom:24};return(0,a.createElement)("div",{className:"block-editor-line-height-control",style:c},(0,a.createElement)(kl.__experimentalNumberControl,{...r,__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{const n=["insertText","insertFromPaste"].includes(t.payload.event.nativeEvent?.inputType),o=i(e.value,n);return{...e,value:o}},onChange:(e,{event:n})=>{""!==e?"click"!==n.type?t(`${e}`):t(i(`${e}`,!1)):t()},label:(0,x.__)("Line height"),placeholder:wd,step:.01,spinFactor:10,value:s,min:0,spinControls:"custom"}))};function Cd({value:e,onChange:t,__unstableInputWidth:n="60px",...o}){const[r]=Ar("spacing.units"),l=(0,kl.__experimentalUseCustomUnits)({availableUnits:r||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,a.createElement)(kl.__experimentalUnitControl,{...o,label:(0,x.__)("Letter spacing"),value:e,__unstableInputWidth:n,units:l,onChange:t})}const xd=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M7 11.5h10V13H7z"})),Bd=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),Id=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),Td=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})),Md=[{name:(0,x.__)("None"),value:"none",icon:xd},{name:(0,x.__)("Uppercase"),value:"uppercase",icon:Bd},{name:(0,x.__)("Lowercase"),value:"lowercase",icon:Id},{name:(0,x.__)("Capitalize"),value:"capitalize",icon:Td}];function Pd({className:e,value:t,onChange:n}){return(0,a.createElement)("fieldset",{className:pl()("block-editor-text-transform-control",e)},(0,a.createElement)(kl.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Letter case")),(0,a.createElement)("div",{className:"block-editor-text-transform-control__buttons"},Md.map((e=>(0,a.createElement)(kl.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const Rd=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),Nd=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"})),Ad=[{name:(0,x.__)("None"),value:"none",icon:xd},{name:(0,x.__)("Underline"),value:"underline",icon:Rd},{name:(0,x.__)("Strikethrough"),value:"line-through",icon:Nd}];function Ld({value:e,onChange:t,className:n}){return(0,a.createElement)("fieldset",{className:pl()("block-editor-text-decoration-control",n)},(0,a.createElement)(kl.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Decoration")),(0,a.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},Ad.map((n=>(0,a.createElement)(kl.Button,{key:n.value,icon:n.icon,label:n.name,isPressed:n.value===e,onClick:()=>{t(n.value===e?void 0:n.value)}})))))}const Od=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z"})),Dd=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z"})),zd=[{name:(0,x.__)("Horizontal"),value:"horizontal-tb",icon:Od},{name:(0,x.__)("Vertical"),value:(0,x.isRTL)()?"vertical-lr":"vertical-rl",icon:Dd}];function Vd({className:e,value:t,onChange:n}){return(0,a.createElement)("fieldset",{className:pl()("block-editor-writing-mode-control",e)},(0,a.createElement)(kl.BaseControl.VisualLabel,{as:"legend"},(0,x.__)("Orientation")),(0,a.createElement)("div",{className:"block-editor-writing-mode-control__buttons"},zd.map((e=>(0,a.createElement)(kl.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const Fd=1,Hd=6;function Gd(e){const t=$d(e),n=jd(e),o=Wd(e),r=Kd(e),l=Zd(e),i=qd(e),s=Yd(e),a=Xd(e),c=Ud(e);return t||n||o||r||l||c||i||s||a}function Ud(e){return Nr(e?.typography?.fontSizes)||e?.typography?.customFontSize}function $d(e){return Nr(e?.typography?.fontFamilies)}function jd(e){return e?.typography?.lineHeight}function Wd(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function Kd(e){return e?.typography?.letterSpacing}function Zd(e){return e?.typography?.textTransform}function qd(e){return e?.typography?.textDecoration}function Yd(e){return e?.typography?.writingMode}function Xd(e){return e?.typography?.textColumns}function Qd({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,a.createElement)(kl.__experimentalToolsPanel,{label:(0,x.__)("Typography"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:Xr},r)}const Jd={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textTransform:!0,textDecoration:!0,writingMode:!0,textColumns:!0};function ep({as:e=Qd,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=Jd}){const s=e=>Jr({settings:r},"",e),c=$d(r),u=r?.typography?.fontFamilies,p=u?Pr(u):[],m=s(o?.typography?.fontFamily),h=e=>{const o=p?.find((({fontFamily:t})=>t===e))?.slug;n(Cr(t,["typography","fontFamily"],o?`var:preset|font-family|${o}`:e||void 0))},g=Ud(r),f=!r?.typography?.customFontSize,b=function(e){const t=e?.typography?.fontSizes,n=t?Pr(t):[],o=[];for(const e of n)o.some((({slug:t})=>t===e.slug))||o.push(e);return o}(r),v=s(o?.typography?.fontSize),k=(e,o)=>{n(Cr(t,["typography","fontSize"],(o?.slug?`var:preset|font-size|${o?.slug}`:e)||void 0))},_=Wd(r),y=function(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,x.__)("Appearance"):(0,x.__)("Font style"):(0,x.__)("Font weight")}(r),E=r?.typography?.fontStyle,w=r?.typography?.fontWeight,S=s(o?.typography?.fontStyle),C=s(o?.typography?.fontWeight),B=({fontStyle:e,fontWeight:o})=>{n({...t,typography:{...t?.typography,fontStyle:e||void 0,fontWeight:o||void 0}})},I=jd(r),T=s(o?.typography?.lineHeight),M=e=>{n(Cr(t,["typography","lineHeight"],e||void 0))},P=Kd(r),R=s(o?.typography?.letterSpacing),N=e=>{n(Cr(t,["typography","letterSpacing"],e||void 0))},A=Xd(r),L=s(o?.typography?.textColumns),O=e=>{n(Cr(t,["typography","textColumns"],e||void 0))},D=Zd(r),z=s(o?.typography?.textTransform),V=e=>{n(Cr(t,["typography","textTransform"],e||void 0))},F=qd(r),H=s(o?.typography?.textDecoration),G=e=>{n(Cr(t,["typography","textDecoration"],e||void 0))},U=Yd(r),$=s(o?.typography?.writingMode),j=e=>{n(Cr(t,["typography","writingMode"],e||void 0))},W=(0,d.useCallback)((e=>({...e,typography:{}})),[]);return(0,a.createElement)(e,{resetAllFilter:W,value:t,onChange:n,panelId:l},c&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{label:(0,x.__)("Font family"),hasValue:()=>!!t?.typography?.fontFamily,onDeselect:()=>h(void 0),isShownByDefault:i.fontFamily,panelId:l},(0,a.createElement)(vd,{fontFamilies:p,value:m,onChange:h,size:"__unstable-large",__nextHasNoMarginBottom:!0})),g&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{label:(0,x.__)("Font size"),hasValue:()=>!!t?.typography?.fontSize,onDeselect:()=>k(void 0),isShownByDefault:i.fontSize,panelId:l},(0,a.createElement)(kl.FontSizePicker,{value:v,onChange:k,fontSizes:b,disableCustomFontSizes:f,withReset:!1,withSlider:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})),_&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{className:"single-column",label:y,hasValue:()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,onDeselect:()=>{B({})},isShownByDefault:i.fontAppearance,panelId:l},(0,a.createElement)(Ed,{value:{fontStyle:S,fontWeight:C},onChange:B,hasFontStyles:E,hasFontWeights:w,size:"__unstable-large",__nextHasNoMarginBottom:!0})),I&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Line height"),hasValue:()=>void 0!==t?.typography?.lineHeight,onDeselect:()=>M(void 0),isShownByDefault:i.lineHeight,panelId:l},(0,a.createElement)(Sd,{__nextHasNoMarginBottom:!0,__unstableInputWidth:"auto",value:T,onChange:M,size:"__unstable-large"})),P&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Letter spacing"),hasValue:()=>!!t?.typography?.letterSpacing,onDeselect:()=>N(void 0),isShownByDefault:i.letterSpacing,panelId:l},(0,a.createElement)(Cd,{value:R,onChange:N,size:"__unstable-large",__unstableInputWidth:"auto"})),A&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Text columns"),hasValue:()=>!!t?.typography?.textColumns,onDeselect:()=>O(void 0),isShownByDefault:i.textColumns,panelId:l},(0,a.createElement)(kl.__experimentalNumberControl,{label:(0,x.__)("Text columns"),max:Hd,min:Fd,onChange:O,size:"__unstable-large",spinControls:"custom",value:L,initialPosition:1})),F&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Text decoration"),hasValue:()=>!!t?.typography?.textDecoration,onDeselect:()=>G(void 0),isShownByDefault:i.textDecoration,panelId:l},(0,a.createElement)(Ld,{value:H,onChange:G,size:"__unstable-large",__unstableInputWidth:"auto"})),U&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Text orientation"),hasValue:()=>!!t?.typography?.writingMode,onDeselect:()=>j(void 0),isShownByDefault:i.writingMode,panelId:l},(0,a.createElement)(Vd,{value:$,onChange:j,size:"__unstable-large",__nextHasNoMarginBottom:!0})),D&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{label:(0,x.__)("Letter case"),hasValue:()=>!!t?.typography?.textTransform,onDeselect:()=>V(void 0),isShownByDefault:i.textTransform,panelId:l},(0,a.createElement)(Pd,{value:z,onChange:V,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})))}const tp="typography.lineHeight";const np=window.wp.tokenList;var op=n.n(np);const rp="typography.__experimentalFontFamily";function lp(e,t,n){if(!(0,u.hasBlockSupport)(t,rp))return e;if(gl(t,gp,"fontFamily"))return e;if(!n?.fontFamily)return e;const o=new(op())(e.className),{kebabCase:r}=le(kl.privateApis);o.add(`has-${r(n?.fontFamily)}-font-family`);const l=o.value;return e.className=l||void 0,e}const ip={useBlockProps:function({name:e,fontFamily:t}){return lp({},e,{fontFamily:t})},addSaveProps:lp,attributeKeys:["fontFamily"],hasSupport:e=>(0,u.hasBlockSupport)(e,rp)};(0,h.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,u.hasBlockSupport)(e,rp)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e}));const sp=(e,t,n)=>{if(t){const n=e?.find((({slug:e})=>e===t));if(n)return n}return{size:n}};function ap(e,t){const n=e?.find((({size:e})=>e===t));return n||{size:t}}function cp(e){if(!e)return;const{kebabCase:t}=le(kl.privateApis);return`has-${t(e)}-font-size`}const up="typography.fontSize";function dp(e,t,n){if(!(0,u.hasBlockSupport)(t,up))return e;if(gl(t,gp,"fontSize"))return e;const o=new(op())(e.className);o.add(cp(n.fontSize));const r=o.value;return e.className=r||void 0,e}const pp={useBlockProps:function({name:e,fontSize:t,style:n}){const[o]=Ar("typography.fontSizes");if(!(0,u.hasBlockSupport)(e,up)||gl(e,gp,"fontSize")||!t)return;let r={};n?.typography?.fontSize||(r={style:{fontSize:sp(o,t,n?.typography?.fontSize).size}});const l=Kr((0,p.select)(wr).getSettings().__experimentalFeatures);return t&&(r={style:{fontSize:jr({size:t},l)}}),dp(r,e,{fontSize:t})},addSaveProps:dp,attributeKeys:["fontSize","style"],hasSupport:e=>(0,u.hasBlockSupport)(e,up)},mp={fontSize:[["fontSize"],["style","typography","fontSize"]]};function hp(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))}(0,h.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,u.hasBlockSupport)(e,up)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,h.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){const r=e.name;return hl({fontSize:(0,u.hasBlockSupport)(r,up)},mp,e,t,n,o)}));const gp="typography",fp=[tp,up,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",rp,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalWritingMode","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing"];function bp(e){const t={...hp(e,["fontFamily"])},n=e?.typography?.fontSize,o=e?.typography?.fontFamily,r=n?.startsWith("var:preset|font-size|")?n.substring(21):void 0,l=o?.startsWith("var:preset|font-family|")?o.substring(23):void 0;return t.typography={...hp(t.typography,["fontFamily"]),fontSize:r?void 0:n},{style:ml(t),fontFamily:l,fontSize:r}}function vp(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function kp({children:e,resetAllFilter:t}){const n=(0,d.useCallback)((e=>{const n=vp(e),o=t(n);return{...e,...bp(o)}}),[t]);return(0,a.createElement)(xs,{group:"typography",resetAllFilter:n},e)}function _p({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,fontFamily:l,fontSize:i}=(0,p.useSelect)((function(t){const{style:n,fontFamily:o,fontSize:r}=t(wr).getBlockAttributes(e)||{};return{style:n,fontFamily:o,fontSize:r}}),[e]),s=Gd(o),c=(0,d.useMemo)((()=>vp({style:r,fontFamily:l,fontSize:i})),[r,i,l]);if(!s)return null;const m=(0,u.getBlockSupport)(t,[gp,"__experimentalDefaultControls"]);return(0,a.createElement)(ep,{as:kp,panelId:e,settings:o,value:c,onChange:e=>{n(bp(e))},defaultControls:m})}const yp=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,a.createElement)(Z.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})),Ep={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};function wp({icon:e,isMixed:t=!1,minimumCustomValue:n,onChange:o,onMouseOut:r,onMouseOver:l,showSideInLabel:i=!0,side:s,spacingSizes:c,type:u,value:h}){var g,f;h=Ql(h,c);let b=c;const v=c.length<=8,k=(0,p.useSelect)((e=>{const t=e(wr).getSettings();return t?.disableCustomSpacingSizes})),[_,y]=(0,d.useState)(!k&&void 0!==h&&!Yl(h)),E=(0,m.usePrevious)(h);h&&E!==h&&!Yl(h)&&!0!==_&&y(!0);const[w]=Ar("spacing.units"),S=(0,kl.__experimentalUseCustomUnits)({availableUnits:w||["px","em","rem"]});let C=null;!v&&!_&&void 0!==h&&(!Yl(h)||Yl(h)&&t)?(b=[...c,{name:t?(0,x.__)("Mixed"):(0,x.sprintf)((0,x.__)("Custom (%s)"),h),slug:"custom",size:h}],C=b.length-1):t||(C=_?Xl(h,c):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":ei(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(h,c));const B=(0,d.useMemo)((()=>(0,kl.__experimentalParseQuantityAndUnitFromRawValue)(C)),[C])[1]||S[0]?.value,I=parseFloat(C,10),T=(e,t)=>{const n=parseInt(e,10);if("selectList"===t){if(0===n)return;if(1===n)return"0"}else if(0===n)return"0";return`var:preset|spacing|${c[e]?.slug}`},M=t?(0,x.__)("Mixed"):null,P=b.map(((e,t)=>({key:t,name:e.name}))),R=c.map(((e,t)=>({value:t,label:void 0}))),N=jl.includes(s)&&i?Zl[s]:"",A=i?u?.toLowerCase():u,L=(0,x.sprintf)((0,x.__)("%1$s %2$s"),N,A).trim();return(0,a.createElement)(kl.__experimentalHStack,{className:"spacing-sizes-control__wrapper"},e&&(0,a.createElement)(kl.Icon,{className:"spacing-sizes-control__icon",icon:e,size:24}),_&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kl.__experimentalUnitControl,{onMouseOver:l,onMouseOut:r,onFocus:l,onBlur:r,onChange:e=>o((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:C,units:S,min:n,placeholder:M,disableUnits:t,label:L,hideLabelFromVision:!0,className:"spacing-sizes-control__custom-value-input",size:"__unstable-large"}),(0,a.createElement)(kl.RangeControl,{onMouseOver:l,onMouseOut:r,onFocus:l,onBlur:r,value:I,min:0,max:null!==(g=Ep[B]?.max)&&void 0!==g?g:10,step:null!==(f=Ep[B]?.steps)&&void 0!==f?f:.1,withInputField:!1,onChange:e=>{o([e,B].join(""))},className:"spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0})),v&&!_&&(0,a.createElement)(kl.RangeControl,{onMouseOver:l,onMouseOut:r,className:"spacing-sizes-control__range-control",value:C,onChange:e=>o(T(e)),onMouseDown:e=>{e?.nativeEvent?.offsetX<35&&void 0===h&&o("0")},withInputField:!1,"aria-valuenow":C,"aria-valuetext":c[C]?.name,renderTooltipContent:e=>void 0===h?void 0:c[e]?.name,min:0,max:c.length-1,marks:R,label:L,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:l,onBlur:r}),!v&&!_&&(0,a.createElement)(kl.CustomSelectControl,{className:"spacing-sizes-control__custom-select-control",value:P.find((e=>e.key===C))||"",onChange:e=>{o(T(e.selectedItem.key,"selectList"))},options:P,label:L,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0,size:"__unstable-large",onMouseOver:l,onMouseOut:r,onFocus:l,onBlur:r}),!k&&(0,a.createElement)(kl.Button,{label:_?(0,x.__)("Use size preset"):(0,x.__)("Set custom size"),icon:yp,onClick:()=>{y(!_)},isPressed:_,size:"small",className:"spacing-sizes-control__custom-toggle",iconSize:24}))}const Sp=["vertical","horizontal"];function Cp({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:l,type:i,values:s}){const c=e=>n=>{if(!t)return;const o={...Object.keys(s).reduce(((e,t)=>(e[t]=Ql(s[t],l),e)),{})};"vertical"===e&&(o.top=n,o.bottom=n),"horizontal"===e&&(o.left=n,o.right=n),t(o)},u=r?.length?Sp.filter((e=>ti(r,e))):Sp;return(0,a.createElement)(a.Fragment,null,u.map((t=>{const r="vertical"===t?s.top:s.left;return(0,a.createElement)(wp,{key:`spacing-sizes-control-${t}`,icon:Kl[t],label:Zl[t],minimumCustomValue:e,onChange:c(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:l,type:i,value:r,withInputField:!1})})))}function xp({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:l,type:i,values:s}){const c=r?.length?jl.filter((e=>r.includes(e))):jl,u=e=>n=>{const o={...Object.keys(s).reduce(((e,t)=>(e[t]=Ql(s[t],l),e)),{})};o[e]=n,t(o)};return(0,a.createElement)(a.Fragment,null,c.map((t=>(0,a.createElement)(wp,{key:`spacing-sizes-control-${t}`,icon:Kl[t],label:Zl[t],minimumCustomValue:e,onChange:u(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:l,type:i,value:s[t],withInputField:!1}))))}function Bp({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:l,spacingSizes:i,type:s,values:c}){return(0,a.createElement)(wp,{label:Zl[l],minimumCustomValue:e,onChange:(u=l,e=>{const n={...Object.keys(c).reduce(((e,t)=>(e[t]=Ql(c[t],i),e)),{})};n[u]=e,t(n)}),onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:l,spacingSizes:i,type:s,value:c[l],withInputField:!1});var u}const Ip=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),Tp=(0,a.createElement)(kl.Icon,{icon:Ip,size:24});function Mp({label:e,onChange:t,sides:n,value:o}){if(!n||!n.length)return;const r=function(e){if(!e||!e.length)return{};const t={},n=ti(e,"horizontal"),o=ti(e,"vertical");n&&o?t.axial={label:Zl.axial,icon:Kl.axial}:n?t.axial={label:Zl.horizontal,icon:Kl.horizontal}:o&&(t.axial={label:Zl.vertical,icon:Kl.vertical});let r=0;return jl.forEach((n=>{e.includes(n)&&(r+=1,t[n]={label:Zl[n],icon:Kl[n]})})),r>1&&(t.custom={label:Zl.custom,icon:Kl.custom}),t}(n),l=r[o].icon,{custom:i,...s}=r;return(0,a.createElement)(kl.DropdownMenu,{icon:l,label:e,className:"spacing-sizes-control__dropdown",toggleProps:{isSmall:!0}},(({onClose:e})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kl.MenuGroup,null,Object.entries(s).map((([n,{label:r,icon:l}])=>{const i=o===n;return(0,a.createElement)(kl.MenuItem,{key:n,icon:l,iconPosition:"left",isSelected:i,role:"menuitemradio",onClick:()=>{t(n),e()},suffix:i?Tp:void 0},r)}))),!!i&&(0,a.createElement)(kl.MenuGroup,null,(0,a.createElement)(kl.MenuItem,{icon:i.icon,iconPosition:"left",isSelected:o===ql.custom,role:"menuitemradio",onClick:()=>{t(ql.custom),e()},suffix:o===ql.custom?Tp:void 0},i.label)))))}function Pp({inputProps:e,label:t,minimumCustomValue:n=0,onChange:o,onMouseOut:r,onMouseOver:l,showSideInLabel:i=!0,sides:s=jl,useSelect:c,values:u}){const p=function(){const e=[{name:0,slug:"0",size:0}],[t]=Ar("spacing.spacingSizes");return t&&e.push(...t),e.length>8&&e.unshift({name:(0,x.__)("Default"),slug:"default",size:void 0}),e}(),m=u||Wl,h=1===s?.length,g=s?.includes("horizontal")&&s?.includes("vertical")&&2===s?.length,[f,b]=(0,d.useState)(function(e={},t){const{top:n,right:o,bottom:r,left:l}=e,i=[n,o,r,l].filter(Boolean),s=!(n!==r||l!==o||!n&&!l),a=!i.length&&function(e=[]){const t={top:0,right:0,bottom:0,left:0};return e.forEach((e=>t[e]+=1)),(t.top+t.bottom)%2==0&&(t.left+t.right)%2==0}(t);if(ti(t)&&(s||a))return ql.axial;if(1===i.length){let t;return Object.entries(e).some((([e,n])=>(t=e,void 0!==n))),t}return 1!==t?.length||i.length?ql.custom:t[0]}(m,s)),v={...e,minimumCustomValue:n,onChange:e=>{const t={...u,...e};o(t)},onMouseOut:r,onMouseOver:l,sides:s,spacingSizes:p,type:t,useSelect:c,values:m},k=jl.includes(f)&&i?Zl[f]:"",_=(0,x.sprintf)((0,x.__)("%1$s %2$s"),t,k).trim(),y=(0,x.sprintf)((0,x._x)("%s options","Button label to reveal side configuration options"),t);return(0,a.createElement)("fieldset",{className:"spacing-sizes-control"},(0,a.createElement)(kl.__experimentalHStack,{className:"spacing-sizes-control__header"},(0,a.createElement)(kl.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label"},_),!h&&!g&&(0,a.createElement)(Mp,{label:y,onChange:b,sides:s,value:f})),f===ql.axial?(0,a.createElement)(Cp,{...v}):f===ql.custom?(0,a.createElement)(xp,{...v}):(0,a.createElement)(Bp,{side:f,...v,showSideInLabel:i}))}const Rp={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}};function Np({label:e=(0,x.__)("Height"),onChange:t,value:n}){var o,r;const l=parseFloat(n),[i]=Ar("spacing.units"),s=(0,kl.__experimentalUseCustomUnits)({availableUnits:i||["%","px","em","rem","vh","vw"]}),c=(0,d.useMemo)((()=>(0,kl.__experimentalParseQuantityAndUnitFromRawValue)(n)),[n])[1]||s[0]?.value||"px";return(0,a.createElement)("fieldset",{className:"block-editor-height-control"},(0,a.createElement)(kl.BaseControl.VisualLabel,{as:"legend"},e),(0,a.createElement)(kl.Flex,null,(0,a.createElement)(kl.FlexItem,{isBlock:!0},(0,a.createElement)(kl.__experimentalUnitControl,{value:n,units:s,onChange:t,onUnitChange:e=>{const[o,r]=(0,kl.__experimentalParseQuantityAndUnitFromRawValue)(n);["em","rem"].includes(e)&&"px"===r?t((o/16).toFixed(2)+e):["em","rem"].includes(r)&&"px"===e?t(Math.round(16*o)+e):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(e)&&o>100&&t(100+e)},min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})),(0,a.createElement)(kl.FlexItem,{isBlock:!0},(0,a.createElement)(kl.__experimentalSpacer,{marginX:2,marginBottom:0},(0,a.createElement)(kl.RangeControl,{value:l,min:0,max:null!==(o=Rp[c]?.max)&&void 0!==o?o:100,step:null!==(r=Rp[c]?.step)&&void 0!==r?r:.1,withInputField:!1,onChange:e=>{t([e,c].join(""))},__nextHasNoMarginBottom:!0,label:e,hideLabelFromVision:!0})))))}function Ap(e,t){const{orientation:n="horizontal"}=t;return"fill"===e?(0,x.__)("Stretch to fill available space."):"fixed"===e&&"horizontal"===n?(0,x.__)("Specify a fixed width."):"fixed"===e?(0,x.__)("Specify a fixed height."):(0,x.__)("Fit contents.")}function Lp({value:e={},onChange:t,parentLayout:n}){const{selfStretch:o,flexSize:r}=e;return(0,d.useEffect)((()=>{"fixed"!==o||r||t({...e,selfStretch:"fit"})}),[]),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kl.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:Op(n),value:o||"fit",help:Ap(o,n),onChange:n=>{const o="fixed"!==n?null:r;t({...e,selfStretch:n,flexSize:o})},isBlock:!0},(0,a.createElement)(kl.__experimentalToggleGroupControlOption,{key:"fit",value:"fit",label:(0,x.__)("Fit")}),(0,a.createElement)(kl.__experimentalToggleGroupControlOption,{key:"fill",value:"fill",label:(0,x.__)("Fill")}),(0,a.createElement)(kl.__experimentalToggleGroupControlOption,{key:"fixed",value:"fixed",label:(0,x.__)("Fixed")})),"fixed"===o&&(0,a.createElement)(kl.__experimentalUnitControl,{size:"__unstable-large",onChange:n=>{t({...e,flexSize:n})},value:r}))}function Op(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,x.__)("Width"):(0,x.__)("Height")}const Dp=[{label:(0,x._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},{label:(0,x._x)("Square - 1:1","Aspect ratio option for dimensions control"),value:"1"},{label:(0,x._x)("Standard - 4:3","Aspect ratio option for dimensions control"),value:"4/3"},{label:(0,x._x)("Portrait - 3:4","Aspect ratio option for dimensions control"),value:"3/4"},{label:(0,x._x)("Classic - 3:2","Aspect ratio option for dimensions control"),value:"3/2"},{label:(0,x._x)("Classic Portrait - 2:3","Aspect ratio option for dimensions control"),value:"2/3"},{label:(0,x._x)("Wide - 16:9","Aspect ratio option for dimensions control"),value:"16/9"},{label:(0,x._x)("Tall - 9:16","Aspect ratio option for dimensions control"),value:"9/16"},{label:(0,x._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];function zp({panelId:e,value:t,onChange:n=(()=>{}),options:o=Dp,defaultValue:r=Dp[0].value,hasValue:l,isShownByDefault:i=!0}){const s=null!=t?t:"auto";return(0,a.createElement)(kl.__experimentalToolsPanelItem,{hasValue:l||(()=>s!==r),label:(0,x.__)("Aspect ratio"),onDeselect:()=>n(void 0),isShownByDefault:i,panelId:e},(0,a.createElement)(kl.SelectControl,{label:(0,x.__)("Aspect ratio"),value:s,options:o,onChange:n,size:"__unstable-large",__nextHasNoMarginBottom:!0}))}const Vp=["horizontal","vertical"];function Fp(e){const t=Hp(e),n=Gp(e),o=Up(e),r=$p(e),l=jp(e),i=Wp(e),s=Kp(e),a=Zp(e);return"web"===d.Platform.OS&&(t||n||o||r||l||i||s||a)}function Hp(e){return e?.layout?.contentSize}function Gp(e){return e?.layout?.wideSize}function Up(e){return e?.spacing?.padding}function $p(e){return e?.spacing?.margin}function jp(e){return e?.spacing?.blockGap}function Wp(e){return e?.dimensions?.minHeight}function Kp(e){return e?.dimensions?.aspectRatio}function Zp(e){var t;const{type:n="default",default:{type:o="default"}={},allowSizingOnChildren:r=!1}=null!==(t=e?.parentLayout)&&void 0!==t?t:{},l=("flex"===o||"flex"===n)&&r;return!!e?.layout&&l}function qp(e,t){if(!t||!e)return e;const n={};return t.forEach((t=>{"vertical"===t&&(n.top=e.top,n.bottom=e.bottom),"horizontal"===t&&(n.left=e.left,n.right=e.right),n[t]=e?.[t]})),n}function Yp(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function Xp({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,a.createElement)(kl.__experimentalToolsPanel,{label:(0,x.__)("Dimensions"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:Xr},r)}const Qp={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,aspectRatio:!0,childLayout:!0};function Jp({as:e=Xp,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=Qp,onVisualize:s=(()=>{}),includeLayoutControls:c=!1}){var u,p,m,h,g,f,b,v,k;const{dimensions:_,spacing:y}=r,E=e=>e&&"object"==typeof e?Object.keys(e).reduce(((t,n)=>(t[n]=Jr({settings:{dimensions:_,spacing:y}},"",e[n]),t)),{}):Jr({settings:{dimensions:_,spacing:y}},"",e),w=function(e){var t,n;const{custom:o,theme:r,default:l}=e?.spacing?.spacingSizes||{};return(null!==(t=null!==(n=null!=o?o:r)&&void 0!==n?n:l)&&void 0!==t?t:[]).length>0}(r),S=(0,kl.__experimentalUseCustomUnits)({availableUnits:r?.spacing?.units||["%","px","em","rem","vw"]}),C=Hp(r)&&c,B=E(o?.layout?.contentSize),I=e=>{n(Cr(t,["layout","contentSize"],e||void 0))},T=Gp(r)&&c,M=E(o?.layout?.wideSize),P=e=>{n(Cr(t,["layout","wideSize"],e||void 0))},R=Up(r),N=Yp(E(o?.spacing?.padding)),A=Array.isArray(r?.spacing?.padding)?r?.spacing?.padding:r?.spacing?.padding?.sides,L=A&&A.some((e=>Vp.includes(e))),O=e=>{const o=qp(e,A);n(Cr(t,["spacing","padding"],o))},D=()=>s("padding"),z=$p(r),V=Yp(E(o?.spacing?.margin)),F=Array.isArray(r?.spacing?.margin)?r?.spacing?.margin:r?.spacing?.margin?.sides,H=F&&F.some((e=>Vp.includes(e))),G=e=>{const o=qp(e,F);n(Cr(t,["spacing","margin"],o))},U=()=>s("margin"),$=jp(r),j=E(o?.spacing?.blockGap),W=function(e){return e&&"string"==typeof e?{top:e}:e?{...e,right:e?.left,bottom:e?.top}:e}(j),K=Array.isArray(r?.spacing?.blockGap)?r?.spacing?.blockGap:r?.spacing?.blockGap?.sides,Z=K&&K.some((e=>Vp.includes(e))),q=e=>{n(Cr(t,["spacing","blockGap"],e))},Y=e=>{e||q(null),!Z&&e?.hasOwnProperty("top")?q(e.top):q({top:e?.top,left:e?.left})},X=Wp(r),Q=E(o?.dimensions?.minHeight),J=e=>{const o=Cr(t,["dimensions","minHeight"],e);n(Cr(o,["dimensions","aspectRatio"],void 0))},ee=Kp(r),te=E(o?.dimensions?.aspectRatio),ne=Zp(r),oe=o?.layout,{orientation:re="horizontal"}=null!==(u=r?.parentLayout)&&void 0!==u?u:{},le="horizontal"===re?(0,x.__)("Width"):(0,x.__)("Height"),ie=e=>{n({...t,layout:{...t?.layout,...e}})},se=(0,d.useCallback)((e=>({...e,layout:ml({...e?.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0}),spacing:{...e?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...e?.dimensions,minHeight:void 0,aspectRatio:void 0}})),[]),ae=()=>s(!1);return(0,a.createElement)(e,{resetAllFilter:se,value:t,onChange:n,panelId:l},(C||T)&&(0,a.createElement)("span",{className:"span-columns"},(0,x.__)("Set the width of the main content area.")),C&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Content size"),hasValue:()=>!!t?.layout?.contentSize,onDeselect:()=>I(void 0),isShownByDefault:null!==(p=i.contentSize)&&void 0!==p?p:Qp.contentSize,panelId:l},(0,a.createElement)(kl.__experimentalHStack,{alignment:"flex-end",justify:"flex-start"},(0,a.createElement)(kl.__experimentalUnitControl,{label:(0,x.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:B||"",onChange:e=>{I(e)},units:S}),(0,a.createElement)(kl.__experimentalView,null,(0,a.createElement)(Ii,{icon:Ti})))),T&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{className:"single-column",label:(0,x.__)("Wide size"),hasValue:()=>!!t?.layout?.wideSize,onDeselect:()=>P(void 0),isShownByDefault:null!==(m=i.wideSize)&&void 0!==m?m:Qp.wideSize,panelId:l},(0,a.createElement)(kl.__experimentalHStack,{alignment:"flex-end",justify:"flex-start"},(0,a.createElement)(kl.__experimentalUnitControl,{label:(0,x.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:M||"",onChange:e=>{P(e)},units:S}),(0,a.createElement)(kl.__experimentalView,null,(0,a.createElement)(Ii,{icon:Mi})))),R&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,label:(0,x.__)("Padding"),onDeselect:()=>O(void 0),isShownByDefault:null!==(h=i.padding)&&void 0!==h?h:Qp.padding,className:pl()({"tools-panel-item-spacing":w}),panelId:l},!w&&(0,a.createElement)(kl.__experimentalBoxControl,{values:N,onChange:O,label:(0,x.__)("Padding"),sides:A,units:S,allowReset:!1,splitOnAxis:L,onMouseOver:D,onMouseOut:ae}),w&&(0,a.createElement)(Pp,{values:N,onChange:O,label:(0,x.__)("Padding"),sides:A,units:S,allowReset:!1,onMouseOver:D,onMouseOut:ae})),z&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,label:(0,x.__)("Margin"),onDeselect:()=>G(void 0),isShownByDefault:null!==(g=i.margin)&&void 0!==g?g:Qp.margin,className:pl()({"tools-panel-item-spacing":w}),panelId:l},!w&&(0,a.createElement)(kl.__experimentalBoxControl,{values:V,onChange:G,label:(0,x.__)("Margin"),sides:F,units:S,allowReset:!1,splitOnAxis:H,onMouseOver:U,onMouseOut:ae}),w&&(0,a.createElement)(Pp,{values:V,onChange:G,label:(0,x.__)("Margin"),sides:F,units:S,allowReset:!1,onMouseOver:U,onMouseOut:ae})),$&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.blockGap,label:(0,x.__)("Block spacing"),onDeselect:()=>q(void 0),isShownByDefault:null!==(f=i.blockGap)&&void 0!==f?f:Qp.blockGap,className:pl()({"tools-panel-item-spacing":w}),panelId:l},!w&&(Z?(0,a.createElement)(kl.__experimentalBoxControl,{label:(0,x.__)("Block spacing"),min:0,onChange:Y,units:S,sides:K,values:W,allowReset:!1,splitOnAxis:Z}):(0,a.createElement)(kl.__experimentalUnitControl,{label:(0,x.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:q,units:S,value:j})),w&&(0,a.createElement)(Pp,{label:(0,x.__)("Block spacing"),min:0,onChange:Y,showSideInLabel:!1,sides:Z?K:["top"],values:W,allowReset:!1})),X&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{hasValue:()=>!!t?.dimensions?.minHeight,label:(0,x.__)("Minimum height"),onDeselect:()=>{J(void 0)},isShownByDefault:null!==(b=i.minHeight)&&void 0!==b?b:Qp.minHeight,panelId:l},(0,a.createElement)(Np,{label:(0,x.__)("Minimum height"),value:Q,onChange:J})),ee&&(0,a.createElement)(zp,{hasValue:()=>!!t?.dimensions?.aspectRatio,value:te,onChange:e=>{const o=Cr(t,["dimensions","aspectRatio"],e);n(Cr(o,["dimensions","minHeight"],void 0))},panelId:l,isShownByDefault:null!==(v=i.aspectRatio)&&void 0!==v?v:Qp.aspectRatio}),ne&&(0,a.createElement)(kl.__experimentalVStack,{as:kl.__experimentalToolsPanelItem,spacing:2,hasValue:()=>!!t?.layout,label:le,onDeselect:()=>{ie({selfStretch:void 0,flexSize:void 0})},isShownByDefault:null!==(k=i.childLayout)&&void 0!==k?k:Qp.childLayout,panelId:l},(0,a.createElement)(Lp,{value:oe,onChange:ie,parentLayout:r?.parentLayout})))}const em=function(e){return(0,m.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])},tm=Number.MAX_SAFE_INTEGER;const nm=(0,d.forwardRef)((function({clientId:e,bottomClientId:t,children:n,__unstableRefreshSize:o,__unstableCoverTarget:r=!1,__unstablePopoverSlot:l,__unstableContentRef:i,shift:s=!0,...c},u){const p=nd(e),h=nd(null!=t?t:e),g=(0,m.useMergeRefs)([u,em(i)]),[f,b]=(0,d.useReducer)((e=>(e+1)%tm),0);(0,d.useLayoutEffect)((()=>{if(!p)return;const e=new window.MutationObserver(b);return e.observe(p,{attributes:!0}),()=>{e.disconnect()}}),[p]);const v=(0,d.useMemo)((()=>f<0||!p||h!==p?{}:{position:"absolute",width:p.offsetWidth,height:p.offsetHeight}),[p,h,o,f]),k=(0,d.useMemo)((()=>{if(!(f<0||!p||t&&!h))return{getBoundingClientRect(){var e,t,n,o;const r=p.getBoundingClientRect(),l=h?.getBoundingClientRect(),i=Math.min(r.left,null!==(e=l?.left)&&void 0!==e?e:1/0),s=Math.min(r.top,null!==(t=l?.top)&&void 0!==t?t:1/0),a=Math.max(r.right,null!==(n=l.right)&&void 0!==n?n:-1/0)-i,c=Math.max(r.bottom,null!==(o=l.bottom)&&void 0!==o?o:-1/0)-s;return new window.DOMRect(i,s,a,c)},contextElement:p}}),[t,h,p,f]);return!p||t&&!h?null:(0,a.createElement)(kl.Popover,{ref:g,animate:!1,focusOnMount:!1,anchor:k,__unstableSlotName:l,inline:!l,placement:"top-start",resize:!1,flip:!1,shift:s,...c,className:pl()("block-editor-block-popover",c.className),variant:"unstyled"},r&&(0,a.createElement)("div",{style:v},n),!r&&n)}));function om(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function rm({clientId:e,attributes:t,forceShow:n}){const o=nd(e),[r,l]=(0,d.useState)(),i=t?.style?.spacing?.margin;(0,d.useEffect)((()=>{if(!o||null===o.ownerDocument.defaultView)return;const e=om(o,"margin-top"),t=om(o,"margin-right"),n=om(o,"margin-bottom"),r=om(o,"margin-left");l({borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:r,top:e?`-${e}`:0,right:t?`-${t}`:0,bottom:n?`-${n}`:0,left:r?`-${r}`:0})}),[o,i]);const[s,c]=(0,d.useState)(!1),u=(0,d.useRef)(i),p=(0,d.useRef)();return(0,d.useEffect)((()=>($s()(i,u.current)||n||(c(!0),u.current=i,p.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),p.current&&window.clearTimeout(p.current)})),[i,n]),s||n?(0,a.createElement)(nm,{clientId:e,__unstableCoverTarget:!0,__unstableRefreshSize:i,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,a.createElement)("div",{className:"block-editor__padding-visualizer",style:r})):null}function lm(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function im({clientId:e,value:t,forceShow:n}){const o=nd(e),[r,l]=(0,d.useState)(),i=t?.spacing?.padding;(0,d.useEffect)((()=>{o&&null!==o.ownerDocument.defaultView&&l({borderTopWidth:lm(o,"padding-top"),borderRightWidth:lm(o,"padding-right"),borderBottomWidth:lm(o,"padding-bottom"),borderLeftWidth:lm(o,"padding-left")})}),[o,i]);const[s,c]=(0,d.useState)(!1),u=(0,d.useRef)(i),p=(0,d.useRef)();return(0,d.useEffect)((()=>($s()(i,u.current)||n||(c(!0),u.current=i,p.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),p.current&&window.clearTimeout(p.current)})),[i,n]),s||n?(0,a.createElement)(nm,{clientId:e,__unstableCoverTarget:!0,__unstableRefreshSize:i,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,a.createElement)("div",{className:"block-editor__padding-visualizer",style:r})):null}const sm="dimensions",am="spacing";function cm({children:e,resetAllFilter:t}){const n=(0,d.useCallback)((e=>{const n=e.style,o=t(n);return{...e,style:o}}),[t]);return(0,a.createElement)(xs,{group:"dimensions",resetAllFilter:n},e)}function um({clientId:e,name:t,setAttributes:n,settings:o}){const r=Fp(o),l=(0,p.useSelect)((t=>t(wr).getBlockAttributes(e)?.style),[e]),[i,s]=function(){const[e,t]=(0,d.useState)(!1),{hideBlockInterface:n,showBlockInterface:o}=le((0,p.useDispatch)(wr));return(0,d.useEffect)((()=>{e?n():o()}),[e,o,n]),[e,t]}();if(!r)return null;const c={...(0,u.getBlockSupport)(t,[sm,"__experimentalDefaultControls"]),...(0,u.getBlockSupport)(t,[am,"__experimentalDefaultControls"])};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Jp,{as:cm,panelId:e,settings:o,value:l,onChange:e=>{n({style:ml(e)})},defaultControls:c,onVisualize:s}),!!o?.spacing?.padding&&(0,a.createElement)(im,{forceShow:"padding"===i,clientId:e,value:l}),!!o?.spacing?.margin&&(0,a.createElement)(rm,{forceShow:"margin"===i,clientId:e,value:l}))}function dm(e,t="any"){if("web"!==d.Platform.OS)return!1;const n=(0,u.getBlockSupport)(e,sm);return!0===n||("any"===t?!(!n?.aspectRatio&&!n?.minHeight):!!n?.[t])}const pm={useBlockProps:function({name:e,minHeight:t,style:n}){if(!dm(e,"aspectRatio")||gl(e,sm,"aspectRatio"))return{};const o=pl()({"has-aspect-ratio":!!n?.dimensions?.aspectRatio}),r={};n?.dimensions?.aspectRatio?r.minHeight="unset":(t||n?.dimensions?.minHeight)&&(r.aspectRatio="unset");return{className:o,style:r}},attributeKeys:["minHeight","style"],hasSupport:e=>dm(e,"aspectRatio")};function mm(){w()("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}const hm=(0,a.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(Z.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"}));function gm(e){return fm(e)}function fm(e){return!!e?.shadow}function bm({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,a.createElement)(kl.__experimentalToolsPanel,{label:(0,x.__)("Effects"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:Xr},r)}const vm={shadow:!0};function km({as:e=bm,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=vm}){const s=fm(r),c=(u=o?.shadow,Jr({settings:r},"",u));var u;const p=r?.shadow?.presets,m=p?Pr(p):[],h=e=>{const o=m?.find((({shadow:t})=>t===e))?.slug;n(Cr(t,["shadow"],o?`var:preset|shadow|${o}`:e||void 0))},g=(0,d.useCallback)((e=>({...e,shadow:void 0})),[]);return(0,a.createElement)(e,{resetAllFilter:g,value:t,onChange:n,panelId:l},s&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{label:(0,x.__)("Shadow"),hasValue:()=>!!t?.shadow,onDeselect:()=>h(void 0),isShownByDefault:i.shadow,panelId:l},(0,a.createElement)(kl.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,a.createElement)(_m,{shadow:c,onShadowChange:h,settings:r}))))}const _m=({shadow:e,onShadowChange:t,settings:n})=>(0,a.createElement)(kl.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles-effects-panel__shadow-dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:pl()({"is-open":t}),"aria-expanded":t};return(0,a.createElement)(kl.Button,{...n},(0,a.createElement)(kl.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(Ii,{className:"block-editor-global-styles-effects-panel__toggle-icon",icon:hm,size:24}),(0,a.createElement)(kl.FlexItem,null,(0,x.__)("Shadow"))))},renderContent:()=>(0,a.createElement)(kl.__experimentalDropdownContentWrapper,{paddingSize:"medium"},(0,a.createElement)(ym,{shadow:e,onShadowChange:t,settings:n}))});function ym({shadow:e,onShadowChange:t,settings:n}){const o=n?.shadow?.presets?.default,r=n?.shadow?.presets?.theme,l=n?.shadow?.defaultPresets,i=[...l?o:[],...r||[]];return(0,a.createElement)("div",{className:"block-editor-global-styles-effects-panel__shadow-popover-container"},(0,a.createElement)(kl.__experimentalVStack,{spacing:4},(0,a.createElement)(kl.__experimentalHeading,{level:5},(0,x.__)("Shadow")),(0,a.createElement)(Em,{presets:i,activeShadow:e,onSelect:t})))}function Em({presets:e,activeShadow:t,onSelect:n}){return e?(0,a.createElement)(kl.__experimentalGrid,{columns:6,gap:0,align:"center",justify:"center"},e.map((({name:e,slug:o,shadow:r})=>(0,a.createElement)(wm,{key:o,label:e,isActive:r===t,onSelect:()=>n(r===t?void 0:r),shadow:r})))):null}function wm({label:e,isActive:t,onSelect:n,shadow:o}){return(0,a.createElement)("div",{className:"block-editor-global-styles-effects-panel__shadow-indicator-wrapper"},(0,a.createElement)(kl.Button,{className:"block-editor-global-styles-effects-panel__shadow-indicator",onClick:n,label:e,style:{boxShadow:o},showTooltip:!0},t&&(0,a.createElement)(Ii,{icon:Ip})))}const Sm="shadow",Cm=[Sm];function xm({children:e,resetAllFilter:t}){return(0,a.createElement)(xs,{group:"effects",resetAllFilter:t},e)}function Bm({clientId:e,setAttributes:t,settings:n}){const o=gm(n),r=(0,p.useSelect)((t=>t(wr).getBlockAttributes(e)?.style),[e]);return o?(0,a.createElement)(km,{as:xm,panelId:e,settings:n,value:r,onChange:e=>{t({style:ml(e)})}}):null}const Im=[...fp,...Cm,gu,ld,sm,ec,am],Tm=e=>Im.some((t=>(0,u.hasBlockSupport)(e,t)));function Mm(e={}){const t={};return(0,Pi.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const Pm={[`${gu}.__experimentalSkipSerialization`]:["border"],[`${ld}.__experimentalSkipSerialization`]:[ld],[`${gp}.__experimentalSkipSerialization`]:[gp],[`${sm}.__experimentalSkipSerialization`]:[sm],[`${am}.__experimentalSkipSerialization`]:[am],[`${Sm}`]:[Sm]},Rm={...Pm,[`${sm}.aspectRatio`]:[`${sm}.aspectRatio`],[`${ec}`]:[ec]},Nm={[`${sm}.aspectRatio`]:!0,[`${ec}`]:!0},Am={gradients:"gradient"};function Lm(e,t,n=!1){if(!e)return e;let o=e;return n||(o=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach((e=>{if(Array.isArray(e)||(e=e.split(".")),e.length>1){const[t,...n]=e;Lm(o[t],[n],!0)}else 1===e.length&&delete o[e[0]]})),o}function Om(e,t,n,o=Rm){if(!Tm(t))return e;let{style:r}=n;return Object.entries(o).forEach((([e,n])=>{const o=Nm[e]||(0,u.getBlockSupport)(t,e);!0===o&&(r=Lm(r,n)),Array.isArray(o)&&o.forEach((e=>{const t=Am[e]||e;r=Lm(r,[[...n,t]])}))})),e.style={...Mm(r),...e.style},e}const Dm={edit:function({clientId:e,name:t,setAttributes:n,__unstableParentLayout:o}){const r={clientId:e,name:t,setAttributes:n,settings:bl(t,o)};return"default"!==ts()?null:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(gd,{...r}),(0,a.createElement)(cc,{...r}),(0,a.createElement)(_p,{...r}),(0,a.createElement)(Eu,{...r}),(0,a.createElement)(um,{...r}),(0,a.createElement)(Bm,{...r}))},hasSupport:Tm,addSaveProps:Om,attributeKeys:["style"],useBlockProps:function e({name:t,style:n}){const o=`wp-elements-${(0,m.useInstanceId)(e)}`,r=`.editor-styles-wrapper .${o}`,l=n?.elements,i=(0,d.useMemo)((()=>{if(!l)return;const e=[];return zm.forEach((({elementType:n,pseudo:o,elements:i})=>{if(gl(t,ld,n))return;const s=l?.[n];if(s){const t=el(r,u.__EXPERIMENTAL_ELEMENTS[n]);e.push((0,Pi.compileCSS)(s,{selector:t})),o&&o.forEach((t=>{s[t]&&e.push((0,Pi.compileCSS)(s[t],{selector:el(r,`${u.__EXPERIMENTAL_ELEMENTS[n]}${t}`)}))}))}i&&i.forEach((t=>{l[t]&&e.push((0,Pi.compileCSS)(l[t],{selector:el(r,u.__EXPERIMENTAL_ELEMENTS[t])}))}))})),e.length>0?e.join(""):void 0}),[r,l,t]);return fl({css:i}),Om({className:o},t,{style:n},Pm)}},zm=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}];(0,h.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Tm(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));(0,h.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){return t=e,(0,u.hasBlockSupport)(t,"__experimentalSettings",!1)?(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e;var t}));const Vm=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}));const Fm=function e({id:t,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:l,value:i,onChange:s}){let c;c="unset"===i?(0,a.createElement)(kl.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):i?(0,a.createElement)(kl.DuotoneSwatch,{values:i}):(0,a.createElement)(Ii,{icon:Vm});const u=(0,x.__)("Apply duotone filter"),d=`${(0,m.useInstanceId)(e,"duotone-control",t)}__description`;return(0,a.createElement)(kl.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,x.__)("Duotone")},renderToggle:({isOpen:e,onToggle:t})=>(0,a.createElement)(kl.ToolbarButton,{showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==Ds.DOWN||(n.preventDefault(),t())},label:u,icon:c}),renderContent:()=>(0,a.createElement)(kl.MenuGroup,{label:(0,x.__)("Duotone")},(0,a.createElement)("p",null,(0,x.__)("Create a two-tone color effect without losing your original image.")),(0,a.createElement)(kl.DuotonePicker,{"aria-label":u,"aria-describedby":d,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:l,value:i,onChange:s}))})};function Hm(e){return`${e}{filter:none}`}function Gm(e,t){return`${e}{filter:url(#${t})}`}function Um(e,t){const n=function(e=[]){const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Oc(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}(t);return`\n\n\t\n\t\t\n\t\t\t\x3c!--\n\t\t\t\tUse sRGB instead of linearRGB so transparency looks correct.\n\t\t\t\tUse perceptual brightness to convert to grayscale.\n\t\t\t--\x3e\n\t\t\t\n\t\t\t\x3c!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --\x3e\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\x3c!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --\x3e\n\t\t\t\n\t\t\n\t\n`}function $m(e,t="root",n={}){if(!t)return null;const{fallback:o=!1}=n,{name:r,selectors:l,supports:i}=e,s=l&&Object.keys(l).length>0,a=Array.isArray(t)?t.join("."):t;let c=null;if(c=s&&l.root?l?.root:i?.__experimentalSelector?i.__experimentalSelector:".wp-block-"+r.replace("core/","").replace("/","-"),"root"===a)return c;const u=Array.isArray(t)?t:t.split(".");if(1===u.length){const e=o?c:null;if(s){return xr(l,`${a}.root`,null)||xr(l,a,null)||e}const t=xr(i,`${a}.__experimentalSelector`,null);return t?el(c,t):e}let d;return s&&(d=xr(l,a,null)),d||(o?$m(e,u[0],n):null)}const jm=[];function Wm(e,{presetSetting:t,defaultSetting:n}){const o=!e?.color?.[n],r=e?.color?.[t]?.custom||jm,l=e?.color?.[t]?.theme||jm,i=e?.color?.[t]?.default||jm;return(0,d.useMemo)((()=>[...r,...l,...o?jm:i]),[o,r,l,i])}function Km(e){return Zm(e)}function Zm(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function qm({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){return(0,a.createElement)(kl.__experimentalToolsPanel,{label:(0,x._x)("Filters","Name for applying graphical effects"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:Xr},r)}const Ym={duotone:!0},Xm={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,x.__)("Duotone")},Qm=({indicator:e,label:t})=>(0,a.createElement)(kl.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(kl.__experimentalZStack,{isLayered:!1,offset:-8},(0,a.createElement)(kl.Flex,{expanded:!1},"unset"!==e&&e?(0,a.createElement)(kl.DuotoneSwatch,{values:e}):(0,a.createElement)(kl.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}))),(0,a.createElement)(kl.FlexItem,{title:t},t));function Jm({as:e=qm,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:l,defaultControls:i=Ym}){const s=Zm(r),c=Wm(r,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),u=Wm(r,{presetSetting:"palette",defaultSetting:"defaultPalette"}),p=(m=o?.filter?.duotone,Jr({settings:r},"",m));var m;const h=e=>{const o=c.find((({colors:t})=>t===e)),r=o?`var:preset|duotone|${o.slug}`:e;n(Cr(t,["filter","duotone"],r))},g=(0,d.useCallback)((e=>({...e,filter:{...e.filter,duotone:void 0}})),[]);return(0,a.createElement)(e,{resetAllFilter:g,value:t,onChange:n,panelId:l},s&&(0,a.createElement)(kl.__experimentalToolsPanelItem,{label:(0,x.__)("Duotone"),hasValue:()=>!!t?.filter?.duotone,onDeselect:()=>h(void 0),isShownByDefault:i.duotone,panelId:l},(0,a.createElement)(kl.Dropdown,{popoverProps:Xm,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const n={onClick:e,className:pl()({"is-open":t}),"aria-expanded":t};return(0,a.createElement)(kl.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,a.createElement)(kl.Button,{...n},(0,a.createElement)(Qm,{indicator:p,label:(0,x.__)("Duotone")})))},renderContent:()=>(0,a.createElement)(kl.__experimentalDropdownContentWrapper,{paddingSize:"small"},(0,a.createElement)(kl.MenuGroup,{label:(0,x.__)("Duotone")},(0,a.createElement)("p",null,(0,x.__)("Create a two-tone color effect without losing your original image.")),(0,a.createElement)(kl.DuotonePicker,{colorPalette:u,duotonePalette:c,disableCustomColors:!0,disableCustomDuotone:!0,value:p,onChange:h})))})))}const eh=[],th=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");function nh({presetSetting:e,defaultSetting:t}){const[n,o,r,l]=Ar(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,d.useMemo)((()=>[...o||eh,...r||eh,...n&&l||eh]),[n,o,r,l])}function oh(e,t){if(!e)return;const n=t?.find((({slug:t})=>e===`var:preset|duotone|${t}`));return n?n.colors:void 0}zc([Vc]);const rh={shareWithChildBlocks:!0,edit:function({style:e,setAttributes:t,name:n}){const o=e?.color?.duotone,r=bl(n),l=ts(),i=nh({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),s=nh({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[c,u]=Ar("color.custom","color.customDuotone"),d=!c,p=!u||0===s?.length&&d;if(0===i?.length&&p)return null;if("default"!==l)return null;const m=Array.isArray(o)?o:oh(o,i);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(xs,{group:"filter"},(0,a.createElement)(Jm,{value:{filter:{duotone:m}},onChange:n=>{const o={...e,color:{...n?.filter}};t({style:o})},settings:r})),(0,a.createElement)(xl,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(Fm,{duotonePalette:i,colorPalette:s,disableCustomDuotone:p,disableCustomColors:d,value:m,onChange:n=>{const o=function(e,t){if(!e||!Array.isArray(e))return;const n=t?.find((t=>t?.colors?.every(((t,n)=>t===e[n]))));return n?`var:preset|duotone|${n.slug}`:void 0}(n,i),r={...e,color:{...e?.color,duotone:null!=o?o:n}};t({style:r})},settings:r})))},useBlockProps:function e({name:t,style:n}){const o=(0,m.useInstanceId)(e),r=(0,d.useMemo)((()=>{const e=(0,u.getBlockType)(t);if(e){if(!(0,u.getBlockSupport)(e,"filter.duotone",!1))return null;const t=(0,u.getBlockSupport)(e,"color.__experimentalDuotone",!1);if(t){const n=$m(e);return"string"==typeof t?el(n,t):n}return $m(e,"filter.duotone",{fallback:!0})}}),[t]),l=n?.color?.duotone,i=`wp-duotone-${o}`,s=r&&l;return lh({clientId:o,id:i,selector:r,attribute:l}),{className:s?i:""}},attributeKeys:["style"],hasSupport:e=>(0,u.hasBlockSupport)(e,"filter.duotone")};function lh({clientId:e,id:t,selector:n,attribute:o}){const r=nh({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),l=Array.isArray(o),i=l?void 0:oh(o,r),s="string"==typeof o&&i;let a=null;s?a=i:("string"==typeof o&&!s||l)&&(a=o);const c=n.split(",").map((e=>`.${t}${e.trim()}`)).join(", "),u=Array.isArray(a)||"unset"===a;fl(u?{css:"unset"!==a?Gm(c,t):Hm(c),__unstableType:"presets"}:void 0),fl(u?{assets:"unset"!==a?Um(t,a):"",__unstableType:"svgs"}:void 0);const p=nd(e);(0,d.useEffect)((()=>{if(u&&p&&th){const e=p.style.display;p.style.display="inline-block",p.offsetHeight,p.style.display=e}}),[u,p])}function ih(e){return(0,p.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:r}=t(wr),{getBlockType:l,getActiveBlockVariation:i}=t(u.store),s=n(e),a=l(s);if(!a)return null;const c=o(e),d=i(s,c),p=(0,u.isReusableBlock)(a),m=(p?r(c.ref):void 0)||a.title,h=p||(0,u.isTemplatePart)(a),g=function(e){const t=e?.style?.position?.type;return"sticky"===t?(0,x.__)("Sticky"):"fixed"===t?(0,x.__)("Fixed"):null}(c),f={isSynced:h,title:m,icon:a.icon,description:a.description,anchor:c?.anchor,positionLabel:g,positionType:c?.style?.position?.type,name:c?.metadata?.name};return d?{isSynced:h,title:d.title||a.title,icon:d.icon||a.icon,description:d.description||a.description,anchor:c?.anchor,positionLabel:g,positionType:c?.style?.position?.type,name:c?.metadata?.name}:f}),[e])}(0,h.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,u.hasBlockSupport)(e,"filter.duotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));const{CustomSelectControl:sh}=le(kl.privateApis),ah="position",ch="block-editor-hooks__position-selection__select-control__option",uh={key:"default",value:"",name:(0,x.__)("Default"),className:ch},dh={key:"sticky",value:"sticky",name:(0,x._x)("Sticky","Name for the value of the CSS position property"),className:ch,__experimentalHint:(0,x.__)("The block will stick to the top of the window instead of scrolling.")},ph={key:"fixed",value:"fixed",name:(0,x._x)("Fixed","Name for the value of the CSS position property"),className:ch,__experimentalHint:(0,x.__)("The block will not move when the page is scrolled.")},mh=["top","right","bottom","left"],hh=["sticky","fixed"];function gh(e){const t=e.style?.position?.type;return"sticky"===t||"fixed"===t}function fh({name:e}={}){const[t,n]=Ar("position.fixed","position.sticky"),o=!t&&!n;return r=e,!(0,u.getBlockSupport)(r,ah)||o;var r}function bh({style:e={},clientId:t,name:n,setAttributes:o}){const r=function(e){const t=(0,u.getBlockSupport)(e,ah);return!(!0!==t&&!t?.fixed)}(n),l=function(e){const t=(0,u.getBlockSupport)(e,ah);return!(!0!==t&&!t?.sticky)}(n),i=e?.position?.type,{firstParentClientId:s}=(0,p.useSelect)((e=>{const{getBlockParents:n}=e(wr),o=n(t);return{firstParentClientId:o[o.length-1]}}),[t]),c=ih(s),m=l&&i===dh.value&&c?(0,x.sprintf)((0,x.__)("The block will stick to the scrollable area of the parent %s block."),c.title):null,h=(0,d.useMemo)((()=>{const e=[uh];return(l||i===dh.value)&&e.push(dh),(r||i===ph.value)&&e.push(ph),e}),[r,l,i]),g=i&&h.find((e=>e.value===i))||uh;return d.Platform.select({web:h.length>1?(0,a.createElement)(xs,{group:"position"},(0,a.createElement)(kl.BaseControl,{className:"block-editor-hooks__position-selection",__nextHasNoMarginBottom:!0,help:m},(0,a.createElement)(sh,{__nextUnconstrainedWidth:!0,__next40pxDefaultSize:!0,className:"block-editor-hooks__position-selection__select-control",label:(0,x.__)("Position"),hideLabelFromVision:!0,describedBy:(0,x.sprintf)((0,x.__)("Currently selected position: %s"),g.name),options:h,value:g,__experimentalShowSelectedHint:!0,onChange:({selectedItem:t})=>{(t=>{const n={...e,position:{...e?.position,type:t,top:"sticky"===t||"fixed"===t?"0px":void 0}};o({style:ml(n)})})(t.value)},size:"__unstable-large"}))):null,native:null})}const vh={edit:function(e){return fh(e)?null:(0,a.createElement)(bh,{...e})},useBlockProps:function e({name:t,style:n}){const o=(0,u.hasBlockSupport)(t,ah),r=fh({name:t}),l=o&&!r,i=(0,m.useInstanceId)(e),s=`.wp-container-${i}.wp-container-${i}`;let a;l&&(a=function({selector:e,style:t}){let n="";const{type:o}=t?.position||{};return hh.includes(o)?(n+=`${e} {`,n+=`position: ${o};`,mh.forEach((e=>{void 0!==t?.position?.[e]&&(n+=`${e}: ${t.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(n+="z-index: 10"),n+="}",n):n}({selector:s,style:n})||"");const c=pl()({[`wp-container-${i}`]:l&&!!a,[`is-position-${n?.position?.type}`]:l&&!!a&&!!n?.position?.type});return fl({css:a}),{className:c}},attributeKeys:["style"],hasSupport:e=>(0,u.hasBlockSupport)(e,ah)};const kh="layout";function _h(e){return(0,u.hasBlockSupport)(e,"layout")||(0,u.hasBlockSupport)(e,"__experimentalLayout")}function yh(e={},t=""){const{kebabCase:n}=le(kl.privateApis),o=(0,p.useSelect)((e=>{const{getSettings:t}=e(wr);return t().__experimentalFeatures?.useRootPaddingAwareAlignments}),[]),{layout:r}=e,{default:l}=(0,u.getBlockSupport)(t,kh)||{},i=r?.inherit||r?.contentSize||r?.wideSize?{...r,type:"constrained"}:r||l||{},s=[];if(Al[i?.type||"default"]?.className){const e=Al[i?.type||"default"]?.className,n=t.split("/"),o=`wp-block-${"core"===n[0]?n.pop():n.join("-")}-${e}`;s.push(e,o)}return(i?.inherit||i?.contentSize||"constrained"===i?.type)&&o&&s.push("has-global-padding"),i?.orientation&&s.push(`is-${n(i.orientation)}`),i?.justifyContent&&s.push(`is-content-justification-${n(i.justifyContent)}`),i?.flexWrap&&"nowrap"===i.flexWrap&&s.push("is-nowrap"),s}const Eh={shareWithChildBlocks:!0,edit:function({layout:e,setAttributes:t,name:n}){const o=bl(n),{layout:r}=o,[l]=Ar("layout"),{themeSupportsLayout:i}=(0,p.useSelect)((e=>{const{getSettings:t}=e(wr);return{themeSupportsLayout:t().supportsLayout}}),[]);if("default"!==ts())return null;const s=(0,u.getBlockSupport)(n,kh,{}),c={...r,...s},{allowSwitching:d,allowEditing:m=!0,allowInheriting:h=!0,default:g}=c;if(!m)return null;const f=!(!h||!l||e?.type&&"default"!==e?.type&&"constrained"!==e?.type&&!e?.inherit),b=e||g||{},{inherit:v=!1,type:k="default",contentSize:_=null}=b;if(("default"===k||"constrained"===k)&&!i)return null;const y=zi(k),E=zi("constrained"),w=!b.type&&(_||v),S=!!v||!!_,C=e=>t({layout:e});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(xs,null,(0,a.createElement)(kl.PanelBody,{title:(0,x.__)("Layout")},f&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kl.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__toggle-control",label:(0,x.__)("Inner blocks use content width"),checked:"constrained"===y?.name||S,onChange:()=>t({layout:{type:"constrained"===y?.name||S?"default":"constrained"}}),help:"constrained"===y?.name||S?(0,x.__)("Nested blocks use content width with options for full and wide widths."):(0,x.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})),!v&&d&&(0,a.createElement)(wh,{type:k,onChange:e=>t({layout:{type:e}})}),y&&"default"!==y.name&&(0,a.createElement)(y.inspectorControls,{layout:b,onChange:C,layoutBlockSupport:c}),E&&w&&(0,a.createElement)(E.inspectorControls,{layout:b,onChange:C,layoutBlockSupport:c}))),!v&&y&&(0,a.createElement)(y.toolBarControls,{layout:b,onChange:C,layoutBlockSupport:s}))},attributeKeys:["layout"],hasSupport:e=>_h(e)};function wh({type:e,onChange:t}){return(0,a.createElement)(kl.ButtonGroup,null,Di.map((({name:n,label:o})=>(0,a.createElement)(kl.Button,{key:n,isPressed:e===n,onClick:()=>t(n)},o))))}function Sh({block:e,props:t}){const{name:n,attributes:o}=t,r=(0,m.useInstanceId)(e),{layout:l}=o,{default:i}=(0,u.getBlockSupport)(n,kh)||{},s=l?.inherit||l?.contentSize||l?.wideSize?{...l,type:"constrained"}:l||i||{},c=yh(o,n),{kebabCase:d}=le(kl.privateApis),p=`wp-container-${d(n)}-is-layout-`,h=`.${p}${r}.${p}${r}`,[g]=Ar("spacing.blockGap"),f=null!==g,b=zi(s?.type||"default"),v=b?.getLayoutStyle?.({blockName:n,selector:h,layout:s,style:o?.style,hasBlockGapSupport:f}),k=pl()({[`${p}${r}`]:!!v},c);return fl({css:v}),(0,a.createElement)(e,{...t,__unstableLayoutClassNames:k})}const Ch=(0,m.createHigherOrderComponent)((e=>t=>{const n=_h(t.name);return(0,p.useSelect)((e=>!!n&&!e(wr).getSettings().disableLayoutStyles),[n])?(0,a.createElement)(Sh,{block:e,props:t}):(0,a.createElement)(e,{...t})}),"withLayoutStyles");(0,h.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t;return"type"in(null!==(t=e.attributes?.layout)&&void 0!==t?t:{})||_h(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,h.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",Ch);const xh={useBlockProps:function e({style:t}){var n;const o=(0,p.useSelect)((e=>!e(wr).getSettings().disableLayoutStyles)),r=null!==(n=t?.layout)&&void 0!==n?n:{},{selfStretch:l,flexSize:i}=r,s=(0,m.useInstanceId)(e),a=`.wp-container-content-${s}`;let c="";if(o&&("fixed"===l&&i?c=`${a} {\n\t\t\t\tflex-basis: ${i};\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}`:"fill"===l&&(c=`${a} {\n\t\t\t\tflex-grow: 1;\n\t\t\t}`)),fl({css:c}),c)return{className:`wp-container-content-${s}`}},attributeKeys:["style"],hasSupport:()=>!0};function Bh(e){return(0,p.useSelect)((t=>{const{getBlocksByClientId:n,getSelectedBlockClientIds:o,isUngroupable:r,isGroupable:l}=t(wr),{getGroupingBlockName:i,getBlockType:s}=t(u.store),a=e?.length?e:o(),c=n(a),[d]=c,p=1===a.length&&r(a[0]);return{clientIds:a,isGroupable:l(a),isUngroupable:p,blocksSelection:c,groupingBlockName:i(),onUngroup:p&&s(d.name)?.transforms?.ungroup}}),[e])}function Ih({clientIds:e,isGroupable:t,isUngroupable:n,onUngroup:o,blocksSelection:r,groupingBlockName:l,onClose:i=(()=>{})}){const{replaceBlocks:s}=(0,p.useDispatch)(wr);return t||n?(0,a.createElement)(a.Fragment,null,t&&(0,a.createElement)(kl.MenuItem,{onClick:()=>{(()=>{const t=(0,u.switchToBlockType)(r,l);t&&s(e,t)})(),i()}},(0,x._x)("Group","verb")),n&&(0,a.createElement)(kl.MenuItem,{onClick:()=>{(()=>{let t=r[0].innerBlocks;t.length&&(o&&(t=o(r[0].attributes,r[0].innerBlocks)),s(e,t))})(),i()}},(0,x._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor "))):null}function Th(e){return(0,p.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:o,canRemoveBlock:r,canLockBlockType:l,getBlockName:i,getBlockRootClientId:s,getTemplateLock:a}=t(wr),c=s(e),u=n(e),d=o(e,c),p=r(e,c);return{canEdit:u,canMove:d,canRemove:p,canLock:l(i(e)),isContentLocked:"contentOnly"===a(e),isLocked:!u||!d||!p}}),[e])}const Mh=(0,a.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(Z.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"})),Ph=(0,a.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(Z.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"})),Rh=(0,a.createElement)(Z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(Z.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})),Nh=["core/block","core/navigation"];function Ah(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function Lh({clientId:e,onClose:t}){const[n,o]=(0,d.useState)({move:!1,remove:!1}),{canEdit:r,canMove:l,canRemove:i}=Th(e),{allowsEditLocking:s,templateLock:c,hasTemplateLock:h}=(0,p.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(wr),r=n(e),l=(0,u.getBlockType)(r);return{allowsEditLocking:Nh.includes(r),templateLock:o(e)?.templateLock,hasTemplateLock:!!l?.attributes?.templateLock}}),[e]),[g,f]=(0,d.useState)(!!c),{updateBlockAttributes:b}=(0,p.useDispatch)(wr),v=ih(e),k=(0,m.useInstanceId)(Lh,"block-editor-block-lock-modal__options-title");(0,d.useEffect)((()=>{o({move:!l,remove:!i,...s?{edit:!r}:{}})}),[r,l,i,s]);const _=Object.values(n).every(Boolean),y=Object.values(n).some(Boolean)&&!_;return(0,a.createElement)(kl.Modal,{title:(0,x.sprintf)((0,x.__)("Lock %s"),v.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t},(0,a.createElement)("p",null,(0,x.__)("Choose specific attributes to restrict or lock all available options.")),(0,a.createElement)("form",{onSubmit:o=>{o.preventDefault(),b([e],{lock:n,templateLock:g?Ah(n):void 0}),t()}},(0,a.createElement)("div",{role:"group","aria-labelledby":k,className:"block-editor-block-lock-modal__options"},(0,a.createElement)(kl.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-title",label:(0,a.createElement)("span",{id:k},(0,x.__)("Lock all")),checked:_,indeterminate:y,onChange:e=>o({move:e,remove:e,...s?{edit:e}:{}})}),(0,a.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},s&&(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(kl.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Restrict editing"),checked:!!n.edit,onChange:e=>o((t=>({...t,edit:e})))}),(0,a.createElement)(kl.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.edit?Rh:Mh})),(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(kl.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Disable movement"),checked:n.move,onChange:e=>o((t=>({...t,move:e})))}),(0,a.createElement)(kl.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.move?Rh:Mh})),(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(kl.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,x.__)("Prevent removal"),checked:n.remove,onChange:e=>o((t=>({...t,remove:e})))}),(0,a.createElement)(kl.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.remove?Rh:Mh}))),h&&(0,a.createElement)(kl.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__template-lock",label:(0,x.__)("Apply to all blocks inside"),checked:g,disabled:n.move&&!n.remove,onChange:()=>f(!g)})),(0,a.createElement)(kl.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,a.createElement)(kl.FlexItem,null,(0,a.createElement)(kl.Button,{variant:"tertiary",onClick:t},(0,x.__)("Cancel"))),(0,a.createElement)(kl.FlexItem,null,(0,a.createElement)(kl.Button,{variant:"primary",type:"submit"},(0,x.__)("Apply"))))))}function Oh({clientId:e}){const{canLock:t,isLocked:n}=Th(e),[o,r]=(0,d.useReducer)((e=>!e),!1);if(!t)return null;const l=n?(0,x.__)("Unlock"):(0,x.__)("Lock");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kl.MenuItem,{icon:n?Mh:Ph,onClick:r,"aria-expanded":o,"aria-haspopup":"dialog"},l),o&&(0,a.createElement)(Lh,{clientId:e,onClose:r}))}const Dh=()=>{};const zh=(0,m.compose)([(0,p.withSelect)(((e,{clientId:t})=>{const{getBlock:n,getBlockMode:o,getSettings:r}=e(wr),l=n(t),i=r().codeEditingEnabled;return{mode:o(t),blockType:l?(0,u.getBlockType)(l.name):null,isCodeEditingEnabled:i}})),(0,p.withDispatch)(((e,{onToggle:t=Dh,clientId:n})=>({onToggleMode(){e(wr).toggleBlockMode(n),t()}})))])((function({blockType:e,mode:t,onToggleMode:n,small:o=!1,isCodeEditingEnabled:r=!0}){if(!e||!(0,u.hasBlockSupport)(e,"html",!0)||!r)return null;const l="visual"===t?(0,x.__)("Edit as HTML"):(0,x.__)("Edit visually");return(0,a.createElement)(kl.MenuItem,{onClick:n},!o&&l)}));function Vh(e){return 0===e?.trim()?.length}function Fh({blockName:e,originalBlockName:t,onClose:n,onSave:o}){const[r,l]=(0,d.useState)(e),i=r!==e,s=r===t,c=Vh(r),u=i||s,p=(0,m.useInstanceId)(Fh,"block-editor-rename-modal__description");return(0,a.createElement)(kl.Modal,{title:(0,x.__)("Rename"),onRequestClose:n,overlayClassName:"block-editor-block-rename-modal",aria:{describedby:p},focusOnMount:"firstContentElement"},(0,a.createElement)("p",{id:p},(0,x.__)("Enter a custom name for this block.")),(0,a.createElement)("form",{onSubmit:e=>{e.preventDefault(),u&&(()=>{const e=s||c?(0,x.sprintf)((0,x.__)('Block name reset to: "%s".'),r):(0,x.sprintf)((0,x.__)('Block name changed to: "%s".'),r);(0,so.speak)(e,"assertive"),o(r),n()})()}},(0,a.createElement)(kl.__experimentalVStack,{spacing:"3"},(0,a.createElement)(kl.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:r,label:(0,x.__)("Block name"),hideLabelFromVision:!0,placeholder:t,onChange:l,onFocus:e=>e.target.select()}),(0,a.createElement)(kl.__experimentalHStack,{justify:"right"},(0,a.createElement)(kl.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:n},(0,x.__)("Cancel")),(0,a.createElement)(kl.Button,{__next40pxDefaultSize:!0,"aria-disabled":!u,variant:"primary",type:"submit"},(0,x.__)("Save"))))))}function Hh({clientId:e}){const[t,n]=(0,d.useState)(!1),{metadata:o}=(0,p.useSelect)((t=>{const{getBlockAttributes:n}=t(wr),o=n(e)?.metadata;return{metadata:o}}),[e]),{updateBlockAttributes:r}=(0,p.useDispatch)(wr),l=o?.name;const i=ih(e);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kl.MenuItem,{onClick:()=>{n(!0)},"aria-expanded":t,"aria-haspopup":"dialog"},(0,x.__)("Rename")),t&&(0,a.createElement)(Fh,{blockName:l||"",originalBlockName:i?.title,onClose:()=>n(!1),onSave:t=>{(t===i?.title||Vh(t))&&(t=void 0),function(t){r([e],{metadata:{...o&&o,name:t}})}(t)}}))}const{Fill:Gh,Slot:Uh}=(0,kl.createSlotFill)("BlockSettingsMenuControls");function $h({...e}){return(0,a.createElement)(kl.__experimentalStyleProvider,{document},(0,a.createElement)(Gh,{...e}))}$h.Slot=({fillProps:e,clientIds:t=null,__unstableDisplayLocation:n})=>{const{selectedBlocks:o,selectedClientIds:r}=(0,p.useSelect)((e=>{const{getBlockNamesByClientId:n,getSelectedBlockClientIds:o}=e(wr),r=null!==t?t:o();return{selectedBlocks:n(r),selectedClientIds:r}}),[t]),{canLock:l}=Th(r[0]),{canRename:i}=(s=o[0],{canRename:(0,u.getBlockSupport)(s,"renaming",!0)});var s;const c=1===r.length&&l,d=1===r.length&&i,h=Bh(r),{isGroupable:g,isUngroupable:f}=h,b=g||f;return(0,a.createElement)(Uh,{fillProps:{...e,__unstableDisplayLocation:n,selectedBlocks:o,selectedClientIds:r}},(t=>!t?.length>0&&!b&&!c?null:(0,a.createElement)(kl.MenuGroup,null,b&&(0,a.createElement)(Ih,{...h,onClose:e?.onClose}),c&&(0,a.createElement)(Oh,{clientId:r[0]}),d&&(0,a.createElement)(Hh,{clientId:r[0]}),t,e?.canMove&&!e?.onlyBlock&&(0,a.createElement)(kl.MenuItem,{onClick:(0,m.pipe)(e?.onClose,e?.onMoveTo)},(0,x.__)("Move to")),1===e?.count&&(0,a.createElement)(zh,{clientId:e?.firstBlockClientId,onToggle:e?.onClose}))))};const jh=$h;const Wh={edit:function({clientId:e,isSelected:t}){const{getBlockListSettings:n,getSettings:o}=(0,p.useSelect)(wr),{templateLock:r,isLockedByParent:l,isEditingAsBlocks:i}=(0,p.useSelect)((t=>{const{__unstableGetContentLockingParent:n,getTemplateLock:o,__unstableGetTemporarilyEditingAsBlocks:r}=t(wr);return{templateLock:o(e),isLockedByParent:!!n(e),isEditingAsBlocks:r()===e}}),[e]),{updateSettings:s,updateBlockListSettings:c,__unstableSetTemporarilyEditingAsBlocks:u}=(0,p.useDispatch)(wr),{stopEditingAsBlocks:m}=le((0,p.useDispatch)(wr)),h=!l&&"contentOnly"===r,{__unstableMarkNextChangeAsNotPersistent:g,updateBlockAttributes:f}=(0,p.useDispatch)(wr),b=(0,d.useCallback)((()=>{m(e)}),[e,m]);if(!h&&!i)return null;const v=i&&!h,k=!i&&h&&t;return(0,a.createElement)(a.Fragment,null,v&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(xl,{group:"other"},(0,a.createElement)(kl.ToolbarButton,{onClick:b},(0,x.__)("Done")))),k&&(0,a.createElement)(jh,null,(({onClose:t})=>(0,a.createElement)(kl.MenuItem,{onClick:()=>{g(),f(e,{templateLock:void 0}),c(e,{...n(e),templateLock:!1});const r=o().focusMode;s({focusMode:!0}),u(e,r),t()}},(0,x.__)("Modify")))))},hasSupport:()=>!0},Kh="metadata";(0,h.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){return e?.attributes?.[Kh]?.type||(e.attributes={...e.attributes,[Kh]:{type:"object"}}),e}));const Zh=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.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"}));const qh=(0,d.memo)((function({icon:e,showColors:t=!1,className:n,context:o}){"block-default"===e?.src&&(e={src:Zh});const r=(0,a.createElement)(kl.Icon,{icon:e&&e.src?e.src:e,context:o}),l=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,a.createElement)("span",{style:l,className:pl()("block-editor-block-icon",n,{"has-colors":t})},r)})),Yh={};const Xh={edit:function({name:e,clientId:t}){const n=(0,p.useSelect)((e=>e(u.store).getBlockTypes()),[]),o=(0,d.useMemo)((()=>n?.filter((({blockHooks:t})=>t&&e in t))),[n,e]),{blockIndex:r,rootClientId:l,innerBlocksLength:i}=(0,p.useSelect)((e=>{const{getBlock:n,getBlockIndex:o,getBlockRootClientId:r}=e(wr);return{blockIndex:o(t),innerBlocksLength:n(t)?.innerBlocks?.length,rootClientId:r(t)}}),[t]),s=(0,p.useSelect)((n=>{const{getBlock:r,getGlobalBlockCount:i}=n(wr),s=o.reduce(((n,o)=>{if(0===i(o.name))return n;const s=o?.blockHooks?.[e];let a;switch(s){case"before":case"after":a=r(l)?.innerBlocks;break;case"first_child":case"last_child":a=r(t).innerBlocks}const c=a?.find((e=>e.name===o.name));return c?{...n,[o.name]:c.clientId}:n}),{});return Object.values(s).length>0?s:Yh}),[o,e,t,l]),{insertBlock:c,removeBlock:m}=(0,p.useDispatch)(wr);if(!o.length)return null;const h=o.reduce(((e,t)=>{const[n]=t.name.split("/");return e[n]||(e[n]=[]),e[n].push(t),e}),{});return(0,a.createElement)(xs,null,(0,a.createElement)(kl.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,x.__)("Plugins"),initialOpen:!0},Object.keys(h).map((n=>(0,a.createElement)(d.Fragment,{key:n},(0,a.createElement)("h3",null,n),h[n].map((n=>{const o=n.name in s;return(0,a.createElement)(kl.ToggleControl,{checked:o,key:n.title,label:(0,a.createElement)(kl.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(qh,{icon:n.icon}),(0,a.createElement)("span",null,n.title)),onChange:()=>{if(o)m(s[n.name],!1);else{const o=n.blockHooks[e];((e,n)=>{switch(n){case"before":case"after":c(e,"after"===n?r+1:r,l,!1);break;case"first_child":case"last_child":c(e,"first_child"===n?0:i,t,!1)}})((0,u.createBlock)(n.name),o)}}})})))))))},hasSupport:()=>!0};const Qh={edit:function({metadata:e,setAttributes:t}){return(0,a.createElement)(xs,{group:"advanced"},(0,a.createElement)(kl.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,x.__)("Block name"),value:e?.name||"",onChange:n=>{t({metadata:{...e,name:n}})}}))},attributeKeys:["metadata"],hasSupport:e=>(0,u.hasBlockSupport)(e,"renaming",!0)};(0,h.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||(0,u.hasBlockSupport)(e,"renaming",!0)&&(e.__experimentalLabel=(e,{context:t})=>{const{metadata:n}=e;if("list-view"===t&&n?.name)return n.name}),e}));const Jh={"core/paragraph":["content"],"core/heading":["content"],"core/image":["url","title","alt"],"core/button":["url","text","linkTarget"]};function eg(e){const t=e.style?.border||{};return{className:Cu(e)||void 0,style:Mm({border:t})}}function tg(e){const{colors:t}=Wc(),n=eg(e),{borderColor:o}=e;if(o){const e=bu({colors:t,namedColor:o});n.style.borderColor=e.color}return n}function ng(e){return{style:Mm({shadow:e.style?.shadow||""})}}function og(e){const{backgroundColor:t,textColor:n,gradient:o,style:r}=e,l=jc("background-color",t),i=jc("color",n),s=Bu(o),a=s||r?.color?.gradient;return{className:pl()(i,s,{[l]:!a&&!!l,"has-text-color":n||r?.color?.text,"has-background":t||r?.color?.background||o||r?.color?.gradient,"has-link-color":r?.elements?.link?.color})||void 0,style:Mm({color:r?.color||{}})}}function rg(e){const{backgroundColor:t,textColor:n,gradient:o}=e,[r,l,i,s,a,c]=Ar("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),u=(0,d.useMemo)((()=>[...r||[],...l||[],...i||[]]),[r,l,i]),p=(0,d.useMemo)((()=>[...s||[],...a||[],...c||[]]),[s,a,c]),m=og(e);if(t){const e=Uc(u,t);m.style.backgroundColor=e.color}if(o&&(m.style.background=Iu(p,o)),n){const e=Uc(u,n);m.style.color=e.color}return m}function lg(e){const{style:t}=e;return{style:Mm({spacing:t?.spacing||{}})}}function ig(e,t){const{kebabCase:n}=le(kl.privateApis);let o=e?.style?.typography||{};const r=Kr(t);o={...o,fontSize:jr({size:e?.style?.typography?.fontSize},r)};const l=Mm({typography:o}),i=e?.fontFamily?`has-${n(e.fontFamily)}-font-family`:"";return{className:pl()(i,cp(e?.fontSize)),style:l}}function sg(e){const[t,n]=(0,d.useState)(e);return(0,d.useEffect)((()=>{e&&n(e)}),[e]),t}var ag;(0,h.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",(function(e){return e.name in Jh?(e.edit=(0,m.createHigherOrderComponent)((e=>t=>{const{clientId:n,name:o}=y(),{getBlockBindingsSource:r}=le((0,p.useSelect)(wr)),{getBlockAttributes:l,updateBlockAttributes:i}=(0,p.useSelect)(wr),s=l(n);s?.metadata?.bindings&&Object.entries(s.metadata.bindings).forEach((([e,n])=>{const l=r(n.source);if(l){const{placeholder:r,useValue:[i=null]=[]}=l.useSource(t,n.args);if(r&&!i){const t=(0,u.getBlockType)(o).attributes[e].attribute;s[e]="src"===t||"href"===t?null:r}i&&(s[e]=i)}}));const c=(0,p.useRegistry)();return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,{key:"edit",attributes:s,setAttributes:(e,t)=>c.batch((()=>i(t,e))),...t}))}),"useBoundAttributes")(e.edit),e):e})),(0,h.addFilter)("blocks.registerBlockType","core/block-bindings-ui",((e,t)=>{if(!(t in Jh))return e;const n=e.usesContext,o=new Set(n);return["postId","postType","queryId"].forEach((e=>{o.has(e)||n.push(e)})),e.usesContext=n,e})),function(e){e=e.map((e=>({...e,Edit:(0,d.memo)(e.edit)})));const t=(0,m.createHigherOrderComponent)((t=>n=>{const o=y();return[...e.map(((e,t)=>{const{Edit:r,hasSupport:l,attributeKeys:i=[],shareWithChildBlocks:s}=e;if(!(o[g]||o[f]&&s)||!l(n.name))return null;const c={};for(const e of i)n.attributes[e]&&(c[e]=n.attributes[e]);return(0,a.createElement)(r,{key:t,name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...c})})),(0,a.createElement)(t,{key:"edit",...n})]}),"withBlockEditHooks");(0,h.addFilter)("editor.BlockEdit","core/editor/hooks",t)}([ls,Ts,Rs,Dm,rh,vh,Eh,Wh,Xh,Qh].filter(Boolean)),function(e){const t=(0,m.createHigherOrderComponent)((t=>n=>{const[o,r]=(0,d.useState)(Array(e.length).fill(void 0));return[...e.map(((e,t)=>{const{hasSupport:o,attributeKeys:l=[],useBlockProps:i}=e,s={};for(const e of l)n.attributes[e]&&(s[e]=n.attributes[e]);return Object.keys(s).length&&o(n.name)?(0,a.createElement)(vl,{key:t,index:t,useBlockProps:i,setAllWrapperProps:r,name:n.name,...s}):null})),(0,a.createElement)(t,{key:"edit",...n,wrapperProps:o.filter(Boolean).reduce(((e,t)=>({...e,...t,className:pl()(e.className,t.className),style:{...e.style,...t.style}})),n.wrapperProps||{})})]}),"withBlockListBlockHooks");(0,h.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}([ls,Dm,fd,pm,rh,ip,pp,xu,vh,xh]),ag=[ls,Ts,Ps,Rs,xu,fd,Dm,ip,pp],(0,h.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(function(e,t,n){return ag.reduce(((e,o)=>{const{hasSupport:r,attributeKeys:l=[],addSaveProps:i}=o,s={};for(const e of l)n[e]&&(s[e]=n[e]);return Object.keys(s).length&&r(t)?i(e,t,s):e}),e)}),0),(0,h.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(e=>(e.hasOwnProperty("className")&&!e.className&&delete e.className,e)));const cg=([e,...t])=>e.toUpperCase()+t.join(""),ug=e=>(0,m.createHigherOrderComponent)((t=>n=>(0,a.createElement)(t,{...n,colors:e})),"withCustomColorPalette"),dg=()=>(0,m.createHigherOrderComponent)((e=>t=>{const[n,o,r]=Ar("color.palette.custom","color.palette.theme","color.palette.default"),l=(0,d.useMemo)((()=>[...n||[],...o||[],...r||[]]),[n,o,r]);return(0,a.createElement)(e,{...t,colors:l})}),"withEditorColorPalette");function pg(e,t){const{kebabCase:n}=le(kl.privateApis),o=e.reduce(((e,t)=>({...e,..."string"==typeof t?{[t]:n(t)}:t})),{});return(0,m.compose)([t,e=>class extends d.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=Oc(t),o=({color:e})=>n.contrast(e),r=Math.max(...e.map(o));return e.find((e=>o(e)===r)).color}(t,e)}createSetters(){return Object.keys(o).reduce(((e,t)=>{const n=cg(t),o=`custom${n}`;return e[`set${n}`]=this.createSetColor(t,o),e}),{})}createSetColor(e,t){return n=>{const o=$c(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,colors:t},n){return Object.entries(o).reduce(((o,[r,l])=>{const i=Uc(t,e[r],e[`custom${cg(r)}`]),s=n[r],a=s?.color;return a===i.color&&s?o[r]=s:o[r]={...i,class:jc(l,i.slug)},o}),{})}render(){return(0,a.createElement)(e,{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils})}}])}function mg(e){return(...t)=>{const n=ug(e);return(0,m.createHigherOrderComponent)(pg(t,n),"withCustomColors")}}function hg(...e){const t=dg();return(0,m.createHigherOrderComponent)(pg(e,t),"withColors")}const gg=function(e){const[t,n]=Ar("typography.fontSizes","typography.customFontSize");return(0,a.createElement)(kl.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!n})},fg=[],bg=([e,...t])=>e.toUpperCase()+t.join(""),vg=(...e)=>{const t=e.reduce(((e,t)=>(e[t]=`custom${bg(t)}`,e)),{});return(0,m.createHigherOrderComponent)((0,m.compose)([(0,m.createHigherOrderComponent)((e=>t=>{const[n]=Ar("typography.fontSizes");return(0,a.createElement)(e,{...t,fontSizes:n||fg})}),"withFontSizes"),e=>class extends d.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce(((e,[t,n])=>(e[`set${bg(t)}`]=this.createSetFontSize(t,n),e)),{})}createSetFontSize(e,t){return n=>{const o=this.props.fontSizes?.find((({size:e})=>e===Number(n)));this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,fontSizes:n},o){const r=(t,n)=>!o[n]||(e[n]?e[n]!==o[n].slug:o[n].size!==e[t]);if(!Object.values(t).some(r))return null;const l=Object.entries(t).filter((([e,t])=>r(t,e))).reduce(((t,[o,r])=>{const l=e[o],i=sp(n,l,e[r]);return t[o]={...i,class:cp(l)},t}),{});return{...o,...l}}render(){return(0,a.createElement)(e,{...this.props,fontSizes:void 0,...this.state,...this.setters})}}]),"withFontSizes")},kg=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})),_g=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})),yg=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})),Eg=[{icon:kg,title:(0,x.__)("Align text left"),align:"left"},{icon:_g,title:(0,x.__)("Align text center"),align:"center"},{icon:yg,title:(0,x.__)("Align text right"),align:"right"}],wg={placement:"bottom-start"};const Sg=function({value:e,onChange:t,alignmentControls:n=Eg,label:o=(0,x.__)("Align text"),describedBy:r=(0,x.__)("Change text alignment"),isCollapsed:l=!0,isToolbar:i}){function s(n){return()=>t(e===n?void 0:n)}const c=n.find((t=>t.align===e)),u=i?kl.ToolbarGroup:kl.ToolbarDropdownMenu,d=i?{isCollapsed:l}:{toggleProps:{describedBy:r},popoverProps:wg};return(0,a.createElement)(u,{icon:c?c.icon:(0,x.isRTL)()?yg:kg,label:o,controls:n.map((t=>{const{align:n}=t,o=e===n;return{...t,isActive:o,role:l?"menuitemradio":void 0,onClick:s(n)}})),...d})},Cg=e=>(0,a.createElement)(Sg,{...e,isToolbar:!1}),xg=e=>(0,a.createElement)(Sg,{...e,isToolbar:!0});var Bg=n(4793),Ig=n.n(Bg);function Tg(e){return e.toLowerCase()}var Mg=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Pg=/[^A-Z0-9]+/gi;function Rg(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}const Ng=e=>e.name||"",Ag=e=>e.title,Lg=e=>e.description||"",Og=e=>e.keywords||[],Dg=e=>e.category,zg=()=>null;function Vg(e=""){return function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?Mg:n,r=t.stripRegexp,l=void 0===r?Pg:r,i=t.transform,s=void 0===i?Tg:i,a=t.delimiter,c=void 0===a?" ":a,u=Rg(Rg(e,o,"$1\0$2"),l,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(s).join(c)}(e,{splitRegexp:[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],stripRegexp:/(\p{C}|\p{P}|\p{S})+/giu}).split(" ").filter(Boolean)}function Fg(e=""){return e=(e=(e=Ig()(e)).replace(/^\//,"")).toLowerCase()}const Hg=(e="")=>Vg(Fg(e)),Gg=(e,t,n,o)=>{if(0===Hg(o).length)return e;return Ug(e,o,{getCategory:e=>t.find((({slug:t})=>t===e.category))?.title,getCollection:e=>n[e.name.split("/")[0]]?.title})},Ug=(e=[],t="",n={})=>{if(0===Hg(t).length)return e;const o=e.map((e=>[e,$g(e,t,n)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function $g(e,t,n={}){const{getName:o=Ng,getTitle:r=Ag,getDescription:l=Lg,getKeywords:i=Og,getCategory:s=Dg,getCollection:a=zg}=n,c=o(e),u=r(e),d=l(e),p=i(e),m=s(e),h=a(e),g=Fg(t),f=Fg(u);let b=0;if(g===f)b+=30;else if(f.startsWith(g))b+=20;else{const e=[c,u,d,...p,m,h].join(" ");0===((e,t)=>e.filter((e=>!Hg(t).some((t=>t.includes(e))))))(Vg(g),e).length&&(b+=10)}if(0!==b&&c.startsWith("core/")){b+=c!==e.id?1:2}return b}const jg=(e,t)=>{const[n]=(0,p.useSelect)((t=>[t(wr).getInserterItems(e)]),[e]),[o,r]=(0,p.useSelect)((e=>{const{getCategories:t,getCollections:n}=e(u.store);return[t(),n()]}),[]);return[n,o,r,(0,d.useCallback)((({name:e,initialAttributes:n,innerBlocks:o,syncStatus:r,content:l},i)=>{const s="unsynced"===r?(0,u.parse)(l,{__unstableSkipMigrationLogs:!0}):(0,u.createBlock)(e,n,(0,u.createBlocksFromInnerBlocksTemplate)(o));t(s,void 0,i)}),[t])]},Wg=(e,t)=>t?(e.sort((({id:e},{id:n})=>{let o=t.indexOf(e),r=t.indexOf(n);return o<0&&(o=t.length),r<0&&(r=t.length),o-r})),e):e,Kg=()=>{};const Zg={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n,prioritizedBlocks:o}=(0,p.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockListSettings:o,getBlockRootClientId:r}=e(wr),l=t(),i=r(l);return{selectedBlockName:l?n(l):null,rootClientId:i,prioritizedBlocks:o(i)?.prioritizedInserterBlocks}}),[]),[r,l,i]=jg(t,Kg),s=(0,d.useMemo)((()=>(e.trim()?Gg(r,l,i,e):Wg(te(r,"frecency","desc"),o)).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,l,i,o]);return[(0,d.useMemo)((()=>s.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(qh,{key:"icon",icon:n,showColors:!0}),t),isDisabled:o}}))),[s])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o,syncStatus:r,content:l}=e;return{action:"replace",value:"unsynced"===r?(0,u.parse)(l,{__unstableSkipMigrationLogs:!0}):(0,u.createBlock)(t,n,(0,u.createBlocksFromInnerBlocksTemplate)(o))}}},qg=window.wp.apiFetch;var Yg=n.n(qg);const Xg=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));const Qg={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await Yg()({path:(0,Os.addQueryArgs)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords:e=>[...e.title.split(/\s+/)],getOptionLabel:e=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Ii,{key:"icon",icon:"page"===e.subtype?ra:Xg}),e.title),getOptionCompletion:e=>(0,a.createElement)("a",{href:e.url},e.title)},Jg=[];function ef({completers:e=Jg}){const{name:t}=y();return(0,d.useMemo)((()=>{let n=[...e,Qg];return(t===(0,u.getDefaultBlockName)()||(0,u.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(n=[...n,Zg]),(0,h.hasFilter)("editor.Autocomplete.completers")&&(n===e&&(n=n.map((e=>({...e})))),n=(0,h.applyFilters)("editor.Autocomplete.completers",n,t)),n}),[e,t])}const tf=function(e){return(0,a.createElement)(kl.Autocomplete,{...e,completers:ef(e)})},nf=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"}));const of=function({isActive:e,label:t=(0,x.__)("Toggle full height"),onToggle:n,isDisabled:o}){return(0,a.createElement)(kl.ToolbarButton,{isActive:e,icon:nf,label:t,onClick:()=>n(!e),disabled:o})},rf=()=>{};const lf=function(e){const{label:t=(0,x.__)("Change matrix alignment"),onChange:n=rf,value:o="center",isDisabled:r}=e,l=(0,a.createElement)(kl.__experimentalAlignmentMatrixControl.Icon,{value:o});return(0,a.createElement)(kl.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:e,isOpen:n})=>(0,a.createElement)(kl.ToolbarButton,{onClick:e,"aria-haspopup":"true","aria-expanded":n,onKeyDown:t=>{n||t.keyCode!==Ds.DOWN||(t.preventDefault(),e())},label:t,icon:l,showTooltip:!0,disabled:r}),renderContent:()=>(0,a.createElement)(kl.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})};function sf({clientId:e,maximumLength:t,context:n}){const{attributes:o,name:r,reusableBlockTitle:l}=(0,p.useSelect)((t=>{if(!e)return{};const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:r}=t(wr),l=n(e);if(!l)return{};const i=(0,u.isReusableBlock)((0,u.getBlockType)(l));return{attributes:o(e),name:l,reusableBlockTitle:i&&r(o(e).ref)}}),[e]),i=ih(e);if(!r||!i)return null;const s=(0,u.getBlockType)(r),a=s?(0,u.__experimentalGetBlockLabel)(s,o,n):null,c=l||a,d=c&&c!==s.title?c:i.title;if(t&&t>0&&d.length>t){const e="...";return d.slice(0,t-e.length)+e}return d}function af({clientId:e,maximumLength:t,context:n}){return sf({clientId:e,maximumLength:t,context:n})}const cf=function({rootLabelText:e}){const{selectBlock:t,clearSelectedBlock:n}=(0,p.useDispatch)(wr),{clientId:o,parents:r,hasSelection:l}=(0,p.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getEnabledBlockParents:o}=le(e(wr)),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),i=e||(0,x.__)("Document");return(0,a.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,x.__)("Block breadcrumb")},(0,a.createElement)("li",{className:l?void 0:"block-editor-block-breadcrumb__current","aria-current":l?void 0:"true"},l&&(0,a.createElement)(kl.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:n},i),!l&&i,!!o&&(0,a.createElement)(Ii,{icon:Zs,className:"block-editor-block-breadcrumb__separator"})),r.map((e=>(0,a.createElement)("li",{key:e},(0,a.createElement)(kl.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>t(e)},(0,a.createElement)(af,{clientId:e,maximumLength:35})),(0,a.createElement)(Ii,{icon:Zs,className:"block-editor-block-breadcrumb__separator"})))),!!o&&(0,a.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,a.createElement)(af,{clientId:o,maximumLength:35})))};function uf(e){return(0,p.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(wr);return n(e)}),[e])}const df=(0,d.createContext)({});function pf({value:e,children:t}){const n=(0,d.useContext)(df),o=(0,d.useMemo)((()=>({...n,...e})),[n,e]);return(0,a.createElement)(df.Provider,{value:o,children:t})}const mf=df,hf={},gf=(0,kl.withFilters)("editor.BlockEdit")((e=>{const{name:t}=e,n=(0,u.getBlockType)(t);if(!n)return null;const o=n.edit||n.save;return(0,a.createElement)(o,{...e})})),ff=e=>{const{attributes:t={},name:n}=e,o=(0,u.getBlockType)(n),r=(0,d.useContext)(mf),l=(0,d.useMemo)((()=>o&&o.usesContext?Object.fromEntries(Object.entries(r).filter((([e])=>o.usesContext.includes(e)))):hf),[o,r]);if(!o)return null;if(o.apiVersion>1)return(0,a.createElement)(gf,{...e,context:l});const i=(0,u.hasBlockSupport)(o,"className",!0)?(0,u.getBlockDefaultClassName)(n):null,s=pl()(i,t.className,e.className);return(0,a.createElement)(gf,{...e,context:l,className:s})};function bf({mayDisplayControls:e,mayDisplayParentControls:t,blockEditingMode:n,...o}){const{name:r,isSelected:l,clientId:i,attributes:s={},__unstableLayoutClassNames:c}=o,{layout:p=null}=s,m=(0,u.hasBlockSupport)(r,"layout",!1)||(0,u.hasBlockSupport)(r,"__experimentalLayout",!1);return(0,a.createElement)(_,{value:(0,d.useMemo)((()=>({name:r,isSelected:l,clientId:i,layout:m?p:null,__unstableLayoutClassNames:c,[g]:e,[f]:t,[b]:n})),[r,l,i,m,p,c,e,t,n])},(0,a.createElement)(ff,{...o}))}const vf=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));const kf=function({className:e,actions:t,children:n,secondaryActions:o}){return(0,a.createElement)("div",{style:{display:"contents",all:"initial"}},(0,a.createElement)("div",{className:pl()(e,"block-editor-warning")},(0,a.createElement)("div",{className:"block-editor-warning__contents"},(0,a.createElement)("p",{className:"block-editor-warning__message"},n),(d.Children.count(t)>0||o)&&(0,a.createElement)("div",{className:"block-editor-warning__actions"},d.Children.count(t)>0&&d.Children.map(t,((e,t)=>(0,a.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,a.createElement)(kl.DropdownMenu,{className:"block-editor-warning__secondary",icon:vf,label:(0,x.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,a.createElement)(kl.MenuGroup,null,o.map(((e,t)=>(0,a.createElement)(kl.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))};var _f=n(1973);function yf({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:l}){return(0,a.createElement)("div",{className:l},(0,a.createElement)("div",{className:"block-editor-block-compare__content"},(0,a.createElement)("h2",{className:"block-editor-block-compare__heading"},e),(0,a.createElement)("div",{className:"block-editor-block-compare__html"},t),(0,a.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,a.createElement)(d.RawHTML,null,(0,As.safeHTML)(n)))),(0,a.createElement)("div",{className:"block-editor-block-compare__action"},(0,a.createElement)(kl.Button,{variant:"secondary",tabIndex:"0",onClick:o},r)))}const Ef=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const l=(i=o(e),(Array.isArray(i)?i:[i]).map((e=>(0,u.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var i;const s=(c=e.originalContent,d=l,(0,_f.Kx)(c,d).map(((e,t)=>{const n=pl()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,a.createElement)("span",{key:t,className:n},e.value)})));var c,d;return(0,a.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,a.createElement)(yf,{title:(0,x.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,x.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,a.createElement)(yf,{title:(0,x.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:s,renderedContent:l}))},wf=e=>(0,u.rawHandler)({HTML:e.originalContent});function Sf({clientId:e}){const{block:t,canInsertHTMLBlock:n,canInsertClassicBlock:o}=(0,p.useSelect)((t=>{const{canInsertBlockType:n,getBlock:o,getBlockRootClientId:r}=t(wr),l=r(e);return{block:o(e),canInsertHTMLBlock:n("core/html",l),canInsertClassicBlock:n("core/freeform",l)}}),[e]),{replaceBlock:r}=(0,p.useDispatch)(wr),[l,i]=(0,d.useState)(!1),s=(0,d.useCallback)((()=>i(!1)),[]),c=(0,d.useMemo)((()=>({toClassic(){const e=(0,u.createBlock)("core/freeform",{content:t.originalContent});return r(t.clientId,e)},toHTML(){const e=(0,u.createBlock)("core/html",{content:t.originalContent});return r(t.clientId,e)},toBlocks(){const e=wf(t);return r(t.clientId,e)},toRecoveredBlock(){const e=(0,u.createBlock)(t.name,t.attributes,t.innerBlocks);return r(t.clientId,e)}})),[t,r]),m=(0,d.useMemo)((()=>[{title:(0,x._x)("Resolve","imperative verb"),onClick:()=>i(!0)},n&&{title:(0,x.__)("Convert to HTML"),onClick:c.toHTML},o&&{title:(0,x.__)("Convert to Classic Block"),onClick:c.toClassic}].filter(Boolean)),[n,o,c]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kf,{actions:[(0,a.createElement)(kl.Button,{key:"recover",onClick:c.toRecoveredBlock,variant:"primary"},(0,x.__)("Attempt Block Recovery"))],secondaryActions:m},(0,x.__)("This block contains unexpected or invalid content.")),l&&(0,a.createElement)(kl.Modal,{title:(0,x.__)("Resolve Block"),onRequestClose:s,className:"block-editor-block-compare"},(0,a.createElement)(Ef,{block:t,onKeep:c.toHTML,onConvert:c.toBlocks,convertor:wf,convertButtonText:(0,x.__)("Convert to Blocks")})))}const Cf=(0,a.createElement)(kf,{className:"block-editor-block-list__block-crash-warning"},(0,x.__)("This block has encountered an error and cannot be previewed.")),xf=()=>Cf;class Bf extends d.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}const If=Bf;var Tf=n(773);const Mf=function({clientId:e}){const[t,n]=(0,d.useState)(""),o=(0,p.useSelect)((t=>t(wr).getBlock(e)),[e]),{updateBlock:r}=(0,p.useDispatch)(wr);return(0,d.useEffect)((()=>{n((0,u.getBlockContent)(o))}),[o]),(0,a.createElement)(Tf.Z,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const l=(0,u.getBlockType)(o.name);if(!l)return;const i=(0,u.getBlockAttributes)(l,t,o.attributes),s=t||(0,u.getSaveContent)(l,i),[a]=t?(0,u.validateBlock)({...o,attributes:i,originalContent:s}):[!0];r(e,{attributes:i,originalContent:s,isValid:a}),t||n(s)},onChange:e=>n(e.target.value)})};var Pf=Kf(),Rf=e=>Uf(e,Pf),Nf=Kf();Rf.write=e=>Uf(e,Nf);var Af=Kf();Rf.onStart=e=>Uf(e,Af);var Lf=Kf();Rf.onFrame=e=>Uf(e,Lf);var Of=Kf();Rf.onFinish=e=>Uf(e,Of);var Df=[];Rf.setTimeout=(e,t)=>{let n=Rf.now()+t,o=()=>{let e=Df.findIndex((e=>e.cancel==o));~e&&Df.splice(e,1),Hf-=~e?1:0},r={time:n,handler:e,cancel:o};return Df.splice(zf(n),0,r),Hf+=1,$f(),r};var zf=e=>~(~Df.findIndex((t=>t.time>e))||~Df.length);Rf.cancel=e=>{Af.delete(e),Lf.delete(e),Of.delete(e),Pf.delete(e),Nf.delete(e)},Rf.sync=e=>{Gf=!0,Rf.batchedUpdates(e),Gf=!1},Rf.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,Rf.onStart(n)}return o.handler=e,o.cancel=()=>{Af.delete(n),t=null},o};var Vf=typeof window<"u"?window.requestAnimationFrame:()=>{};Rf.use=e=>Vf=e,Rf.now=typeof performance<"u"?()=>performance.now():Date.now,Rf.batchedUpdates=e=>e(),Rf.catch=console.error,Rf.frameLoop="always",Rf.advance=()=>{"demand"!==Rf.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Wf()};var Ff=-1,Hf=0,Gf=!1;function Uf(e,t){Gf?(t.delete(e),e(0)):(t.add(e),$f())}function $f(){Ff<0&&(Ff=0,"demand"!==Rf.frameLoop&&Vf(jf))}function jf(){~Ff&&(Vf(jf),Rf.batchedUpdates(Wf))}function Wf(){let e=Ff;Ff=Rf.now();let t=zf(Ff);t&&(Zf(Df.splice(0,t),(e=>e.handler())),Hf-=t),Hf?(Af.flush(),Pf.flush(e?Math.min(64,Ff-e):16.667),Lf.flush(),Nf.flush(),Of.flush()):Ff=-1}function Kf(){let e=new Set,t=e;return{add(n){Hf+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Hf-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Hf-=t.size,Zf(t,(t=>t(n)&&e.add(t))),Hf+=e.size,t=e)}}}function Zf(e,t){e.forEach((e=>{try{t(e)}catch(e){Rf.catch(e)}}))}var qf=Object.defineProperty,Yf={};function Xf(){}((e,t)=>{for(var n in t)qf(e,n,{get:t[n],enumerable:!0})})(Yf,{assign:()=>db,colors:()=>ab,createStringInterpolator:()=>rb,skipAnimation:()=>cb,to:()=>lb,willAdvance:()=>ub});var Qf={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 Jf(e,t){if(Qf.arr(e)){if(!Qf.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function tb(e,t,n){if(Qf.arr(e))for(let o=0;oQf.und(e)?[]:Qf.arr(e)?e:[e];function ob(e,t){if(e.size){let n=Array.from(e);e.clear(),eb(n,t)}}var rb,lb,ib=(e,...t)=>ob(e,(e=>e(...t))),sb=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ab=null,cb=!1,ub=Xf,db=e=>{e.to&&(lb=e.to),e.now&&(Rf.now=e.now),void 0!==e.colors&&(ab=e.colors),null!=e.skipAnimation&&(cb=e.skipAnimation),e.createStringInterpolator&&(rb=e.createStringInterpolator),e.requestAnimationFrame&&Rf.use(e.requestAnimationFrame),e.batchedUpdates&&(Rf.batchedUpdates=e.batchedUpdates),e.willAdvance&&(ub=e.willAdvance),e.frameLoop&&(Rf.frameLoop=e.frameLoop)},pb=new Set,mb=[],hb=[],gb=0,fb={get idle(){return!pb.size&&!mb.length},start(e){gb>e.priority?(pb.add(e),Rf.onStart(bb)):(vb(e),Rf(_b))},advance:_b,sort(e){if(gb)Rf.onFrame((()=>fb.sort(e)));else{let t=mb.indexOf(e);~t&&(mb.splice(t,1),kb(e))}},clear(){mb=[],pb.clear()}};function bb(){pb.forEach(vb),pb.clear(),Rf(_b)}function vb(e){mb.includes(e)||kb(e)}function kb(e){mb.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(mb,(t=>t.priority>e.priority)),0,e)}function _b(e){let t=hb;for(let n=0;n0}var yb="[-+]?\\d*\\.?\\d+",Eb=yb+"%";function wb(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Sb=new RegExp("rgb"+wb(yb,yb,yb)),Cb=new RegExp("rgba"+wb(yb,yb,yb,yb)),xb=new RegExp("hsl"+wb(yb,Eb,Eb)),Bb=new RegExp("hsla"+wb(yb,Eb,Eb,yb)),Ib=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Tb=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Mb=/^#([0-9a-fA-F]{6})$/,Pb=/^#([0-9a-fA-F]{8})$/;function Rb(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 Nb(e,t,n){let o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=Rb(r,o,e+1/3),i=Rb(r,o,e),s=Rb(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*s)<<8}function Ab(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Lb(e){return(parseFloat(e)%360+360)%360/360}function Ob(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Db(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function zb(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Mb.exec(e))?parseInt(t[1]+"ff",16)>>>0:ab&&void 0!==ab[e]?ab[e]:(t=Sb.exec(e))?(Ab(t[1])<<24|Ab(t[2])<<16|Ab(t[3])<<8|255)>>>0:(t=Cb.exec(e))?(Ab(t[1])<<24|Ab(t[2])<<16|Ab(t[3])<<8|Ob(t[4]))>>>0:(t=Ib.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Pb.exec(e))?parseInt(t[1],16)>>>0:(t=Tb.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=xb.exec(e))?(255|Nb(Lb(t[1]),Db(t[2]),Db(t[3])))>>>0:(t=Bb.exec(e))?(Nb(Lb(t[1]),Db(t[2]),Db(t[3]))|Ob(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 Vb=(e,t,n)=>{if(Qf.fun(e))return e;if(Qf.arr(e))return Vb({range:e,output:t,extrapolate:n});if(Qf.str(e.output[0]))return rb(e);let o=e,r=o.output,l=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",s=o.extrapolateRight||o.extrapolate||"extend",a=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,s,a){let c=a?a(e):e;if(cn){if("identity"===s)return c;"clamp"===s&&(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],a,i,s,o.map)}};var Fb=1.70158,Hb=1.525*Fb,Gb=Fb+1,Ub=2*Math.PI/3,$b=2*Math.PI/4.5,jb=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,Wb={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=>Gb*e*e*e-Fb*e*e,easeOutBack:e=>1+Gb*Math.pow(e-1,3)+Fb*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(Hb+1)*e-Hb)/2:(Math.pow(2*e-2,2)*((Hb+1)*(2*e-2)+Hb)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*Ub),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*Ub)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*$b)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*$b)/2+1,easeInBounce:e=>1-jb(1-e),easeOutBounce:jb,easeInOutBounce:e=>e<.5?(1-jb(1-2*e))/2:(1+jb(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)}},Kb=Symbol.for("FluidValue.get"),Zb=Symbol.for("FluidValue.observers"),qb=e=>Boolean(e&&e[Kb]),Yb=e=>e&&e[Kb]?e[Kb]():e,Xb=e=>e[Zb]||null;function Qb(e,t){let n=e[Zb];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Jb=class{[Kb];[Zb];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");ev(this,e)}},ev=(e,t)=>rv(e,Kb,t);function tv(e,t){if(e[Kb]){let n=e[Zb];n||rv(e,Zb,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function nv(e,t){let n=e[Zb];if(n&&n.has(t)){let o=n.size-1;o?n.delete(t):e[Zb]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var ov,rv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),lv=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,iv=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,sv=new RegExp(`(${lv.source})(%|[a-z]+)`,"i"),av=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,cv=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,uv=e=>{let[t,n]=dv(e);if(!t||sb())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&&cv.test(n)?uv(n):n||e},dv=e=>{let t=cv.exec(e);if(!t)return[,];let[,n,o]=t;return[n,o]},pv=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,mv=e=>{ov||(ov=ab?new RegExp(`(${Object.keys(ab).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>Yb(e).replace(cv,uv).replace(iv,zb).replace(ov,zb))),n=t.map((e=>e.match(lv).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=>Vb({...e,output:t})));return e=>{let n=!sv.test(t[0])&&t.find((e=>sv.test(e)))?.replace(lv,""),r=0;return t[0].replace(lv,(()=>`${o[r++](e)}${n||""}`)).replace(av,pv)}},hv="react-spring: ",gv=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${hv}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},fv=gv(console.warn);gv(console.warn);function bv(e){return Qf.str(e)&&("#"==e[0]||/\d/.test(e)||!sb()&&cv.test(e)||e in(ab||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var vv=sb()?a.useEffect:a.useLayoutEffect;function kv(){let e=(0,a.useState)()[1],t=(()=>{let e=(0,a.useRef)(!1);return vv((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var _v=[];var yv=Symbol.for("Animated:node"),Ev=e=>e&&e[yv],wv=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,yv,t),Sv=e=>e&&e[yv]&&e[yv].getPayload(),Cv=class{payload;constructor(){wv(this,this)}getPayload(){return this.payload||[]}},xv=class extends Cv{constructor(e){super(),this._value=e,Qf.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new xv(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Qf.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,Qf.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Bv=class extends xv{_string=null;_toString;constructor(e){super(0),this._toString=Vb({output:[e,e]})}static create(e){return new Bv(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(Qf.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=Vb({output:[this.getValue(),e]})),this._value=0,super.reset()}},Iv={dependencies:null},Tv=class extends Cv{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return tb(this.source,((n,o)=>{(e=>!!e&&e[yv]===e)(n)?t[o]=n.getValue(e):qb(n)?t[o]=Yb(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&eb(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return tb(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Iv.dependencies&&qb(e)&&Iv.dependencies.add(e);let t=Sv(e);t&&eb(t,(e=>this.add(e)))}},Mv=class extends Tv{constructor(e){super(e)}static create(e){return new Mv(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(Pv)),!0)}};function Pv(e){return(bv(e)?Bv:xv).create(e)}function Rv(e){let t=Ev(e);return t?t.constructor:Qf.arr(e)?Mv:bv(e)?Bv:xv}var Nv=(e,t)=>{let n=!Qf.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,a.forwardRef)(((o,r)=>{let l=(0,a.useRef)(null),i=n&&(0,a.useCallback)((e=>{l.current=function(e,t){return e&&(Qf.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[s,c]=function(e,t){let n=new Set;return Iv.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Tv(e),Iv.dependencies=null,[e,n]}(o,t),u=kv(),d=()=>{let e=l.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,s.getValue(!0)))&&u()},p=new Av(d,c),m=(0,a.useRef)();vv((()=>(m.current=p,eb(c,(e=>tv(e,p))),()=>{m.current&&(eb(m.current.deps,(e=>nv(e,m.current))),Rf.cancel(m.current.update))}))),(0,a.useEffect)(d,[]),(e=>{(0,a.useEffect)(e,_v)})((()=>()=>{let e=m.current;eb(e.deps,(t=>nv(t,e)))}));let h=t.getComponentProps(s.getValue());return a.createElement(e,{...h,ref:i})}))},Av=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&Rf.write(this.update)}};var Lv=Symbol.for("AnimatedComponent"),Ov=e=>Qf.str(e)?e:e&&Qf.str(e.displayName)?e.displayName:Qf.fun(e)&&e.name||null;function Dv(e,...t){return Qf.fun(e)?e(...t):e}var zv=(e,t)=>!0===e||!!(t&&e&&(Qf.fun(e)?e(t):nb(e).includes(t))),Vv=(e,t)=>Qf.obj(e)?t&&e[t]:e,Fv=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Hv=e=>e,Gv=(e,t=Hv)=>{let n=Uv;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);Qf.und(n)||(o[r]=n)}return o},Uv=["config","onProps","onStart","onChange","onPause","onResume","onRest"],$v={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 jv(e){let t=function(e){let t={},n=0;if(tb(e,((e,o)=>{$v[o]||(t[o]=e,n++)})),n)return t}(e);if(t){let n={to:t};return tb(e,((e,o)=>o in t||(n[o]=e))),n}return{...e}}function Wv(e){return e=Yb(e),Qf.arr(e)?e.map(Wv):bv(e)?Yf.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Kv(e){return Qf.fun(e)||Qf.arr(e)&&Qf.obj(e[0])}var Zv={tension:170,friction:26,mass:1,damping:1,easing:Wb.linear,clamp:!1};function qv(e,t){if(Qf.und(t.decay)){let n=!Qf.und(t.tension)||!Qf.und(t.friction);(n||!Qf.und(t.frequency)||!Qf.und(t.damping)||!Qf.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Yv=[];function Xv(e,{key:t,props:n,defaultProps:o,state:r,actions:l}){return new Promise(((i,s)=>{let a,c,u=zv(n.cancel??o?.cancel,t);if(u)m();else{Qf.und(n.pause)||(r.paused=zv(n.pause,t));let e=o?.pause;!0!==e&&(e=r.paused||zv(e,t)),a=Dv(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(),a=c.time-Rf.now()}function p(){a>0&&!Yf.skipAnimation?(r.delayed=!0,c=Rf.setTimeout(m,a),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){s(e)}}}))}var Qv=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?tk(e.get()):t.every((e=>e.noop))?Jv(e.get()):ek(e.get(),t.every((e=>e.finished))),Jv=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),ek=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),tk=e=>({value:e,cancelled:!0,finished:!1});function nk(e,t,n,o){let{callId:r,parentId:l,onRest:i}=t,{asyncTo:s,promise:a}=n;return l||e!==s||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;let c,u,d,p=Gv(t,((e,t)=>"onRest"===t?void 0:e)),m=new Promise(((e,t)=>(c=e,u=t))),h=e=>{let t=r<=(n.cancelId||0)&&tk(o)||r!==n.asyncId&&ek(o,!1);if(t)throw e.result=t,u(e),e},g=(e,t)=>{let l=new rk,i=new lk;return(async()=>{if(Yf.skipAnimation)throw ok(n),i.result=ek(o,!1),u(i),i;h(l);let s=Qf.obj(e)?{...e}:{...t,to:e};s.parentId=r,tb(p,((e,t)=>{Qf.und(s[t])&&(s[t]=e)}));let a=await o.start(s);return h(l),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};if(Yf.skipAnimation)return ok(n),ek(o,!1);try{let t;t=Qf.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=ek(o.get(),!0,!1)}catch(e){if(e instanceof rk)d=e.result;else{if(!(e instanceof lk))throw e;d=e.result}}finally{r==n.asyncId&&(n.asyncId=l,n.asyncTo=l?s:void 0,n.promise=l?a:void 0)}return Qf.fun(i)&&Rf.batchedUpdates((()=>{i(d,o,o.item)})),d})():a}function ok(e,t){ob(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var rk=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.")}},lk=class extends Error{result;constructor(){super("SkipAnimationSignal")}},ik=e=>e instanceof ak,sk=1,ak=class extends Jb{id=sk++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=Ev(this);return e&&e.getValue()}to(...e){return Yf.to(this,e)}interpolate(...e){return fv(`${hv}The "interpolate" function is deprecated in v9 (use "to" instead)`),Yf.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){Qb(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||fb.sort(this),Qb(this,{type:"priority",parent:this,priority:e})}},ck=Symbol.for("SpringPhase"),uk=e=>(1&e[ck])>0,dk=e=>(2&e[ck])>0,pk=e=>(4&e[ck])>0,mk=(e,t)=>t?e[ck]|=3:e[ck]&=-3,hk=(e,t)=>t?e[ck]|=4:e[ck]&=-5,gk=class extends ak{key;animation=new class{changed=!1;values=Yv;toValues=null;fromValues=Yv;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,Zv)}};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(),!Qf.und(e)||!Qf.und(t)){let n=Qf.obj(e)?{...e}:{...t,from:e};Qf.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(dk(this)||this._state.asyncTo)||pk(this)}get goal(){return Yb(this.animation.to)}get velocity(){let e=Ev(this);return e instanceof xv?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return uk(this)}get isAnimating(){return dk(this)}get isPaused(){return pk(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,o=this.animation,{config:r,toValues:l}=o,i=Sv(o.to);!i&&qb(o.to)&&(l=nb(Yb(o.to))),o.values.forEach(((s,a)=>{if(s.done)return;let c=s.constructor==Bv?1:i?i[a].lastPosition:l[a],u=o.immediate,d=c;if(!u){if(d=s.lastPosition,r.tension<=0)return void(s.done=!0);let t,n=s.elapsedTime+=e,l=o.fromValues[a],i=null!=s.v0?s.v0:s.v0=Qf.arr(r.velocity)?r.velocity[a]:r.velocity,p=r.precision||(l==c?.005:Math.min(1,.001*Math.abs(c-l)));if(Qf.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(s.lastPosition-d)<=p,t=i*o}else{t=null==s.lastVelocity?i:s.lastVelocity;let n,o=r.restVelocity||p/10,a=r.clamp?0:r.bounce,m=!Qf.und(a),h=l==c?s.v0>0:lo,n||(u=Math.abs(c-d)<=p,!u));++e){m&&(g=d==c||d>c==h,g&&(t=-t*a,d=c)),t+=(1e-6*-r.tension*(d-c)+.001*-r.friction*t)/r.mass*f,d+=t*f}}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,s.durationProgress>0&&(s.elapsedTime=r.duration*s.durationProgress,n=s.elapsedTime+=e)),o=(r.progress||0)+n/this._memoizedDuration,o=o>1?1:o<0?0:o,s.durationProgress=o),d=l+r.easing(o)*(c-l),t=(d-s.lastPosition)/e,u=1==o}s.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[a].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,r.round)&&(n=!0)}));let s=Ev(this),a=s.getValue();if(t){let e=Yb(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return Rf.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(dk(this)){let{to:e,config:t}=this.animation;Rf.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 Qf.und(e)?(n=this.queue||[],this.queue=[]):n=[Qf.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Qv(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),ok(this._state,e&&this._lastCallId),Rf.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=Qf.obj(n)?n[t]:n,(null==n||Kv(n))&&(n=void 0),o=Qf.obj(o)?o[t]:o,null==o&&(o=void 0);let r={to:n,from:o};return uk(this)||(e.reverse&&([n,o]=[o,n]),o=Yb(o),Qf.und(o)?Ev(this)||this._set(n):this._set(o)),r}_update({...e},t){let{key:n,defaultProps:o}=this;e.default&&Object.assign(o,Gv(e,((e,t)=>/^on/.test(t)?Vv(e,n):e))),yk(this,e,"onProps"),Ek(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 Xv(++this._lastCallId,{key:n,props:e,defaultProps:o,state:l,actions:{pause:()=>{pk(this)||(hk(this,!0),ib(l.pauseQueue),Ek(this,"onPause",ek(this,fk(this,this.animation.to)),this))},resume:()=>{pk(this)&&(hk(this,!1),dk(this)&&this._resume(),ib(l.resumeQueue),Ek(this,"onResume",ek(this,fk(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=bk(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(tk(this));let o=!Qf.und(e.to),r=!Qf.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(tk(this));this._lastToId=t.callId}let{key:l,defaultProps:i,animation:s}=this,{to:a,from:c}=s,{to:u=a,from:d=c}=e;r&&!o&&(!t.default||Qf.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let p=!Jf(d,c);p&&(s.from=d),d=Yb(d);let m=!Jf(u,a);m&&this._focus(u);let h=Kv(t.to),{config:g}=s,{decay:f,velocity:b}=g;(o||r)&&(g.velocity=0),t.config&&!h&&function(e,t,n){n&&(qv(n={...n},t),t={...n,...t}),qv(e,t),Object.assign(e,t);for(let t in Zv)null==e[t]&&(e[t]=Zv[t]);let{mass:o,frequency:r,damping:l}=e;Qf.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,Dv(t.config,l),t.config!==i.config?Dv(i.config,l):void 0);let v=Ev(this);if(!v||Qf.und(u))return n(ek(this,!0));let k=Qf.und(t.reset)?r&&!t.default:!Qf.und(d)&&zv(t.reset,l),_=k?d:this.get(),y=Wv(u),E=Qf.num(y)||Qf.arr(y)||bv(y),w=!h&&(!E||zv(i.immediate||t.immediate,l));if(m){let e=Rv(u);if(e!==v.constructor){if(!w)throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`);v=this._set(y)}}let S=v.constructor,C=qb(u),x=!1;if(!C){let e=k||!uk(this)&&p;(m||e)&&(x=Jf(Wv(_),y),C=!x),(!Jf(s.immediate,w)&&!w||!Jf(g.decay,f)||!Jf(g.velocity,b))&&(C=!0)}if(x&&dk(this)&&(s.changed&&!k?C=!0:C||this._stop(a)),!h&&((C||qb(a))&&(s.values=v.getPayload(),s.toValues=qb(u)?null:S==Bv?[1]:nb(y)),s.immediate!=w&&(s.immediate=w,!w&&!k&&this._set(a)),C)){let{onRest:e}=s;eb(_k,(e=>yk(this,t,e)));let o=ek(this,fk(this,a));ib(this._pendingCalls,o),this._pendingCalls.add(n),s.changed&&Rf.batchedUpdates((()=>{s.changed=!k,e?.(o,this),k?Dv(i.onRest,o):s.onStart?.(o,this)}))}k&&this._set(_),h?n(nk(t.to,t,this._state,this)):C?this._start():dk(this)&&!m?this._pendingCalls.add(n):n(Jv(_))}_focus(e){let t=this.animation;e!==t.to&&(Xb(this)&&this._detach(),t.to=e,Xb(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;qb(t)&&(tv(t,this),ik(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;qb(e)&&nv(e,this)}_set(e,t=!0){let n=Yb(e);if(!Qf.und(n)){let e=Ev(this);if(!e||!Jf(n,e.getValue())){let o=Rv(n);e&&e.constructor==o?e.setValue(n):wv(this,o.create(n)),e&&Rf.batchedUpdates((()=>{this._onChange(n,t)}))}}return Ev(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,Ek(this,"onStart",ek(this,fk(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Dv(this.animation.onChange,e,this)),Dv(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;Ev(this).reset(Yb(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),dk(this)||(mk(this,!0),pk(this)||this._resume())}_resume(){Yf.skipAnimation?this.finish():fb.start(this)}_stop(e,t){if(dk(this)){mk(this,!1);let n=this.animation;eb(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Qb(this,{type:"idle",parent:this});let o=t?tk(this.get()):ek(this.get(),fk(this,e??n.to));ib(this._pendingCalls,o),n.changed&&(n.changed=!1,Ek(this,"onRest",o,this))}}};function fk(e,t){let n=Wv(t);return Jf(Wv(e.get()),n)}function bk(e,t=e.loop,n=e.to){let o=Dv(t);if(o){let r=!0!==o&&jv(o),l=(r||e).reverse,i=!r||r.reset;return vk({...e,loop:t,default:!1,pause:void 0,to:!l||Kv(n)?n:void 0,from:i?e.from:void 0,reset:i,...r})}}function vk(e){let{to:t,from:n}=e=jv(e),o=new Set;return Qf.obj(t)&&kk(t,o),Qf.obj(n)&&kk(n,o),e.keys=o.size?Array.from(o):null,e}function kk(e,t){tb(e,((e,n)=>null!=e&&t.add(n)))}var _k=["onStart","onRest","onChange","onPause","onResume"];function yk(e,t,n){e.animation[n]=t[n]!==Fv(t,n)?Vv(t[n],e.key):void 0}function Ek(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var wk=["onStart","onChange","onRest"],Sk=1,Ck=class{id=Sk++;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];Qf.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(vk(e)),this}start(e){let{queue:t}=this;return e?t=nb(e).map(vk):this.queue=[],this._flush?this._flush(this,t):(Mk(this,t),xk(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;eb(nb(t),(t=>n[t].stop(!!e)))}else ok(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Qf.und(e))this.start({pause:!0});else{let t=this.springs;eb(nb(e),(e=>t[e].pause()))}return this}resume(e){if(Qf.und(e))this.start({pause:!1});else{let t=this.springs;eb(nb(e),(e=>t[e].resume()))}return this}each(e){tb(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,ob(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&&ob(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),l&&(this._started=!1,ob(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)}Rf.onFrame(this._onFrame)}};function xk(e,t){return Promise.all(t.map((t=>Bk(e,t)))).then((t=>Qv(e,t)))}async function Bk(e,t,n){let{keys:o,to:r,from:l,loop:i,onRest:s,onResolve:a}=t,c=Qf.obj(t.default)&&t.default;i&&(t.loop=!1),!1===r&&(t.to=null),!1===l&&(t.from=null);let u=Qf.arr(r)||Qf.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):eb(wk,(n=>{let o=t[n];if(Qf.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,ib(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===Fv(t,"cancel");(u||m&&d.asyncId)&&p.push(Xv(++e._lastAsyncId,{props:t,state:d,actions:{pause:Xf,resume:Xf,start(t,n){m?(ok(d,e._lastAsyncId),n(tk(e))):(t.onRest=s,n(nk(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let h=Qv(e,await Promise.all(p));if(i&&h.finished&&(!n||!h.noop)){let n=bk(t,i,r);if(n)return Mk(e,[n]),Bk(e,n,!0)}return a&&Rf.batchedUpdates((()=>a(h,e,e.item))),h}function Ik(e,t){let n=new gk;return n.key=e,t&&tv(n,t),n}function Tk(e,t,n){t.keys&&eb(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function Mk(e,t){eb(t,(t=>{Tk(e.springs,t,(t=>Ik(t,e)))}))}var Pk=({children:e,...t})=>{let n=(0,a.useContext)(Rk),o=t.pause||!!n.pause,r=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,a.useState)((()=>({inputs:t,result:e()}))),o=(0,a.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}=Rk;return a.createElement(l,{value:t},e)},Rk=function(e,t){return Object.assign(e,a.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(Pk,{});Pk.Provider=Rk.Provider,Pk.Consumer=Rk.Consumer;var Nk=class extends ak{constructor(e,t){super(),this.source=e,this.calc=Vb(...t);let n=this._get(),o=Rv(n);wv(this,o.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Jf(t,this.get())||(Ev(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Lk(this._active)&&Ok(this)}_get(){let e=Qf.arr(this.source)?this.source.map(Yb):nb(Yb(this.source));return this.calc(...e)}_start(){this.idle&&!Lk(this._active)&&(this.idle=!1,eb(Sv(this),(e=>{e.done=!1})),Yf.skipAnimation?(Rf.batchedUpdates((()=>this.advance())),Ok(this)):fb.start(this))}_attach(){let e=1;eb(nb(this.source),(t=>{qb(t)&&tv(t,this),ik(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){eb(nb(this.source),(e=>{qb(e)&&nv(e,this)})),this._active.clear(),Ok(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=nb(this.source).reduce(((e,t)=>Math.max(e,(ik(t)?t.priority:0)+1)),0))}};function Ak(e){return!1!==e.idle}function Lk(e){return!e.size||Array.from(e).every(Ak)}function Ok(e){e.idle||(e.idle=!0,eb(Sv(e),(e=>{e.done=!0})),Qb(e,{type:"idle",parent:e}))}Yf.assign({createStringInterpolator:mv,to:(e,t)=>new Nk(e,t)});fb.advance;const Dk=window.ReactDOM;var zk=/^--/;function Vk(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||zk.test(e)||Hk.hasOwnProperty(e)&&Hk[e]?(""+t).trim():t+"px"}var Fk={};var Hk={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},Gk=["Webkit","Ms","Moz","O"];Hk=Object.keys(Hk).reduce(((e,t)=>(Gk.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Hk);var Uk=/^(matrix|translate|scale|rotate|skew)/,$k=/^(translate)/,jk=/^(rotate|skew)/,Wk=(e,t)=>Qf.num(e)&&0!==e?e+t:e,Kk=(e,t)=>Qf.arr(e)?e.every((e=>Kk(e,t))):Qf.num(e)?e===t:parseFloat(e)===t,Zk=class extends Tv{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=>Wk(e,"px"))).join(",")})`,Kk(e,0)]))),tb(o,((e,t)=>{if("transform"===t)r.push([e||""]),l.push((e=>[e,""===e]));else if(Uk.test(t)){if(delete o[t],Qf.und(e))return;let n=$k.test(t)?"px":jk.test(t)?"deg":"";r.push(nb(e)),l.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Wk(r,n)})`,Kk(r,0)]:e=>[`${t}(${e.map((e=>Wk(e,n))).join(",")})`,Kk(e,t.startsWith("scale")?1:0)])}})),r.length&&(o.transform=new qk(r,l)),super(o)}},qk=class extends Jb{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 eb(this.inputs,((n,o)=>{let r=Yb(n[0]),[l,i]=this.transforms[o](Qf.arr(r)?r:n.map(Yb));e+=" "+l,t=t&&i})),t?"none":e}observerAdded(e){1==e&&eb(this.inputs,(e=>eb(e,(e=>qb(e)&&tv(e,this)))))}observerRemoved(e){0==e&&eb(this.inputs,(e=>eb(e,(e=>qb(e)&&nv(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Qb(this,e)}};Yf.assign({batchedUpdates:Dk.unstable_batchedUpdates,createStringInterpolator:mv,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 Yk=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new Tv(e)),getComponentProps:o=(e=>e)}={})=>{let r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},l=e=>{let t=Ov(e)||"Anonymous";return(e=Qf.str(e)?l[e]||(l[e]=Nv(e,r)):e[Lv]||(e[Lv]=Nv(e,r))).displayName=`Animated(${t})`,e};return tb(e,((t,n)=>{Qf.arr(e)&&(n=Ov(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:s,...a}=t,c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:Fk[t]||(Fk[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=Vk(t,o[t]);zk.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!==s&&e.setAttribute("viewBox",s)},createAnimatedStyle:e=>new Zk(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Xk=Yk.animated;function Qk(e){return{top:e.offsetTop,left:e.offsetLeft}}const Jk=function({triggerAnimationOnChange:e,clientId:t}){const n=(0,d.useRef)(),{isTyping:o,getGlobalBlockCount:r,isBlockSelected:l,isFirstMultiSelectedBlock:i,isBlockMultiSelected:s,isAncestorMultiSelected:a}=(0,p.useSelect)(wr),{previous:c,prevRect:u}=(0,d.useMemo)((()=>({previous:n.current&&Qk(n.current),prevRect:n.current&&n.current.getBoundingClientRect()})),[e]);return(0,d.useLayoutEffect)((()=>{if(!c||!n.current)return;const e=(0,As.getScrollContainer)(n.current),d=l(t),p=d||i(t);function m(){if(p&&u){const t=n.current.getBoundingClientRect().top-u.top;t&&(e.scrollTop+=t)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||o()||r()>200)return void m();const h=d||s(t)||a(t)?"1":"",g=new Ck({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:e}){if(!n.current)return;let{x:t,y:o}=e;t=Math.round(t),o=Math.round(o);const r=0===t&&0===o;n.current.style.transformOrigin="center center",n.current.style.transform=r?null:`translate3d(${t}px,${o}px,0)`,n.current.style.zIndex=h,m()}});n.current.style.transform=void 0;const f=Qk(n.current),b=Math.round(c.left-f.left),v=Math.round(c.top-f.top);return g.start({x:0,y:0,from:{x:b,y:v}}),()=>{g.stop()}}),[c,u,t,o,r,l,i,s,a]),n},e_=(0,d.createContext)({}),t_=".block-editor-block-list__block",n_=".block-list-appender",o_=".block-editor-button-block-appender";function r_(e,t){return e.closest(t_)===t.closest(t_)}function l_(e,t){return t.closest([t_,n_,o_].join(","))===e}function i_(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(t_);return t?t.id.slice(6):void 0}function s_({clientId:e,initialPosition:t}){const n=(0,d.useRef)(),{isBlockSelected:o,isMultiSelecting:r}=(0,p.useSelect)(wr);return(0,d.useEffect)((()=>{if(!o(e)||r())return;if(null==t)return;if(!n.current)return;const{ownerDocument:l}=n.current;if(l_(n.current,l.activeElement))return;const i=As.focus.tabbable.find(n.current).filter((e=>(0,As.isTextField)(e))),s=-1===t,a=i[s?i.length-1:0]||n.current;if(l_(n.current,a)){if(!n.current.getAttribute("contenteditable")){const e=As.focus.tabbable.findNext(n.current);if(e&&l_(n.current,e)&&(0,As.isFormElement)(e))return void e.focus()}(0,As.placeCaretAtHorizontalEdge)(a,s)}else n.current.focus()}),[t,e]),n}function a_(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function c_({isEnabled:e}){return(0,m.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",a_),t.addEventListener("mouseover",a_),()=>{t.removeEventListener("mouseout",a_),t.removeEventListener("mouseover",a_),t.classList.remove("is-hovered")}}),[e])}function u_(e){const{isBlockSelected:t}=(0,p.useSelect)(wr),{selectBlock:n,selectionChange:o}=(0,p.useDispatch)(wr);return(0,m.useRefEffect)((r=>{function l(l){r.parentElement.closest('[contenteditable="true"]')||(t(e)?l.target.isContentEditable||o(e):l_(r,l.target)&&n(e))}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}function d_({clientId:e,isSelected:t}){const{getBlockRootClientId:n,getBlockIndex:o}=(0,p.useSelect)(wr),{insertDefaultBlock:r,removeBlock:l}=(0,p.useDispatch)(wr);return(0,m.useRefEffect)((i=>{if(t)return i.addEventListener("keydown",s),i.addEventListener("dragstart",a),()=>{i.removeEventListener("keydown",s),i.removeEventListener("dragstart",a)};function s(t){const{keyCode:s,target:a}=t;s!==Ds.ENTER&&s!==Ds.BACKSPACE&&s!==Ds.DELETE||a!==i||(0,As.isTextField)(a)||(t.preventDefault(),s===Ds.ENTER?r({},n(e),o(e)+1):l(e))}function a(e){e.preventDefault()}}),[e,t,n,o,r,l])}function p_(e){const{isNavigationMode:t,isBlockSelected:n}=(0,p.useSelect)(wr),{setNavigationMode:o,selectBlock:r}=(0,p.useDispatch)(wr);return(0,m.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])}function m_(){const e=(0,d.useContext)(Lw);return(0,m.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function h_(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:l,index:i,mode:s,name:a,blockApiVersion:c,blockTitle:u,isSelected:p,isSubtreeDisabled:h,isOutlineEnabled:g,hasOverlay:f,initialPosition:b,blockEditingMode:v,isHighlighted:k,isMultiSelected:_,isPartiallySelected:E,isReusable:w,isDragging:S,hasChildSelected:C,removeOutline:B,isBlockMovingMode:I,canInsertMovingBlock:T,isEditingDisabled:M,isTemporarilyEditingAsBlocks:P,defaultClassName:R}=(0,d.useContext)(e_),N=(0,x.sprintf)((0,x.__)("Block: %s"),u),A="html"!==s||t?"":"-visual",L=(0,m.useMergeRefs)([e.ref,s_({clientId:n,initialPosition:b}),ed(n),u_(n),d_({clientId:n,isSelected:p}),p_(n),c_({isEnabled:g}),m_(),Jk({triggerAnimationOnChange:i,clientId:n}),(0,m.useDisabled)({isDisabled:!f})]),O=y();return c<2&&O.clientId,{tabIndex:"disabled"===v?-1:0,...r,...e,ref:L,id:`block-${n}${A}`,role:"document","aria-label":N,"data-block":n,"data-type":a,"data-title":u,inert:h?"true":void 0,className:pl()("block-editor-block-list__block",{"wp-block":!l,"has-block-overlay":f,"is-selected":p,"is-highlighted":k,"is-multi-selected":_,"is-partially-selected":E,"is-reusable":w,"is-dragging":S,"has-child-selected":C,"remove-outline":B,"is-block-moving-mode":I,"can-insert-moving-block":T,"is-editing-disabled":M,"is-content-locked-temporarily-editing-as-blocks":P},o,e.className,r.className,R),style:{...r.style,...e.style}}}function g_({children:e,isHtml:t,...n}){return(0,a.createElement)("div",{...h_(n,{__unstableIsHtml:t})},e)}function f_({block:{__unstableBlockSource:e},mode:t,isLocked:n,canRemove:o,clientId:r,isSelected:l,isSelectionEnabled:i,className:s,__unstableLayoutClassNames:c,name:m,isValid:h,attributes:g,wrapperProps:f,setAttributes:b,onReplace:v,onInsertBlocksAfter:k,onMerge:_,toggleSelection:y}){var E;const{mayDisplayControls:w,mayDisplayParentControls:S,themeSupportsLayout:C,...x}=(0,d.useContext)(e_),{removeBlock:B}=(0,p.useDispatch)(wr),I=(0,d.useCallback)((()=>B(r)),[r]),T=Gi()||{};let M=(0,a.createElement)(bf,{name:m,isSelected:l,attributes:g,setAttributes:b,insertBlocksAfter:n?void 0:k,onReplace:o?v:void 0,onRemove:o?I:void 0,mergeBlocks:o?_:void 0,clientId:r,isSelectionEnabled:i,toggleSelection:y,__unstableLayoutClassNames:c,__unstableParentLayout:Object.keys(T).length?T:void 0,mayDisplayControls:w,mayDisplayParentControls:S,blockEditingMode:x.blockEditingMode});const P=(0,u.getBlockType)(m);P?.getEditWrapperProps&&(f=function(e,t){const n={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(n.className=pl()(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(n.style={...e.style,...t.style}),n}(f,P.getEditWrapperProps(g)));const R=f&&!!f["data-align"]&&!C,N=s?.includes("is-position-sticky");let A;if(R&&(M=(0,a.createElement)("div",{className:pl()("wp-block",N&&s),"data-align":f["data-align"]},M)),h)A="html"===t?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{style:{display:"none"}},M),(0,a.createElement)(g_,{isHtml:!0},(0,a.createElement)(Mf,{clientId:r}))):P?.apiVersion>1?M:(0,a.createElement)(g_,null,M);else{const t=e?(0,u.serializeRawBlock)(e):(0,u.getSaveContent)(P,g);A=(0,a.createElement)(g_,{className:"has-warning"},(0,a.createElement)(Sf,{clientId:r}),(0,a.createElement)(d.RawHTML,null,(0,As.safeHTML)(t)))}const{"data-align":L,...O}=null!==(E=f)&&void 0!==E?E:{};return O.className=pl()(O.className,L&&C&&`align${L}`,!(L&&N)&&s),(0,a.createElement)(e_.Provider,{value:{wrapperProps:O,isAligned:R,...x}},(0,a.createElement)(If,{fallback:(0,a.createElement)(g_,{className:"has-warning"},(0,a.createElement)(xf,null))},A))}h_.save=u.__unstableGetBlockProps;const b_=(0,p.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:l,replaceBlocks:i,toggleSelection:s,__unstableMarkLastChangeAsPersistent:a,moveBlocksToPosition:c,removeBlock:d}=e(wr);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n.select(wr),l=r(),{clientId:i}=t,s=l.length?l:[i];o(s,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:l}=t,{getBlockIndex:i}=n.select(wr),s=i(o);r(e,s+1,l)},onMerge(e){const{clientId:o,rootClientId:i}=t,{getPreviousBlockClientId:s,getNextBlockClientId:a,getBlock:p,getBlockAttributes:m,getBlockName:h,getBlockOrder:g,getBlockIndex:f,getBlockRootClientId:b,canInsertBlockType:v}=n.select(wr);function k(e,t=!0){const o=b(e),l=g(e),[i]=l;1===l.length&&(0,u.isUnmodifiedBlock)(p(i))?d(e):n.batch((()=>{if(v(h(i),o))c([i],e,o,f(e));else{const n=(0,u.switchToBlockType)(p(i),(0,u.getDefaultBlockName)());n&&n.length&&(r(n,f(e),o,t),d(i,!1))}!g(e).length&&(0,u.isUnmodifiedBlock)(p(e))&&d(e,!1)}))}if(e){if(i){const e=a(i);if(e){if(h(i)!==h(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((()=>{c(g(e),e,i),d(e,!1)}))}}}const e=a(o);if(!e)return;g(e).length?k(e,!1):l(o,e)}else{const e=s(o);if(e)l(e,o);else if(i){const e=s(i);if(e&&h(i)===h(e)){const t=m(i),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{c(g(i),i,e),d(i,!1)}))}k(i)}else d(o)}},onReplace(e,n,o){e.length&&!(0,u.isUnmodifiedDefaultBlock)(e[e.length-1])&&a();const r=1===e?.length&&Array.isArray(e[0])?e[0]:e;i([t.clientId],r,n,o)},toggleSelection(e){s(e)}}}));f_=(0,m.compose)(b_,(0,kl.withFilters)("editor.BlockListBlock"))(f_);const v_=(0,d.memo)((function(e){const{clientId:t,rootClientId:n}=e,o=(0,p.useSelect)((e=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:l,getTemplateLock:i,__unstableGetBlockWithoutInnerBlocks:s,canRemoveBlock:a,canMoveBlock:c,getSettings:d,__unstableGetTemporarilyEditingAsBlocks:p,getBlockEditingMode:m,getBlockName:h,isFirstMultiSelectedBlock:g,getMultiSelectedBlockClientIds:f,hasSelectedInnerBlock:b,getBlockIndex:v,isTyping:k,isBlockMultiSelected:_,isBlockSubtreeDisabled:y,isBlockHighlighted:E,__unstableIsFullySelected:w,__unstableSelectionHasUnmergeableBlock:S,isBlockBeingDragged:C,hasBlockMovingClientId:x,canInsertBlockType:B,getBlockRootClientId:I,__unstableHasActiveBlockOverlayActive:T,__unstableGetEditorMode:M,getSelectedBlocksInitialCaretPosition:P}=le(e(wr)),R=s(t);if(!R)return;const{hasBlockSupport:N,getActiveBlockVariation:A}=e(u.store),L=o(t),O=i(n),D=a(t,n),z=c(t,n),{name:V,attributes:F,isValid:H}=R,G=(0,u.getBlockType)(V),U=A(V,F),{outlineMode:$,supportsLayout:j}=d(),W=_(t),K=b(t,!0),Z=k(),q=G?.apiVersion>1,Y=x();return{mode:r(t),isSelectionEnabled:l(),isLocked:!!O,canRemove:D,canMove:z,block:R,name:V,attributes:F,isValid:H,isSelected:L,themeSupportsLayout:j,isTemporarilyEditingAsBlocks:p()===t,blockEditingMode:m(t),mayDisplayControls:L||g(t)&&f().every((e=>h(e)===V)),mayDisplayParentControls:N(h(t),"__experimentalExposeControlsToChildren",!1)&&b(t),index:v(t),blockApiVersion:G?.apiVersion||1,blockTitle:U?.title||G?.title,isSubtreeDisabled:y(t),isOutlineEnabled:$,hasOverlay:T(t),initialPosition:L&&"edit"===M()?P():void 0,isHighlighted:E(t),isMultiSelected:W,isPartiallySelected:W&&!w()&&!S(),isReusable:(0,u.isReusableBlock)(G),isDragging:C(t),hasChildSelected:K,removeOutline:L&&$&&Z,isBlockMovingMode:!!Y,canInsertMovingBlock:Y&&B(h(Y),I(t)),isEditingDisabled:"disabled"===m(t),className:q?F.className:void 0,defaultClassName:q?(0,u.getBlockDefaultClassName)(V):void 0}}),[t,n]),{mode:r,isSelectionEnabled:l,isLocked:i,canRemove:s,canMove:c,block:d,name:m,attributes:h,isValid:g,isSelected:f,themeSupportsLayout:b,isTemporarilyEditingAsBlocks:v,blockEditingMode:k,mayDisplayControls:_,mayDisplayParentControls:y,index:E,blockApiVersion:w,blockTitle:S,isSubtreeDisabled:C,isOutlineEnabled:x,hasOverlay:B,initialPosition:I,isHighlighted:T,isMultiSelected:M,isPartiallySelected:P,isReusable:R,isDragging:N,hasChildSelected:A,removeOutline:L,isBlockMovingMode:O,canInsertMovingBlock:D,isEditingDisabled:z,className:V,defaultClassName:F}=o;if(!o)return null;const H={clientId:t,className:V,index:E,mode:r,name:m,blockApiVersion:w,blockTitle:S,isSelected:f,isSubtreeDisabled:C,isOutlineEnabled:x,hasOverlay:B,initialPosition:I,blockEditingMode:k,isHighlighted:T,isMultiSelected:M,isPartiallySelected:P,isReusable:R,isDragging:N,hasChildSelected:A,removeOutline:L,isBlockMovingMode:O,canInsertMovingBlock:D,isEditingDisabled:z,isTemporarilyEditingAsBlocks:v,defaultClassName:F,mayDisplayControls:_,mayDisplayParentControls:y,themeSupportsLayout:b};return(0,a.createElement)(e_.Provider,{value:H},(0,a.createElement)(f_,{...e,mode:r,isSelectionEnabled:l,isLocked:i,canRemove:s,canMove:c,block:d,name:m,attributes:h,isValid:g,isSelected:f}))})),k_=window.wp.htmlEntities,__=[(0,d.createInterpolateElement)((0,x.__)("While writing, you can press / to quickly insert new blocks."),{kbd:(0,a.createElement)("kbd",null)}),(0,d.createInterpolateElement)((0,x.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,a.createElement)("kbd",null)}),(0,d.createInterpolateElement)((0,x.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,a.createElement)("kbd",null)}),(0,x.__)("Drag files into the editor to automatically insert media blocks."),(0,x.__)("Change a block's type by pressing the block icon on the toolbar.")];const y_=function(){const[e]=(0,d.useState)(Math.floor(Math.random()*__.length));return(0,a.createElement)(kl.Tip,null,__[e])},E_=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),w_=(0,a.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(Z.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));const S_=function({title:e,icon:t,description:n,blockType:o,className:r}){o&&(w()("`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,p.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(wr);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:i}=(0,p.useDispatch)(wr);return(0,a.createElement)("div",{className:pl()("block-editor-block-card",r)},l&&(0,a.createElement)(kl.Button,{onClick:()=>i(l),label:(0,x.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,x.isRTL)()?E_:w_,size:"small"}),(0,a.createElement)(qh,{icon:t,showColors:!0}),(0,a.createElement)("div",{className:"block-editor-block-card__content"},(0,a.createElement)("h2",{className:"block-editor-block-card__title"},e),n&&(0,a.createElement)("span",{className:"block-editor-block-card__description"},n)))},C_=(0,m.createHigherOrderComponent)((e=>(0,p.withRegistry)((({useSubRegistry:t=!0,registry:n,...o})=>{if(!t)return(0,a.createElement)(e,{registry:n,...o});const[r,l]=(0,d.useState)(null);return(0,d.useEffect)((()=>{const e=(0,p.createRegistry)({},n);e.registerStore(ne,Er),l(e)}),[n]),r?(0,a.createElement)(p.RegistryProvider,{value:r},(0,a.createElement)(e,{registry:r,...o})):null}))),"withRegistryProvider"),x_=()=>{};function B_({clientId:e=null,value:t,selection:n,onChange:o=x_,onInput:r=x_}){const l=(0,p.useRegistry)(),{resetBlocks:i,resetSelection:s,replaceInnerBlocks:a,setHasControlledInnerBlocks:c,__unstableMarkNextChangeAsNotPersistent:m}=l.dispatch(wr),{getBlockName:h,getBlocks:g,getSelectionStart:f,getSelectionEnd:b}=l.select(wr),v=(0,p.useSelect)((t=>!e||t(wr).areInnerBlocksControlled(e)),[e]),k=(0,d.useRef)({incoming:null,outgoing:[]}),_=(0,d.useRef)(!1),y=()=>{t&&(m(),e?l.batch((()=>{c(e,!0);const n=t.map((e=>(0,u.cloneBlock)(e)));_.current&&(k.current.incoming=n),m(),a(e,n)})):(_.current&&(k.current.incoming=t),i(t)))},E=(0,d.useRef)(r),w=(0,d.useRef)(o);(0,d.useEffect)((()=>{E.current=r,w.current=o}),[r,o]),(0,d.useEffect)((()=>{k.current.outgoing.includes(t)?k.current.outgoing[k.current.outgoing.length-1]===t&&(k.current.outgoing=[]):g(e)!==t&&(k.current.outgoing=[],y(),n&&s(n.selectionStart,n.selectionEnd,n.initialPosition))}),[t,e]),(0,d.useEffect)((()=>{v||(k.current.outgoing=[],y())}),[v]),(0,d.useEffect)((()=>{const{getSelectedBlocksInitialCaretPosition:t,isLastBlockChangePersistent:n,__unstableIsLastBlockChangeIgnored:o,areInnerBlocksControlled:r}=l.select(wr);let i=g(e),s=n(),a=!1;_.current=!0;const c=l.subscribe((()=>{if(null!==e&&null===h(e))return;if(!(!e||r(e)))return;const l=n(),c=g(e),u=c!==i;if(i=c,u&&(k.current.incoming||o()))return k.current.incoming=null,void(s=l);if(u||a&&!u&&l&&!s){s=l,k.current.outgoing.push(i);const e=s?w.current:E.current,n=En.has(i);n&&En.delete(i),e(i,{selection:{selectionStart:f(),selectionEnd:b(),initialPosition:t()},undoIgnore:n})}a=u}),wr);return()=>{_.current=!1,c()}}),[l,e]),(0,d.useEffect)((()=>()=>{m(),e?(c(e,!1),m(),a(e,[])):i([])}),[])}const I_=window.wp.keyboardShortcuts;function T_(){return null}T_.Register=function(){const{registerShortcut:e}=(0,p.useDispatch)(I_.store);return(0,d.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,x.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,x.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,x.__)("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,x.__)("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,x.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,x.__)("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,x.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,x.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,x.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,x.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,x.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};const M_=T_,P_=C_((e=>{const{children:t,settings:n,stripExperimentalSettings:o=!1}=e,{__experimentalUpdateSettings:r}=le((0,p.useDispatch)(wr));return(0,d.useEffect)((()=>{r({...n,__internalIsInitialized:!0},{stripExperimentalSettings:o,reset:!0})}),[n,o,r]),B_(e),(0,a.createElement)(kl.SlotFillProvider,{passthrough:!0},!n.__unstableIsPreviewMode&&(0,a.createElement)(M_.Register,null),(0,a.createElement)(Ju,null,t))})),R_=e=>(0,a.createElement)(P_,{...e,stripExperimentalSettings:!0},e.children);function N_(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,p.useSelect)(wr),{clearSelectedBlock:o}=(0,p.useDispatch)(wr),{clearBlockSelection:r}=e();return(0,m.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 A_(e){return(0,a.createElement)("div",{ref:N_(),...e})}function L_(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:l,__unstableIsFullySelected:i}=e(wr);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:l(),isFullSelection:i()}}function O_(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:l}=(0,p.useSelect)(L_,[]);return(0,m.useRefEffect)((r=>{const{ownerDocument:i}=r,{defaultView:s}=i;if(null==e)return;if(!o||t)return;const{length:a}=n;a<2||l&&(r.contentEditable=!0,r.focus(),s.getSelection().removeAllRanges())}),[o,t,n,r,e,l])}function D_(e,t,n,o){let r,l=As.focus.focusable.find(n);return t&&l.reverse(),l=l.slice(l.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),l.find((function(e){if(!(e.closest("[inert]")||1===e.children.length&&r_(e,e.firstElementChild)&&"true"===e.firstElementChild.getAttribute("contenteditable"))){if(!As.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 z_(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,p.useSelect)(wr),{selectBlock:l}=(0,p.useDispatch)(wr);return(0,m.useRefEffect)((i=>{let s;function a(){s=null}function c(a){if(a.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:m,metaKey:h}=a,g=c===Ds.UP,f=c===Ds.DOWN,b=c===Ds.LEFT,v=c===Ds.RIGHT,k=g||b,_=b||v,y=g||f,E=_||y,w=d||p||m||h,S=y?As.isVerticalEdge:As.isHorizontalEdge,{ownerDocument:C}=i,{defaultView:x}=C;if(!E)return;if(o()){if(d)return;if(!r())return;return a.preventDefault(),void(k?l(e()):l(t(),-1))}if(!function(e,t,n){const o=t===Ds.UP||t===Ds.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,w))return;y?s||(s=(0,As.computeCaretRect)(x)):s=null;const B=(0,As.isRTL)(u)?!k:k,{keepCaretInsideBlock:I}=n();if(d)(function(e,t){const n=D_(e,t,i);return n&&i_(n)})(u,k)&&S(u,k)&&(i.contentEditable=!0,i.focus());else if(!y||!(0,As.isVerticalEdge)(u,k)||m&&!(0,As.isHorizontalEdge)(u,B)||I){if(_&&x.getSelection().isCollapsed&&(0,As.isHorizontalEdge)(u,B)&&!I){const e=D_(u,B,i);(0,As.placeCaretAtHorizontalEdge)(e,k),a.preventDefault()}}else{const e=D_(u,k,i,!0);e&&((0,As.placeCaretAtVerticalEdge)(e,m?!k:k,m?void 0:s),a.preventDefault())}}return i.addEventListener("mousedown",a),i.addEventListener("keydown",c),()=>{i.removeEventListener("mousedown",a),i.removeEventListener("keydown",c)}}),[])}function V_(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,p.useSelect)(wr),{multiSelect:o,selectBlock:r}=(0,p.useDispatch)(wr),l=(0,I_.__unstableUseShortcutEventMatch)();return(0,m.useRefEffect)((i=>{function s(s){if(!l("core/block-editor/select-all",s))return;const a=t();if(a.length<2&&!(0,As.isEntirelySelected)(s.target))return;s.preventDefault();const[c]=a,u=n(c),d=e(u);a.length!==d.length?o(d[0],d[d.length-1]):u&&(i.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}}),[])}function F_(e,t){e.contentEditable=t,t&&e.focus()}function H_(){const{startMultiSelect:e,stopMultiSelect:t}=(0,p.useDispatch)(wr),{isSelectionEnabled:n,hasSelectedBlock:o,isDraggingBlocks:r,isMultiSelecting:l}=(0,p.useSelect)(wr);return(0,m.useRefEffect)((i=>{const{ownerDocument:s}=i,{defaultView:a}=s;let c,u;function d(){t(),a.removeEventListener("mouseup",d),u=a.requestAnimationFrame((()=>{if(!o())return;F_(i,!1);const e=a.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);c.contains(t)&&c.focus()}}))}function p({buttons:t,target:o}){r()||1===t&&(l()||i!==o&&"true"===o.getAttribute("contenteditable")&&n()&&(c=o,e(),a.addEventListener("mouseup",d),F_(i,!0)))}return i.addEventListener("mouseout",p),()=>{i.removeEventListener("mouseout",p),a.removeEventListener("mouseup",d),a.cancelAnimationFrame(u)}}),[e,t,n,o])}function G_(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function U_(e){const t=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;return t?.closest("[data-wp-block-attribute-key]")}function $_(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,p.useDispatch)(wr),{getBlockParents:o,getBlockSelectionStart:r,isMultiSelecting:l}=(0,p.useSelect)(wr);return(0,m.useRefEffect)((i=>{const{ownerDocument:s}=i,{defaultView:a}=s;function c(s){const c=a.getSelection();if(!c.rangeCount)return;const u=function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(c),d=function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(c);if(!i.contains(u)||!i.contains(d))return;const p=s.shiftKey&&"mouseup"===s.type;if(c.isCollapsed&&!p){if("true"===i.contentEditable&&!l()){G_(i,!1);let e=u.nodeType===u.ELEMENT_NODE?u:u.parentElement;e=e?.closest("[contenteditable]"),e?.focus()}return}let m=i_(u),h=i_(d);if(p){const e=r(),t=i_(s.target),n=t!==h;(m===h&&c.isCollapsed||!h||n)&&(h=t),m!==e&&(m=e)}if(void 0===m&&void 0===h)return void G_(i,!1);if(m===h)l()?e(m,m):t(m);else{const t=[...o(m),m],r=[...o(h),h],l=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,r);if(t[l]!==m||r[l]!==h)return void e(t[l],r[l]);const i=U_(u),s=U_(d);if(i&&s){var g,f;const e=c.getRangeAt(0),t=(0,Y.create)({element:i,range:e,__unstableIsEditableTree:!0}),o=(0,Y.create)({element:s,range:e,__unstableIsEditableTree:!0}),r=null!==(g=t.start)&&void 0!==g?g:t.end,l=null!==(f=o.start)&&void 0!==f?f:o.end;n({start:{clientId:m,attributeKey:i.dataset.wpBlockAttributeKey,offset:r},end:{clientId:h,attributeKey:s.dataset.wpBlockAttributeKey,offset:l}})}else e(m,h)}}return s.addEventListener("selectionchange",c),a.addEventListener("mouseup",c),()=>{s.removeEventListener("selectionchange",c),a.removeEventListener("mouseup",c)}}),[e,t,n,o])}function j_(){const{selectBlock:e}=(0,p.useDispatch)(wr),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,p.useSelect)(wr);return(0,m.useRefEffect)((r=>{function l(l){if(!t()||0!==l.button)return;const i=n(),s=i_(l.target);l.shiftKey?i!==s&&(r.contentEditable=!0,r.focus()):o()&&e(s)}return r.addEventListener("mousedown",l),()=>{r.removeEventListener("mousedown",l)}}),[e,t,n,o])}function W_(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:o}=(0,p.useSelect)(wr),{replaceBlocks:r,__unstableSplitSelection:l,removeBlocks:i,__unstableDeleteSelection:s,__unstableExpandSelection:a}=(0,p.useDispatch)(wr);return(0,m.useRefEffect)((c=>{function d(e){"true"===c.contentEditable&&e.preventDefault()}function p(d){d.defaultPrevented||o()&&(d.keyCode===Ds.ENTER?(c.contentEditable=!1,d.preventDefault(),e()?r(t(),(0,u.createBlock)((0,u.getDefaultBlockName)())):l()):d.keyCode===Ds.BACKSPACE||d.keyCode===Ds.DELETE?(c.contentEditable=!1,d.preventDefault(),e()?i(t()):n()?s(d.keyCode===Ds.DELETE):a()):1!==d.key.length||d.metaKey||d.ctrlKey||(c.contentEditable=!1,n()?s(d.keyCode===Ds.DELETE):(d.preventDefault(),c.ownerDocument.defaultView.getSelection().removeAllRanges())))}function m(e){o()&&(c.contentEditable=!1,n()?s():(e.preventDefault(),c.ownerDocument.defaultView.getSelection().removeAllRanges()))}return c.addEventListener("beforeinput",d),c.addEventListener("keydown",p),c.addEventListener("compositionstart",m),()=>{c.removeEventListener("beforeinput",d),c.removeEventListener("keydown",p),c.removeEventListener("compositionstart",m)}}),[])}function K_({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(t){try{n=e.getData("Text")}catch(e){return}}n=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;const o=(e=e.substring(n+20)).indexOf("\x3c!--EndFragment--\x3e");return o>-1&&(e=e.substring(0,o)),e}(n),n=function(e){const t="";return e.startsWith(t)?e.slice(22):e}(n);const o=(0,As.getFilesFromDataTransfer)(e);return o.length&&!function(e,t){if(t&&1===e?.length&&0===e[0].type.indexOf("image/")){const e=/<\s*img\b/gi;if(1!==t.match(e)?.length)return!0;const n=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(n))return!0}return!1}(o,n)?{files:o}:{html:n,plainText:t,files:[]}}function Z_(){const{getBlockName:e}=(0,p.useSelect)(wr),{getBlockType:t}=(0,p.useSelect)(u.store),{createSuccessNotice:n}=(0,p.useDispatch)(Ls.store);return(0,d.useCallback)(((o,r)=>{let l="";if(1===r.length){const n=r[0],i=t(e(n))?.title;l="copy"===o?(0,x.sprintf)((0,x.__)('Copied "%s" to clipboard.'),i):(0,x.sprintf)((0,x.__)('Moved "%s" to clipboard.'),i)}else l="copy"===o?(0,x.sprintf)((0,x._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,x.sprintf)((0,x._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(l,{type:"snackbar"})}),[])}function q_(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o,__unstableIsFullySelected:r,__unstableIsSelectionCollapsed:l,__unstableIsSelectionMergeable:i,__unstableGetSelectedBlocksWithPartialSelection:s,canInsertBlockType:a}=(0,p.useSelect)(wr),{flashBlock:c,removeBlocks:d,replaceBlocks:h,__unstableDeleteSelection:g,__unstableExpandSelection:f,insertBlocks:b}=(0,p.useDispatch)(wr),v=Z_();return(0,m.useRefEffect)((p=>{function m(m){if(m.defaultPrevented)return;const k=t();if(0===k.length)return;if(!n()){const{target:e}=m,{ownerDocument:t}=e;if("copy"===m.type||"cut"===m.type?(0,As.documentHasUncollapsedSelection)(t):(0,As.documentHasSelection)(t))return}if(!p.contains(m.target.ownerDocument.activeElement))return;m.preventDefault();const _=i(),y=l()||r(),E=!y&&!_;if("copy"===m.type||"cut"===m.type)if(1===k.length&&c(k[0]),E)f();else{let t;if(v(m.type,k),y)t=e(k);else{const[n,o]=s();t=[n,...e(k.slice(1,k.length-1)),o]}const n=m.clipboardData.getData("__unstableWrapperBlockName");n&&(t=(0,u.createBlock)(n,JSON.parse(m.clipboardData.getData("__unstableWrapperBlockAttributes")),t));const o=(0,u.serialize)(t);m.clipboardData.setData("text/plain",function(e){e=e.replace(/
/g,"\n");return(0,As.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(o)),m.clipboardData.setData("text/html",o)}if("cut"===m.type)y&&!E?d(k):(m.target.ownerDocument.activeElement.contentEditable=!1,g());else if("paste"===m.type){const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n,files:r}=K_(m);let l=[];if(r.length){const e=(0,u.getBlockTransforms)("from");l=r.reduce(((t,n)=>{const o=(0,u.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else l=(0,u.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});if(1===k.length){const[e]=k;if(l.every((t=>a(t.name,e))))return void b(l,void 0,e)}h(k,l,l.length-1,-1)}}return p.ownerDocument.addEventListener("copy",m),p.ownerDocument.addEventListener("cut",m),p.ownerDocument.addEventListener("paste",m),()=>{p.ownerDocument.removeEventListener("copy",m),p.ownerDocument.removeEventListener("cut",m),p.ownerDocument.removeEventListener("paste",m)}}),[])}function Y_(){const[e,t,n]=function(){const e=(0,d.useRef)(),t=(0,d.useRef)(),n=(0,d.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:r,getBlockCount:l}=(0,p.useSelect)(wr),{setNavigationMode:i,setLastFocus:s}=le((0,p.useDispatch)(wr)),c=(0,p.useSelect)((e=>e(wr).isNavigationMode()),[]),{getLastFocus:u}=le((0,p.useSelect)(wr)),h=c?void 0:"0",g=(0,d.useRef)();function f(t){if(g.current)g.current=null;else if(o())e.current.focus();else if(r())u()?.current.focus();else{i(!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=As.focus.tabbable.find(e.current);r.length&&(o?r[0]:r[r.length-1]).focus()}}const b=(0,a.createElement)("div",{ref:t,tabIndex:h,onFocus:f}),v=(0,a.createElement)("div",{ref:n,tabIndex:h,onFocus:f}),k=(0,m.useRefEffect)((a=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===Ds.ESCAPE&&!o())return e.preventDefault(),void i(!0);if(e.keyCode!==Ds.TAB)return;const l=e.shiftKey,s=l?"findPrevious":"findNext";if(!o()&&!r())return void(e.target===a&&i(!0));const c=As.focus.tabbable[s](e.target),u=e.target.closest("[data-block]"),d=u&&c&&(r_(u,c)||l_(u,c));if((0,As.isFormElement)(c)&&d)return;const p=l?t:n;g.current=!0,p.current.focus({preventScroll:!0})}function d(e){s({...u(),current:e.target});const{ownerDocument:t}=a;e.relatedTarget||t.activeElement!==t.body||0!==l()||a.focus()}function p(o){if(o.keyCode!==Ds.TAB)return;if("region"===o.target?.getAttribute("role"))return;if(e.current===o.target)return;const r=o.shiftKey?"findPrevious":"findNext",l=As.focus.tabbable[r](o.target);l!==t.current&&l!==n.current||(o.preventDefault(),l.focus({preventScroll:!0}))}const{ownerDocument:m}=a,{defaultView:h}=m;return h.addEventListener("keydown",p),a.addEventListener("keydown",c),a.addEventListener("focusout",d),()=>{h.removeEventListener("keydown",p),a.removeEventListener("keydown",c),a.removeEventListener("focusout",d)}}),[]);return[b,(0,m.useMergeRefs)([e,k]),v]}(),o=(0,p.useSelect)((e=>e(wr).hasMultiSelection()),[]);return[e,(0,m.useMergeRefs)([t,q_(),W_(),H_(),$_(),j_(),O_(),V_(),z_(),(0,m.useRefEffect)((e=>{if(e.tabIndex=0,o)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,x.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[o])]),n]}const X_=(0,d.forwardRef)((function({children:e,...t},n){const[o,r,l]=Y_();return(0,a.createElement)(a.Fragment,null,o,(0,a.createElement)("div",{...t,ref:(0,m.useMergeRefs)([r,n]),className:pl()(t.className,"block-editor-writing-flow")},e),l)}));let Q_=null;function J_(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 ey(e){return(0,m.useRefEffect)((()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],l={};for(const e of r)l[e]=e=>{const t=Object.getPrototypeOf(e).constructor.name;J_(e,window[t],n)},o.addEventListener(e,l[e]);return()=>{for(const e of r)o.removeEventListener(e,l[e])}}))}function ty({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,expand:l=!1,readonly:i,forwardedRef:s,...c}){const{resolvedAssets:u,isPreviewMode:h}=(0,p.useSelect)((e=>{const t=e(wr).getSettings();return{resolvedAssets:t.__unstableResolvedAssets,isPreviewMode:t.__unstableIsPreviewMode}}),[]),{styles:g="",scripts:f=""}=u,[b,v]=(0,d.useState)(),[k,_]=(0,d.useState)([]),y=N_(),[E,w,S]=Y_(),[C,{height:B}]=(0,m.useResizeObserver)(),I=(0,m.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(){const{contentDocument:o,ownerDocument:r}=e,{documentElement:l}=o;t=o,y(l),_(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 Q_||(Q_=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}),[]),Q_))o.getElementById(e.id)||(o.head.appendChild(e.cloneNode(!0)),h||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=()=>{v(e.contentDocument)},e.addEventListener("load",o),()=>{delete e._load,e.removeEventListener("load",o),t?.removeEventListener("dragover",n),t?.removeEventListener("drop",n)}}),[]),T=(0,m.useDisabled)({isDisabled:!i}),M=(0,m.useMergeRefs)([ey(b),e,y,w,T]),P=`\n\n\t\n\t\t\n\t\t