/*! This file is auto-generated */ (()=>{var e={197:()=>{},271:(e,t,n)=>{"use strict";let o,r,i=n(683);class s extends i{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new o(new r,this,e).stringify()}}s.registerLazyResult=e=>{o=e},s.registerProcessor=e=>{r=e},e.exports=s,s.default=s},346: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 l;return void 0===r&&(r=t[o]),s.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},356:(e,t,n)=>{"use strict";let o=n(2775),r=n(9746);class i extends Error{constructor(e,t,n,o,r,s){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),o&&(this.source=o),s&&(this.plugin=s),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,i)}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);let n=e=>e,i=e=>e,s=e=>e;if(e){let{bold:e,gray:t,red:l}=o.createColors(!0);i=t=>e(l(t)),n=e=>t(e),r&&(s=e=>r(e))}let l=t.split(/\r?\n/),a=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),u=String(c).length;return l.slice(a,c).map(((e,t)=>{let o=a+1+t,r=" "+(" "+o).slice(-u)+" | ";if(o===this.line){if(e.length>160){let t=20,o=Math.max(0,this.column-t),l=Math.max(this.column+t,this.endColumn+t),a=e.slice(o,l),c=n(r.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return i(">")+n(r)+s(a)+"\n "+c+i("^")}let t=n(r.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+n(r)+s(e)+"\n "+t+i("^")}return" "+n(r)+s(e)})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=i,i.default=i},448:(e,t,n)=>{"use strict";let o=n(683),r=n(271),i=n(1670),s=n(4295),l=n(9055),a=n(9434),c=n(633),{isClean:u,my:d}=n(1381);n(3122);const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},g={Once:!0,postcssPlugin:!0,prepare:!0};function m(e){return"object"==typeof e&&"function"==typeof e.then}function f(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,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function b(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function k(e){return e[u]=!1,e.nodes&&e.nodes.forEach((e=>k(e))),e}let v={};class _{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"}constructor(e,t,n){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof _||t instanceof l)r=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=s;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{r=e(t,n)}catch(e){this.processed=!0,this.error=e}r&&!r[d]&&o.rebuild(r)}else r=k(t);this.result=new l(e,r,n),this.helpers={...v,postcss:v,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(!h[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!g[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(m(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 m(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=c;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new i(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(m(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[u];)e[u]=!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(m(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:o}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(o.length>0&&t.visitorIndex{e[u]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}}_.registerPostcss=e=>{v=e},e.exports=_,_.default=_,a.registerLazyResult(_),r.registerLazyResult(_)},461:(e,t,n)=>{var o=n(6109);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 i=e.nodeName,s=document.createElement(i);s.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&s.setAttribute("rows","1");var l=o(e,"font-size");s.style.fontSize=l,s.style.padding="0px",s.style.border="0px";var a=document.body;a.appendChild(s),n=s.offsetHeight,a.removeChild(s)}return n}},628:(e,t,n)=>{"use strict";var o=n(4067);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){var l=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 l.name="Invariant Violation",l}}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:i,resetWarningCache:r};return n.PropTypes=n,n}},633:(e,t,n)=>{"use strict";let o=n(346);function r(e,t){new o(t).stringify(e)}e.exports=r,r.default=r},683:(e,t,n)=>{"use strict";let o,r,i,s,l=n(6589),a=n(1516),c=n(7490),{isClean:u,my:d}=n(1381);function p(e){return e.map((e=>(e.nodes&&(e.nodes=p(e.nodes)),delete e.source,e)))}function h(e){if(e[u]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)h(t)}class g extends c{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]}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[d]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[u]&&h(e),e.raws||(e.raws={}),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)})))}}g.registerParse=e=>{r=e},g.registerRule=e=>{s=e},g.registerAtRule=e=>{o=e},g.registerRoot=e=>{i=e},e.exports=g,g.default=g,g.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,o.prototype):"rule"===e.type?Object.setPrototypeOf(e,s.prototype):"decl"===e.type?Object.setPrototypeOf(e,a.prototype):"comment"===e.type?Object.setPrototypeOf(e,l.prototype):"root"===e.type&&Object.setPrototypeOf(e,i.prototype),e[d]=!0,e.nodes&&e.nodes.forEach((e=>{g.rebuild(e)}))}},1087:(e,t,n)=>{"use strict";var o,r=n(8202);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,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i="function"==typeof s[n]}return!i&&o&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},1326:(e,t,n)=>{"use strict";let o=n(683);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)},1381:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},1443:e=>{function t(e,t){return t.some((t=>t instanceof RegExp?t.test(e):e.includes(t)))}e.exports=function(e){const n=e.prefix,o=/\s+$/.test(n)?n:`${n} `,r=e.ignoreFiles?[].concat(e.ignoreFiles):[],i=e.includeFiles?[].concat(e.includeFiles):[];return function(s){r.length&&s.source.input.file&&t(s.source.input.file,r)||i.length&&s.source.input.file&&!t(s.source.input.file,i)||s.walkRules((t=>{t.parent&&["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes","-ms-keyframes"].includes(t.parent.name)||(t.selectors=t.selectors.map((r=>e.exclude&&function(e,t){return t.some((t=>t instanceof RegExp?t.test(e):e===t))}(r,e.exclude)?r:e.transform?e.transform(n,r,o+r,s.source.input.file,t):o+r)))}))}}},1516:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}}e.exports=r,r.default=r},1524:e=>{var t="-".charCodeAt(0),n="+".charCodeAt(0),o=".".charCodeAt(0),r="e".charCodeAt(0),i="E".charCodeAt(0);e.exports=function(e){var s,l,a,c=0,u=e.length;if(0===u||!function(e){var r,i=e.charCodeAt(0);if(i===n||i===t){if((r=e.charCodeAt(1))>=48&&r<=57)return!0;var s=e.charCodeAt(2);return r===o&&s>=48&&s<=57}return i===o?(r=e.charCodeAt(1))>=48&&r<=57:i>=48&&i<=57}(e))return!1;for((s=e.charCodeAt(c))!==n&&s!==t||c++;c57);)c+=1;if(s=e.charCodeAt(c),l=e.charCodeAt(c+1),s===o&&l>=48&&l<=57)for(c+=2;c57);)c+=1;if(s=e.charCodeAt(c),l=e.charCodeAt(c+1),a=e.charCodeAt(c+2),(s===r||s===i)&&(l>=48&&l<=57||(l===n||l===t)&&a>=48&&a<=57))for(c+=l===n||l===t?3:2;c57);)c+=1;return{number:e.slice(0,c),unit:e.slice(c)}}},1544:(e,t,n)=>{var o=n(8491),r=n(3815),i=n(4725);function s(e){return this instanceof s?(this.nodes=o(e),this):new s(e)}s.prototype.toString=function(){return Array.isArray(this.nodes)?i(this.nodes):""},s.prototype.walk=function(e,t){return r(this.nodes,e,t),this},s.unit=n(1524),s.walk=r,s.stringify=i,e.exports=s},1609:e=>{"use strict";e.exports=window.React},1670:(e,t,n)=>{"use strict";let{dirname:o,relative:r,resolve:i,sep:s}=n(197),{SourceMapConsumer:l,SourceMapGenerator:a}=n(1866),{pathToFileURL:c}=n(2739),u=n(5380),d=Boolean(l&&a),p=Boolean(o&&i&&r&&s);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.originalCSS=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||o(e.file);!1===this.mapOpts.sourcesContent?(t=new l(e.text),t.sourcesContent&&(t.sourcesContent=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&&e.text.startsWith("# 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=a.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0}),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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,o=1,r="",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,l,a)=>{if(this.css+=s,l&&"end"!==a&&(i.generated.line=n,i.generated.column=o-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),t=s.match(/\n/g),t?(n+=t.length,e=s.lastIndexOf("\n"),o=s.length-e):o+=s.length,l&&"start"!==a){let e=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===e.last&&!e.raws.semicolon||(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=n,i.generated.column=o-2,this.map.addMapping(i)):(i.source=r,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?o(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=o(i(n,this.mapOpts.annotation)));let s=r(n,e);return this.memoizedPaths.set(e,s),s}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.originalCSS,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;"\\"===s&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}},1866:()=>{},2213:e=>{var t,n,o,r,i,s,l,a,c,u,d,p,h,g,m,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),k=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(p=/\b(iPhone|iP[ao]d)/.exec(e),h=/\b(iP[ao]d)/.exec(e),u=/Android/i.exec(e),g=/FBAN\/\w+;/i.exec(e),m=/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 v=/(?:Trident\/(\d+.\d+))/.exec(e);s=v?parseFloat(v[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),i=b&&b[1]?parseFloat(b[1]):NaN):i=NaN}else t=n=o=i=r=NaN;if(k){if(k[1]){var _=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);l=!_||parseFloat(_[1].replace("_","."))}else l=!1;a=!!k[2],c=!!k[3]}else l=a=c=!1}}var k={ie:function(){return b()||t},ieCompatibilityMode:function(){return b()||s>t},ie64:function(){return k.ie()&&d},firefox:function(){return b()||n},opera:function(){return b()||o},webkit:function(){return b()||r},safari:function(){return k.webkit()},chrome:function(){return b()||i},windows:function(){return b()||a},osx:function(){return b()||l},linux:function(){return b()||c},iphone:function(){return b()||p},mobile:function(){return b()||p||h||u||m},nativeApp:function(){return b()||g},android:function(){return b()||u},ipad:function(){return b()||h}};e.exports=k},2327:e=>{"use strict";const t="'".charCodeAt(0),n='"'.charCodeAt(0),o="\\".charCodeAt(0),r="/".charCodeAt(0),i="\n".charCodeAt(0),s=" ".charCodeAt(0),l="\f".charCodeAt(0),a="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),d="]".charCodeAt(0),p="(".charCodeAt(0),h=")".charCodeAt(0),g="{".charCodeAt(0),m="}".charCodeAt(0),f=";".charCodeAt(0),b="*".charCodeAt(0),k=":".charCodeAt(0),v="@".charCodeAt(0),_=/[\t\n\f\r "#'()/;[\\\]{}]/g,y=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,x=/.[\r\n"'(/\\]/,S=/[\da-f]/i;e.exports=function(e,w={}){let C,B,I,j,E,T,M,P,R,A,N=e.css.valueOf(),L=w.ignoreErrors,D=N.length,O=0,z=[],V=[];function F(t){throw e.error("Unclosed "+t,O)}return{back:function(e){V.push(e)},endOfFile:function(){return 0===V.length&&O>=D},nextToken:function(e){if(V.length)return V.pop();if(O>=D)return;let w=!!e&&e.ignoreUnclosed;switch(C=N.charCodeAt(O),C){case i:case s:case a:case c:case l:j=O;do{j+=1,C=N.charCodeAt(j)}while(C===s||C===i||C===a||C===c||C===l);T=["space",N.slice(O,j)],O=j-1;break;case u:case d:case g:case m:case k:case f:case h:{let e=String.fromCharCode(C);T=[e,e,O];break}case p:if(A=z.length?z.pop()[1]:"",R=N.charCodeAt(O+1),"url"===A&&R!==t&&R!==n&&R!==s&&R!==i&&R!==a&&R!==l&&R!==c){j=O;do{if(M=!1,j=N.indexOf(")",j+1),-1===j){if(L||w){j=O;break}F("bracket")}for(P=j;N.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);T=["brackets",N.slice(O,j+1),O,j],O=j}else j=N.indexOf(")",O+1),B=N.slice(O,j+1),-1===j||x.test(B)?T=["(","(",O]:(T=["brackets",B,O,j],O=j);break;case t:case n:E=C===t?"'":'"',j=O;do{if(M=!1,j=N.indexOf(E,j+1),-1===j){if(L||w){j=O+1;break}F("string")}for(P=j;N.charCodeAt(P-1)===o;)P-=1,M=!M}while(M);T=["string",N.slice(O,j+1),O,j],O=j;break;case v:_.lastIndex=O+1,_.test(N),j=0===_.lastIndex?N.length-1:_.lastIndex-2,T=["at-word",N.slice(O,j+1),O,j],O=j;break;case o:for(j=O,I=!0;N.charCodeAt(j+1)===o;)j+=1,I=!I;if(C=N.charCodeAt(j+1),I&&C!==r&&C!==s&&C!==i&&C!==a&&C!==c&&C!==l&&(j+=1,S.test(N.charAt(j)))){for(;S.test(N.charAt(j+1));)j+=1;N.charCodeAt(j+1)===s&&(j+=1)}T=["word",N.slice(O,j+1),O,j],O=j;break;default:C===r&&N.charCodeAt(O+1)===b?(j=N.indexOf("*/",O+2)+1,0===j&&(L||w?j=N.length:F("comment")),T=["comment",N.slice(O,j+1),O,j],O=j):(y.lastIndex=O+1,y.test(N),j=0===y.lastIndex?N.length-1:y.lastIndex-2,T=["word",N.slice(O,j+1),O,j],z.push(T),O=j)}return O++,T},position:function(){return O}}}},2739:()=>{},2775: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,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};e.exports=n(),e.exports.createColors=n},3122:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},3815:e=>{e.exports=function e(t,n,o){var r,i,s,l;for(r=0,i=t.length;r{"use strict";let o=n(1326),r=n(6589),i=n(1516),s=n(9434),l=n(4092),a=n(2327);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.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,r,i=new o;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let s=!1,l=!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){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){l=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,n=a[r];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),s&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),l&&(i.nodes=[],this.current=i)}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[i,s]of e.entries()){if(n=s,o=n[0],"("===o&&(r+=1),")"===o&&(r-=1),0===r&&":"===o){if(t){if("word"===t[0]&&"progid"===t[1])continue;return i}this.doubleColon(n)}t=n}return!1}comment(e){let t=new r;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=a(this.input)}decl(e,t){let n=new i;this.init(n,e[0][2]);let o,r=e[e.length-1];for(";"===r[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(r[3]||r[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(o=e.shift(),":"===o[0]){n.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),n.raws.between+=o[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let s,l=[];for(;e.length&&(s=e[0][0],"space"===s||"comment"===s);)l.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(o=e[t],"!important"===o[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"===o[1].toLowerCase()){let o=e.slice(0),r="";for(let e=t;e>0;e--){let t=o[e][0];if(r.trim().startsWith("!")&&"space"!==t)break;r=o.pop()[1]+r}r.trim().startsWith("!")&&(n.important=!0,n.raws.important=r,e=o)}if("space"!==o[0]&&"comment"!==o[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=l.map((e=>e[1])).join(""),l=[]),this.raw(n,"value",l.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 l;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 t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}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,i=[],s=e[1].startsWith("--"),l=[],a=e;for(;a;){if(n=a[0],l.push(a),"("===n||"["===n)r||(r=a),i.push("("===n?")":"]");else if(s&&o&&"{"===n)r||(r=a),i.push("}");else if(0===i.length){if(";"===n){if(o)return void this.decl(l,s);break}if("{"===n)return void this.rule(l);if("}"===n){this.tokenizer.back(l.pop()),t=!0;break}":"===n&&(o=!0)}else n===i[i.length-1]&&(i.pop(),0===i.length&&(r=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(r),t&&o){if(!s)for(;l.length&&(a=l[l.length-1][0],"space"===a||"comment"===a);)this.tokenizer.back(l.pop());this.decl(l,s)}else this.unknownWord(l)}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,i,s,l,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 l;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";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4092:(e,t,n)=>{"use strict";let o=n(683),r=n(7374);class i extends o{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)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}}e.exports=i,i.default=i,o.registerRule(i)},4132:(e,t,n)=>{"use strict";var o=n(4462);t.A=o.TextareaAutosize},4295:(e,t,n)=>{"use strict";let o=n(683),r=n(5380),i=n(3937);function s(e,t){let n=new r(e,t),o=new i(n);try{o.parse()}catch(e){throw e}return o.root}e.exports=s,s.default=s,o.registerParse(s)},4306: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))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function s(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,s=function(){e.clientWidth!==n&&p()},l=function(t){window.removeEventListener("resize",s,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",l,!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",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",s,!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:l,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{function t(e,t){var o,r,i=e.type,s=e.value;return t&&void 0!==(r=t(e))?r:"word"===i||"space"===i?s:"string"===i?(o=e.quote||"")+s+(e.unclosed?"":o):"comment"===i?"/*"+s+(e.unclosed?"":"*/"):"div"===i?(e.before||"")+s+(e.after||""):Array.isArray(e.nodes)?(o=n(e.nodes,t),"function"!==i?o:s+"("+(e.before||"")+o+(e.after||"")+(e.unclosed?"":")")):s}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},5042:e=>{e.exports={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let o="",r=0|n;for(;r--;)o+=e[Math.random()*e.length|0];return o}}},5215: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,i;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=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!=r--;){var s=i[r];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},5380:(e,t,n)=>{"use strict";let{nanoid:o}=n(5042),{isAbsolute:r,resolve:i}=n(197),{SourceMapConsumer:s,SourceMapGenerator:l}=n(1866),{fileURLToPath:a,pathToFileURL:c}=n(2739),u=n(356),d=n(5696),p=n(9746),h=Symbol("lineToIndexCache"),g=Boolean(s&&l),m=Boolean(i&&r);function f(e){if(e[h])return e[h];let t=e.css.split("\n"),n=new Array(t.length),o=0;for(let e=0,r=t.length;e"),this.map&&(this.map.file=this.from)}error(e,t,n,o={}){let r,i,s,l,a;if(t&&"object"==typeof t){let e=t,o=n;if("number"==typeof e.offset){l=e.offset;let o=this.fromOffset(l);t=o.line,n=o.col}else t=e.line,n=e.column,l=this.fromLineAndColumn(t,n);if("number"==typeof o.offset){s=o.offset;let e=this.fromOffset(s);i=e.line,r=e.col}else i=o.line,r=o.column,s=this.fromLineAndColumn(o.line,o.column)}else if(n)l=this.fromLineAndColumn(t,n);else{l=t;let e=this.fromOffset(l);t=e.line,n=e.col}let d=this.origin(t,n,i,r);return a=d?new u(e,void 0===d.endLine?d.line:{column:d.column,line:d.line},void 0===d.endLine?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,o.plugin):new u(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:r,line:i},this.css,this.file,o.plugin),a.input={column:n,endColumn:r,endLine:i,endOffset:s,line:t,offset:l,source:this.css},this.file&&(c&&(a.input.url=c(this.file).toString()),a.input.file=this.file),a}fromLineAndColumn(e,t){return f(this)[e-1]+t-1}fromOffset(e){let t=f(this),n=0;if(e>=t[t.length-1])n=t.length-1;else{let o,r=t.length-2;for(;n>1),e=t[o+1])){n=o;break}n=o+1}}return{col:e-t[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:i(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,o){if(!this.map)return!1;let i,s,l=this.map.consumer(),u=l.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof n&&(i=l.originalPositionFor({column:o,line:n})),s=r(u.source)?c(u.source):new URL(u.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let d={column:u.column,endColumn:i&&i.column,endLine:i&&i.line,line:u.line,url:s.toString()};if("file:"===s.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");d.file=a(s)}let p=l.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}}e.exports=b,b.default=b,p&&p.registerInput&&p.registerInput(b)},5404:(e,t,n)=>{const o=n(1544);e.exports=e=>{const t=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(n){const r=o(n.value);let i=!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(),i=!0),!1})),i&&(n.value=o.stringify(r))}}},e.exports.postcss=!0},5417:(e,t)=>{"use strict";function n(){}function o(e,t,n,o,r){for(var i=0,s=t.length,l=0,a=0;ie.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(l,l+c.count));l+=c.count,c.added||(a+=c.count)}}var p=t[s-1];return s>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[s-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 i=this;function s(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,a=e.length,c=1,u=l+a,d=[{newPos:-1,components:[]}],p=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=l&&p+1>=a)return s([{value:this.join(t),count:t.length}]);function h(){for(var n=-1*c;n<=c;n+=2){var r=void 0,u=d[n-1],p=d[n+1],h=(p?p.newPos:0)-n;u&&(d[n-1]=void 0);var g=u&&u.newPos+1=l&&h+1>=a)return s(o(i,r.components,t,e,i.useLongestToken));d[n]=r}else d[n]=void 0}var f;c++}if(r)!function e(){setTimeout((function(){if(c>u)return r();h()||e()}),0)}();else for(;c<=u;){var g=h();if(g)return g}},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,i=n.length,s=e.newPos,l=s-o,a=0;s+1{"use strict";let{existsSync:o,readFileSync:r}=n(9977),{dirname:i,join:s}=n(197),{SourceMapConsumer:l,SourceMapGenerator:a}=n(1866);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=i(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new l(this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let n=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(n)return o=e.substr(n[0].length),Buffer?Buffer.from(o,"base64").toString():window.atob(o);var o;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}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=/g);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=i(e),o(e))return this.mapFile=e,r(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 l)return a.fromSourceMap(t).toString();if(t instanceof a)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=s(i(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},5776: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},5826:(e,t,n)=>{e.exports=n(628)()},6109:e=>{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},6589:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){super(e),this.type="comment"}}e.exports=r,r.default=r},7191:(e,t,n)=>{"use strict";var o=n(2213),r=n(1087);function i(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}}i.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=i},7374: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="",i=!1,s=0,l=!1,a="",c=!1;for(let n of e)c?c=!1:"\\"===n?c=!0:l?n===a&&(l=!1):'"'===n||"'"===n?(l=!0,a=n):"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&t.includes(n)&&(i=!0),i?(""!==r&&o.push(r.trim()),r="",i=!1):r+=n;return(n||""!==r)&&o.push(r.trim()),o}};e.exports=t,t.default=t},7490:(e,t,n)=>{"use strict";let o=n(356),r=n(346),i=n(633),{isClean:s,my:l}=n(1381);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],i=typeof r;"parent"===o&&"object"===i?t&&(n[o]=t):"source"===o?n[o]=r:Array.isArray(r)?n[o]=r.map((e=>a(e,n))):("object"===i&&null!==r&&(r=a(r)),n[o]=r)}return n}function c(e,t){if(t&&void 0!==t.offset)return t.offset;let n=1,o=1,r=0;for(let i=0;i"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)}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let e=this;for(;e=e.parent;)e[s]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,o=n.slice(c(n,this.source.start),c(n,this.source.end)).indexOf(e.word);-1!==o&&(t=this.positionInside(o))}return t}positionInside(e){let t=this.source.start.column,n=this.source.start.line,o="document"in this.source.input?this.source.input.document:this.source.input.css,r=c(o,this.source.start),i=r+e;for(let e=r;e"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){if(null==o)continue;let i=t.get(o.input);null==i&&(i=r,t.set(o.input,r),r++),n[e]={end:o.end,inputId:i,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=i){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)}}e.exports=u,u.default=u},7520:(e,t,n)=>{e.exports=n(7191)},7661:(e,t,n)=>{"use strict";let o=n(1670),r=n(4295);const i=n(9055);let s=n(633);n(3122);class l{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=r;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"}constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let l=s;this.result=new i(this._processor,r,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let c=new o(l,r,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}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[]}}e.exports=l,l.default=l},7734: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,i;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=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!=r--;){var s=i[r];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},8021:(e,t,n)=>{"use strict";var o;t.JJ=function(e,t,n){return r.diff(e,t,n)};var r=new(((o=n(5417))&&o.__esModule?o:{default:o}).default)},8202: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},8491:e=>{var t="(".charCodeAt(0),n=")".charCodeAt(0),o="'".charCodeAt(0),r='"'.charCodeAt(0),i="\\".charCodeAt(0),s="/".charCodeAt(0),l=",".charCodeAt(0),a=":".charCodeAt(0),c="*".charCodeAt(0),u="u".charCodeAt(0),d="U".charCodeAt(0),p="+".charCodeAt(0),h=/^[a-f0-9?-]+$/i;e.exports=function(e){for(var g,m,f,b,k,v,_,y,x,S=[],w=e,C=0,B=w.charCodeAt(C),I=w.length,j=[{nodes:S}],E=0,T="",M="",P="";C{"use strict";let o=n(5776);class r{get content(){return this.css}constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css="",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))}}e.exports=r,r.default=r},9434:(e,t,n)=>{"use strict";let o,r,i=n(683);class s extends i{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()}}s.registerLazyResult=e=>{o=e},s.registerProcessor=e=>{r=e},e.exports=s,s.default=s,i.registerRoot(s)},9656:(e,t,n)=>{"use strict";let o=n(271),r=n(448),i=n(7661),s=n(9434);class l{constructor(e=[]){this.version="8.5.6",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 this.plugins.length||t.parser||t.stringifier||t.syntax?new r(this,e,t):new i(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=l,l.default=l,s.registerProcessor(l),o.registerProcessor(l)},9681: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 i(e){return t[e]}var s=function(e){return e.replace(o,i)};e.exports=s,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=s},9746:()=>{},9977:()=>{}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.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:()=>Vg,AlignmentToolbar:()=>Fg,Autocomplete:()=>kj,BlockAlignmentControl:()=>pa,BlockAlignmentToolbar:()=>ha,BlockBreadcrumb:()=>Cj,BlockCanvas:()=>XT,BlockColorsStyleSelector:()=>tM,BlockContextProvider:()=>iv,BlockControls:()=>Rs,BlockEdit:()=>vv,BlockEditorKeyboardShortcuts:()=>Qk,BlockEditorProvider:()=>ov,BlockFormatControls:()=>Ps,BlockIcon:()=>Vu,BlockInspector:()=>VA,BlockList:()=>dw,BlockMover:()=>Hj,BlockNavigationDropdown:()=>DM,BlockPopover:()=>tf,BlockPreview:()=>kC,BlockSelectionClearer:()=>RS,BlockSettingsMenu:()=>gT,BlockSettingsMenuControls:()=>lT,BlockStyles:()=>VM,BlockTitle:()=>wj,BlockToolbar:()=>OT,BlockTools:()=>UT,BlockVerticalAlignmentControl:()=>vl,BlockVerticalAlignmentToolbar:()=>_l,ButtonBlockAppender:()=>uI,ButtonBlockerAppender:()=>cI,ColorPalette:()=>cP,ColorPaletteControl:()=>uP,ContrastChecker:()=>dh,CopyHandler:()=>HA,DefaultBlockAppender:()=>yS,FontSizePicker:()=>sj,HeadingLevelDropdown:()=>$M,HeightControl:()=>bm,InnerBlocks:()=>ew,Inserter:()=>lI,InspectorAdvancedControls:()=>Va,InspectorControls:()=>Fa,JustifyContentControl:()=>Sl,JustifyToolbar:()=>wl,LineHeightControl:()=>Oh,LinkControl:()=>uu,MediaPlaceholder:()=>mR,MediaReplaceFlow:()=>hu,MediaUpload:()=>Ya,MediaUploadCheck:()=>Xa,MultiSelectScrollIntoView:()=>WA,NavigableToolbar:()=>ET,ObserveTyping:()=>rw,PanelColorSettings:()=>fR,PlainText:()=>qR,RecursionProvider:()=>JA,RichText:()=>WR,RichTextShortcut:()=>QR,RichTextToolbarButton:()=>JR,SETTINGS_DEFAULTS:()=>P,SkipToSelectedBlock:()=>gA,Typewriter:()=>XA,URLInput:()=>ac,URLInputButton:()=>oA,URLPopover:()=>dR,Warning:()=>bv,WritingFlow:()=>Aw,__experimentalBlockAlignmentMatrixControl:()=>xj,__experimentalBlockFullHeightAligmentControl:()=>_j,__experimentalBlockPatternSetup:()=>oP,__experimentalBlockPatternsList:()=>$C,__experimentalBlockVariationPicker:()=>KM,__experimentalBlockVariationTransforms:()=>lP,__experimentalBorderRadiusControl:()=>rp,__experimentalColorGradientControl:()=>qp,__experimentalColorGradientSettingsDropdown:()=>kP,__experimentalDateFormatPicker:()=>hP,__experimentalDuotoneControl:()=>Ef,__experimentalFontAppearanceControl:()=>Lh,__experimentalFontFamilyControl:()=>Ah,__experimentalGetBorderClassesAndStyles:()=>UI,__experimentalGetColorClassesAndStyles:()=>WI,__experimentalGetElementClassName:()=>lN,__experimentalGetGapCSSValue:()=>ul,__experimentalGetGradientClass:()=>Op,__experimentalGetGradientObjectByGradientValue:()=>Vp,__experimentalGetShadowClassesAndStyles:()=>$I,__experimentalGetSpacingClassesAndStyles:()=>ZI,__experimentalImageEditor:()=>oR,__experimentalImageSizeControl:()=>lR,__experimentalImageURLInputUI:()=>uA,__experimentalInspectorPopoverHeader:()=>oN,__experimentalLetterSpacingControl:()=>zh,__experimentalLibrary:()=>$A,__experimentalLinkControl:()=>cu,__experimentalLinkControlSearchInput:()=>Gc,__experimentalLinkControlSearchItem:()=>Bc,__experimentalLinkControlSearchResults:()=>Nc,__experimentalListView:()=>NM,__experimentalPanelColorGradientSettings:()=>xP,__experimentalPreviewOptions:()=>dA,__experimentalPublishDateTimePicker:()=>iN,__experimentalRecursionProvider:()=>tN,__experimentalResponsiveBlockControl:()=>XR,__experimentalSpacingSizesControl:()=>mm,__experimentalTextDecorationControl:()=>tg,__experimentalTextTransformControl:()=>Xh,__experimentalUnitControl:()=>tA,__experimentalUseBlockOverlayActive:()=>Bj,__experimentalUseBlockPreview:()=>vC,__experimentalUseBorderProps:()=>GI,__experimentalUseColorProps:()=>KI,__experimentalUseCustomSides:()=>mf,__experimentalUseGradient:()=>Hp,__experimentalUseHasRecursion:()=>nN,__experimentalUseMultipleOriginColorsAndGradients:()=>Nd,__experimentalUseResizeCanvas:()=>pA,__experimentalWritingModeControl:()=>ig,__unstableBlockNameContext:()=>CT,__unstableBlockSettingsMenuFirstItem:()=>zE,__unstableBlockToolbarLastItem:()=>_E,__unstableEditorStyles:()=>cC,__unstableIframe:()=>Fw,__unstableInserterMenuExtension:()=>KB,__unstableRichTextInputEvent:()=>eA,__unstableUseBlockSelectionClearer:()=>PS,__unstableUseClipboardHandler:()=>FA,__unstableUseMouseMoveTypingReset:()=>nw,__unstableUseTypewriter:()=>YA,__unstableUseTypingObserver:()=>ow,createCustomColorsHOC:()=>rj,getColorClassName:()=>Ad,getColorObjectByAttributeValues:()=>Pd,getColorObjectByColorValue:()=>Rd,getComputedFluidTypographyValue:()=>zi,getCustomValueFromPreset:()=>il,getFontSize:()=>Tg,getFontSizeClass:()=>Pg,getFontSizeObjectByValue:()=>Mg,getGradientSlugByValue:()=>Fp,getGradientValueBySlug:()=>zp,getPxFromCssUnit:()=>aN,getSpacingPresetCssVar:()=>ll,getTypographyClassesAndStyles:()=>YI,isValueSpacingPreset:()=>rl,privateApis:()=>sD,store:()=>ji,storeConfig:()=>Ii,transformStyles:()=>lC,useBlockBindingsUtils:()=>dv,useBlockCommands:()=>ZT,useBlockDisplayInformation:()=>Xf,useBlockEditContext:()=>C,useBlockEditingMode:()=>ga,useBlockProps:()=>gS,useCachedTruthy:()=>XI,useHasRecursion:()=>eN,useInnerBlocksProps:()=>JS,useSetting:()=>Mi,useSettings:()=>Ti,useStyleOverride:()=>_s,withColorContext:()=>aP,withColors:()=>ij,withFontSizes:()=>cj});var e={};n.r(e),n.d(e,{getAllPatterns:()=>ze,getBlockRemovalRules:()=>Pe,getBlockSettings:()=>ye,getBlockStyles:()=>Ye,getBlockWithoutAttributes:()=>Ce,getClosestAllowedInsertionPoint:()=>et,getClosestAllowedInsertionPointForPattern:()=>tt,getContentLockingParent:()=>$e,getEnabledBlockParents:()=>Te,getEnabledClientIdsTree:()=>Ee,getExpandedBlock:()=>Ge,getInserterMediaCategories:()=>Le,getInsertionPoint:()=>nt,getLastFocus:()=>He,getLastInsertedBlocksClientIds:()=>we,getOpenedBlockSettingsMenu:()=>Re,getParentSectionBlock:()=>We,getPatternBySlug:()=>Oe,getRegisteredInserterMediaCategories:()=>Ne,getRemovalPromptData:()=>Me,getReusableBlocks:()=>Fe,getSectionRootClientId:()=>Xe,getStyleOverrides:()=>Ae,getTemporarilyEditingAsBlocks:()=>Ze,getTemporarilyEditingFocusModeToRevert:()=>qe,getZoomLevel:()=>Je,hasAllowedPatterns:()=>De,hasBlockSpotlight:()=>rt,isBlockHidden:()=>ot,isBlockInterfaceHidden:()=>Se,isBlockSubtreeDisabled:()=>Be,isContainerInsertableToInContentOnlyMode:()=>Ie,isDragging:()=>Ue,isSectionBlock:()=>Ke,isZoomOut:()=>Qe});var t={};n.r(t),n.d(t,{__experimentalGetActiveBlockIdByBlockNames:()=>To,__experimentalGetAllowedBlocks:()=>lo,__experimentalGetAllowedPatterns:()=>mo,__experimentalGetBlockListSettingsForBlocks:()=>xo,__experimentalGetDirectInsertBlock:()=>co,__experimentalGetGlobalBlocksByName:()=>zt,__experimentalGetLastBlockAttributeChanges:()=>Co,__experimentalGetParsedPattern:()=>uo,__experimentalGetPatternTransformItems:()=>ko,__experimentalGetPatternsByBlockTypes:()=>bo,__experimentalGetReusableBlockTitle:()=>So,__unstableGetBlockWithoutInnerBlocks:()=>Mt,__unstableGetClientIdWithClientIdsTree:()=>Rt,__unstableGetClientIdsTree:()=>At,__unstableGetContentLockingParent:()=>Vo,__unstableGetSelectedBlocksWithPartialSelection:()=>yn,__unstableGetTemporarilyEditingAsBlocks:()=>Fo,__unstableGetTemporarilyEditingFocusModeToRevert:()=>Ho,__unstableGetVisibleBlocks:()=>Ao,__unstableHasActiveBlockOverlayActive:()=>No,__unstableIsFullySelected:()=>bn,__unstableIsLastBlockChangeIgnored:()=>wo,__unstableIsSelectionCollapsed:()=>kn,__unstableIsSelectionMergeable:()=>_n,__unstableIsWithinBlockOverlay:()=>Lo,__unstableSelectionHasUnmergeableBlock:()=>vn,areInnerBlocksControlled:()=>Eo,canEditBlock:()=>Xn,canInsertBlockType:()=>$n,canInsertBlocks:()=>Wn,canLockBlockType:()=>Qn,canMoveBlock:()=>qn,canMoveBlocks:()=>Yn,canRemoveBlock:()=>Kn,canRemoveBlocks:()=>Zn,didAutomaticChange:()=>Io,getAdjacentBlockClientId:()=>nn,getAllowedBlocks:()=>so,getBlock:()=>Tt,getBlockAttributes:()=>Et,getBlockCount:()=>Ht,getBlockEditingMode:()=>Do,getBlockHierarchyRootClientId:()=>en,getBlockIndex:()=>Sn,getBlockInsertionPoint:()=>On,getBlockListSettings:()=>vo,getBlockMode:()=>Mn,getBlockName:()=>It,getBlockNamesByClientId:()=>Ft,getBlockOrder:()=>xn,getBlockParents:()=>Qt,getBlockParentsByBlockName:()=>Jt,getBlockRootClientId:()=>Xt,getBlockSelectionEnd:()=>Wt,getBlockSelectionStart:()=>$t,getBlockTransformItems:()=>ro,getBlocks:()=>Pt,getBlocksByClientId:()=>Vt,getBlocksByName:()=>Ot,getClientIdsOfDescendants:()=>Nt,getClientIdsWithDescendants:()=>Lt,getDirectInsertBlock:()=>ao,getDraggedBlockClientIds:()=>An,getFirstMultiSelectedBlockClientId:()=>un,getGlobalBlockCount:()=>Dt,getHoveredBlockClientId:()=>Ro,getInserterItems:()=>oo,getLastMultiSelectedBlockClientId:()=>dn,getLowestCommonAncestorWithSelectedBlock:()=>tn,getMultiSelectedBlockClientIds:()=>an,getMultiSelectedBlocks:()=>cn,getMultiSelectedBlocksEndClientId:()=>fn,getMultiSelectedBlocksStartClientId:()=>mn,getNextBlockClientId:()=>rn,getPatternsByBlockTypes:()=>fo,getPreviousBlockClientId:()=>on,getSelectedBlock:()=>Yt,getSelectedBlockClientId:()=>qt,getSelectedBlockClientIds:()=>ln,getSelectedBlockCount:()=>Kt,getSelectedBlocksInitialCaretPosition:()=>sn,getSelectionEnd:()=>Gt,getSelectionStart:()=>Ut,getSettings:()=>_o,getTemplate:()=>Fn,getTemplateLock:()=>Hn,hasBlockMovingClientId:()=>Bo,hasDraggedInnerBlock:()=>Bn,hasInserterItems:()=>io,hasMultiSelection:()=>jn,hasSelectedBlock:()=>Zt,hasSelectedInnerBlock:()=>Cn,isAncestorBeingDragged:()=>Ln,isAncestorMultiSelected:()=>gn,isBlockBeingDragged:()=>Nn,isBlockHighlighted:()=>jo,isBlockInsertionPointVisible:()=>zn,isBlockMultiSelected:()=>hn,isBlockSelected:()=>wn,isBlockValid:()=>jt,isBlockVisible:()=>Po,isBlockWithinSelection:()=>In,isCaretWithinFormattedText:()=>Dn,isDraggingBlocks:()=>Rn,isFirstMultiSelectedBlock:()=>pn,isGroupable:()=>zo,isLastBlockChangePersistent:()=>yo,isMultiSelecting:()=>En,isSelectionEnabled:()=>Tn,isTyping:()=>Pn,isUngroupable:()=>Oo,isValidTemplate:()=>Vn,wasBlockJustInserted:()=>Mo});var r={};n.r(r),n.d(r,{__experimentalUpdateSettings:()=>$o,clearBlockRemovalPrompt:()=>Xo,deleteStyleOverride:()=>tr,ensureDefaultBlock:()=>qo,expandBlock:()=>sr,hideBlockInterface:()=>Wo,modifyContentLockBlock:()=>ar,privateRemoveBlocks:()=>Zo,resetZoomLevel:()=>ur,setBlockRemovalRules:()=>Qo,setInsertionPoint:()=>lr,setLastFocus:()=>nr,setOpenedBlockSettingsMenu:()=>Jo,setStyleOverride:()=>er,setZoomLevel:()=>cr,showBlockInterface:()=>Ko,startDragging:()=>rr,stopDragging:()=>ir,stopEditingAsBlocks:()=>or,toggleBlockSpotlight:()=>dr});var i={};n.r(i),n.d(i,{__unstableDeleteSelection:()=>Wr,__unstableExpandSelection:()=>Zr,__unstableMarkAutomaticChange:()=>hi,__unstableMarkLastChangeAsPersistent:()=>di,__unstableMarkNextChangeAsNotPersistent:()=>pi,__unstableSaveReusableBlock:()=>ui,__unstableSetEditorMode:()=>gi,__unstableSetTemporarilyEditingAsBlocks:()=>Si,__unstableSplitSelection:()=>Kr,clearSelectedBlock:()=>Mr,duplicateBlocks:()=>fi,enterFormattedText:()=>ri,exitFormattedText:()=>ii,flashBlock:()=>_i,hideInsertionPoint:()=>Ur,hoverBlock:()=>Cr,insertAfterBlock:()=>ki,insertBeforeBlock:()=>bi,insertBlock:()=>Vr,insertBlocks:()=>Fr,insertDefaultBlock:()=>li,mergeBlocks:()=>qr,moveBlockToPosition:()=>zr,moveBlocksDown:()=>Lr,moveBlocksToPosition:()=>Or,moveBlocksUp:()=>Dr,multiSelect:()=>Tr,receiveBlocks:()=>yr,registerInserterMediaCategory:()=>wi,removeBlock:()=>Xr,removeBlocks:()=>Yr,replaceBlock:()=>Ar,replaceBlocks:()=>Rr,replaceInnerBlocks:()=>Qr,resetBlocks:()=>kr,resetSelection:()=>_r,selectBlock:()=>wr,selectNextBlock:()=>Ir,selectPreviousBlock:()=>Br,selectionChange:()=>si,setBlockEditingMode:()=>Ci,setBlockMovingClientId:()=>mi,setBlockVisibility:()=>xi,setHasControlledInnerBlocks:()=>yi,setTemplateValidity:()=>Gr,showInsertionPoint:()=>Hr,startDraggingBlocks:()=>ni,startMultiSelect:()=>jr,startTyping:()=>ei,stopDraggingBlocks:()=>oi,stopMultiSelect:()=>Er,stopTyping:()=>ti,synchronizeTemplate:()=>$r,toggleBlockHighlight:()=>vi,toggleBlockMode:()=>Jr,toggleSelection:()=>Pr,unsetBlockEditingMode:()=>Bi,updateBlock:()=>Sr,updateBlockAttributes:()=>xr,updateBlockListSettings:()=>ai,updateSettings:()=>ci,validateBlocksToTemplate:()=>vr});var s={};n.r(s),n.d(s,{getItems:()=>ok,getSettings:()=>lk,isUploading:()=>rk,isUploadingById:()=>sk,isUploadingByUrl:()=>ik});var l={};n.r(l),n.d(l,{getAllItems:()=>ak,getBlobUrls:()=>gk,getItem:()=>ck,getPausedUploadForPost:()=>pk,isBatchUploaded:()=>uk,isPaused:()=>hk,isUploadingToPost:()=>dk});var a={};n.r(a),n.d(a,{addItems:()=>Bk,cancelItem:()=>Ik});var c={};n.r(c),n.d(c,{addItem:()=>Tk,finishOperation:()=>Nk,pauseQueue:()=>Pk,prepareItem:()=>Lk,processItem:()=>Mk,removeItem:()=>Ak,resumeQueue:()=>Rk,revokeBlobUrls:()=>Ok,updateSettings:()=>zk,uploadItem:()=>Dk});var u={};n.r(u),n.d(u,{AdvancedPanel:()=>dN,BackgroundPanel:()=>Tu,BorderPanel:()=>Sp,ColorPanel:()=>uh,DimensionsPanel:()=>zm,FiltersPanel:()=>Uf,GlobalStylesContext:()=>is,ImageSettingsPanel:()=>uN,TypographyPanel:()=>yg,areGlobalStyleConfigsEqual:()=>os,getBlockCSSSelector:()=>Rf,getBlockSelectors:()=>Sb,getGlobalStylesChanges:()=>vN,getLayoutStyles:()=>mb,toStyles:()=>yb,useGlobalSetting:()=>cs,useGlobalStyle:()=>us,useGlobalStylesOutput:()=>Bb,useGlobalStylesOutputWithConfig:()=>Cb,useGlobalStylesReset:()=>as,useHasBackgroundPanel:()=>Iu,useHasBorderPanel:()=>gp,useHasBorderPanelControls:()=>mp,useHasColorPanel:()=>Yp,useHasDimensionsPanel:()=>Bm,useHasFiltersPanel:()=>Lf,useHasImageSettingsPanel:()=>cN,useHasTypographyPanel:()=>ag,useSettingsForBlockElement:()=>ds});const d=window.ReactJSXRuntime,p=window.wp.blocks,h=window.wp.element,g=window.wp.data,m=window.wp.compose,f=window.wp.hooks,b=Symbol("mayDisplayControls"),k=Symbol("mayDisplayParentControls"),v=Symbol("blockEditingMode"),_=Symbol("blockBindings"),y=Symbol("isPreviewMode"),x={name:"",isSelected:!1},S=(0,h.createContext)(x);S.displayName="BlockEditContext";const{Provider:w}=S;function C(){return(0,h.useContext)(S)}const B=window.wp.deprecated;var I=n.n(B),j=n(7734),E=n.n(j);const T=window.wp.i18n,M={insertUsage:{}},P={alignWide:!1,supportsLayout:!0,colors:[{name:(0,T.__)("Black"),slug:"black",color:"#000000"},{name:(0,T.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,T.__)("White"),slug:"white",color:"#ffffff"},{name:(0,T.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,T.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,T.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,T.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,T.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,T.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,T.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,T.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,T.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,T._x)("Small","font size name"),size:13,slug:"small"},{name:(0,T._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,T._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,T._x)("Large","font size name"),size:36,slug:"large"},{name:(0,T._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,T.__)("Thumbnail")},{slug:"medium",name:(0,T.__)("Medium")},{slug:"large",name:(0,T.__)("Large")},{slug:"full",name:(0,T.__)("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:[],isPreviewMode:!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,T.__)("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,T.__)("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,T.__)("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,T.__)("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,T.__)("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,T.__)("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,T.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,T.__)("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,T.__)("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,T.__)("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,T.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,T.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function R(e,t,n){return[...e.slice(0,n),...Array.isArray(t)?t:[t],...e.slice(n)]}function A(e,t,n,o=1){const r=[...e];return r.splice(t,o),R(r,e.slice(t,t+o),n)}const N=Symbol("globalStylesDataKey"),L=Symbol("globalStylesLinks"),D=Symbol("selectBlockPatternsKey"),O=Symbol("reusableBlocksSelect"),z=Symbol("sectionRootClientIdKey"),V=Symbol("mediaEditKey"),F=Symbol("essentialFormat"),H=window.wp.privateApis,{lock:U,unlock:G}=(0,H.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/block-editor"),{isContentBlock:$}=G(p.privateApis),W=e=>e;function K(e,t=""){const n=new Map,o=[];return n.set(t,o),e.forEach((e=>{const{clientId:t,innerBlocks:r}=e;o.push(t),K(r,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function Z(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 q(e,t=W){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 Y(e){return q(e,(e=>{const{attributes:t,...n}=e;return n}))}function X(e){return q(e,(e=>e.attributes))}function Q(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&E()(e.clientIds,t.clientIds)&&function(e,t){return E()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function J(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 ee(e,t,n=!1){const o=e.tree,r=new Set([]),i=new Set;for(const o of t){let t=n?o:e.parents.get(o);do{if(e.controlledInnerBlocks[t]){i.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 i)o.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>o.get(e)))})}const te=(0,m.pipe)(g.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:i}=t.byClientId.get(r);"core/block"===i&&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),J(o,n.blocks),ee(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)}),ee(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)})})),ee(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.forEach((t=>{o.tree.delete(t),e[t]||o.tree.delete("controlled||"+t)})),J(o,n.blocks),ee(o,n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds){const n=t.parents.get(e);void 0===n||""!==n&&!o.byClientId.get(n)||r.push(n)}ee(o,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds){const n=t.parents.get(r);void 0===n||""!==n&&!o.byClientId.get(n)||e.push(n)}o.tree=new Map(o.tree),n.removedClientIds.forEach((e=>{o.tree.delete(e),o.tree.delete("controlled||"+e)})),ee(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),ee(o,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=new Map(o.tree),ee(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})})),ee(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 i=r;if(n.blocks.length){i=e(i,{...n,type:"INSERT_BLOCKS",index:0});const r=new Map(i.order);Object.keys(o).forEach((e=>{t.order.get(e)&&r.set(e,t.order.get(e))})),i.order=r,i.tree=new Map(i.tree),Object.keys(o).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&i.tree.set(n,t.tree.get(n))}))}return i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(Y(n.blocks)),attributes:new Map(X(n.blocks)),order:K(n.blocks),parents:new Map(Z(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(t?.tree),J(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,i)=>{let s,l=e(r,i);if("SET_EXPLICIT_PERSISTENT"===i.type&&(n=i.isPersistentChange,s=r.isPersistentChange??!0),void 0!==n)return s=n,s===l.isPersistentChange?l:{...l,isPersistentChange:s};const a="MARK_LAST_CHANGE_AS_PERSISTENT"===i.type||o;return r!==l||a?(l={...l,isPersistentChange:a?!o:!Q(i,t)},t=i,o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,l):(o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,s=r?.isPersistentChange??!0,r.isPersistentChange===s?r:{...l,isPersistentChange:s})}}),(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 Y(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)})),Y(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 X(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 n=!1;const o=new Map(e);for(const r of t.clientIds){const i=Object.entries(t.options?.uniqueByBlock?t.attributes[r]:t.attributes??{});if(0===i.length)continue;let s=!1;const l=e.get(r),a={};i.forEach((([e,t])=>{l[e]!==t&&(s=!0,a[e]=t)})),n=n||s,s&&o.set(r,{...l,...a})}return n?o: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)})),X(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":{const n=K(t.blocks),o=new Map(e);return n.forEach(((e,t)=>{""!==t&&o.set(t,e)})),o.set("",(e.get("")??[]).concat(n[""])),o}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e.get(n)||[],r=K(t.blocks,n),{index:i=o.length}=t,s=new Map(e);return r.forEach(((e,t)=>{s.set(t,e)})),s.set(n,R(o,r.get(n),i)),s}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:r}=t,{index:i=e.get(o).length}=t;if(n===o){const t=e.get(o).indexOf(r[0]),n=new Map(e);return n.set(o,A(e.get(o),t,i,r.length)),n}const s=new Map(e);return s.set(n,e.get(n)?.filter((e=>!r.includes(e)))??[]),s.set(o,R(e.get(o),r,i)),s}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=e.get(o);if(!i.length||r===i[0])return e;const s=i.indexOf(r),l=new Map(e);return l.set(o,A(i,s,s-1,n.length)),l}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=n[n.length-1],s=e.get(o);if(!s.length||i===s[s.length-1])return e;const l=s.indexOf(r),a=new Map(e);return a.set(o,A(s,l,l+1,n.length)),a}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=K(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 i=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...o.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);r.set(t,i)})),r}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,o)=>{const r=e?.filter((e=>!t.removedClientIds.includes(e)))??[];r.length!==e.length&&n.set(o,r)})),n}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return Z(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return Z(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)})),Z(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 ne(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 oe=(0,g.combineReducers)({blocks:te,isDragging:function(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e},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:i}=t;return r===e.selectionStart?.clientId&&i===e.selectionEnd?.clientId?e:{selectionStart:{clientId:r},selectionEnd:{clientId:i}};case"RESET_BLOCKS":const s=e?.selectionStart?.clientId,l=e?.selectionEnd?.clientId;if(!s&&!l)return e;if(!t.blocks.some((e=>e.clientId===s)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===l)))return{...e,selectionEnd:e.selectionStart}}const n=ne(e.selectionStart,t),o=ne(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 n="string"==typeof t.clientId?{[t.clientId]:t.settings}:t.clientId;for(const t in n)n[t]?E()(e[t],n[t])&&delete n[t]:e[t]||delete n[t];if(0===Object.keys(n).length)return e;const o={...e,...n};for(const e in n)n[e]||delete o[e];return o}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e},insertionCue:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s}=t,l={rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s};return E()(e,l)?e:l}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=P,t){if("UPDATE_SETTINGS"===t.type){const n=t.reset?{...P,...t.settings}:{...e,...t.settings};return Object.defineProperty(n,"__unstableIsPreviewMode",{get(){return I()("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),n}return e},preferences:function(e=M,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":{const n=t.blocks.reduce(((e,n)=>{const{attributes:o,name:r}=n;let i=r;const s=(0,g.select)(p.store).getActiveBlockVariation(r,o);return s?.name&&(i+="/"+s.name),"core/block"===r&&(i+="/"+o.ref),{...e,[i]:{time:t.time,count:e[i]?e[i].count+1:1}}}),e.insertUsage);return{...e,insertUsage:n}}}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.options?.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return e},lastFocus:function(e=!1,t){return"LAST_FOCUS"===t.type?t.lastFocus:e},expandedBlock:function(e=null,t){switch(t.type){case"SET_BLOCK_EXPANDED_IN_LIST_VIEW":return t.clientId;case"SELECT_BLOCK":if(t.clientId!==e)return null}return 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 e.get(t.clientId)===t.mode?e:new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{if(!e.has(t.clientId))return e;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,message:o}=t;return{clientIds:e,selectPrevious:n,message: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){return"SET_OPENED_BLOCK_SETTINGS_MENU"===t.type?t?.clientId??null:e},registeredInserterMediaCategories:function(e=[],t){return"REGISTER_INSERTER_MEDIA_CATEGORY"===t.type?[...e,t.category]:e},zoomLevel:function(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e},hasBlockSpotlight:function(e,t){switch(t.type){case"TOGGLE_BLOCK_SPOTLIGHT":const{clientId:n,hasBlockSpotlight:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":return t.clientId!==e?null:e;case"SELECTION_CHANGE":return t.start?.clientId!==e||t.end?.clientId!==e?null:e;case"CLEAR_SELECTED_BLOCK":return null}return e}});function re(e,t){if(""===t){const n=e.blocks.tree.get(t);if(!n)return;return{clientId:"",...n}}if(!e.blocks.controlledInnerBlocks[t])return e.blocks.tree.get(t);const n=e.blocks.tree.get(`controlled||${t}`);return{...e.blocks.tree.get(t),innerBlocks:n?.innerBlocks}}function ie(e,t,n){const o=re(e,t);if(o&&(n(o),o?.innerBlocks?.length))for(const t of o?.innerBlocks)ie(e,t.clientId,n)}function se(e,t,n){if(!n.length)return;let o=e.blocks.parents.get(t);for(;void 0!==o;){if(n.includes(o))return o;o=e.blocks.parents.get(o)}}function le(e,t=""){const n=e?.zoomLevel<100||"auto-scaled"===e?.zoomLevel,o=new Map,r=e.settings?.[z],i=e.blocks.order.get(r),s=Array.from(e.blockEditingModes).some((([,e])=>"disabled"===e)),l=[],a=[];Object.keys(e.blocks.controlledInnerBlocks).forEach((t=>{const n=e.blocks.byClientId?.get(t);"core/template-part"===n?.name&&l.push(t),"core/block"===n?.name&&a.push(t)}));const c=[...Object.keys(e.blockListSettings).filter((t=>"contentOnly"===e.blockListSettings[t]?.templateLock)),...window?.__experimentalContentOnlyPatternInsertion?Array.from(e.blocks.attributes.keys()).filter((t=>e.blocks.attributes.get(t)?.metadata?.patternName)):[],...window?.__experimentalContentOnlyPatternInsertion?l:[]];return ie(e,t,(t=>{const{clientId:l,name:u}=t;if(!e.blockEditingModes.has(l)){if(s){let t,n=e.blocks.parents.get(l);for(;void 0!==n&&(e.blockEditingModes.has(n)&&(t=e.blockEditingModes.get(n)),!t);)n=e.blocks.parents.get(n);if("disabled"===t)return void o.set(l,"disabled")}if(n)return l===r||i?.length&&i.includes(l)?void o.set(l,"contentOnly"):void o.set(l,"disabled");if(a.length){if(a.includes(l))return se(e,l,a)?void o.set(l,"disabled"):void 0;const n=se(e,l,a);if(n){if(se(e,n,a))return void o.set(l,"disabled");if(function(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}(t))return void o.set(l,"contentOnly");o.set(l,"disabled")}}if(c.length){!!se(e,l,c)&&($(u)?o.set(l,"contentOnly"):o.set(l,"disabled"))}}})),o}function ae({prevState:e,nextState:t,addedBlocks:n,removedClientIds:o}){const r=e.derivedBlockEditingModes;let i;return o?.forEach((t=>{ie(e,t,(e=>{r.has(e.clientId)&&(i||(i=new Map(r)),i.delete(e.clientId))}))})),n?.forEach((e=>{const n=le(t,e.clientId);n.size&&(i=i?new Map([...i?.size?i:[],...n]):new Map([...r?.size?r:[],...n]))})),i}var ce=(0,m.pipe)((function(e){return(t,n)=>{const o=e(t,n);if("SET_EDITOR_MODE"!==n.type&&o===t)return t;switch(n.type){case"REMOVE_BLOCKS":{const e=ae({prevState:t,nextState:o,removedClientIds:n.clientIds});if(e)return{...o,derivedBlockEditingModes:e??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=ae({prevState:t,nextState:o,addedBlocks:n.blocks});if(e)return{...o,derivedBlockEditingModes:e??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_ATTRIBUTES":{const e=[],r=[];for(const i of n?.clientIds){const s=n.options?.uniqueByBlock?n.attributes[i]:n.attributes;if(!s)break;s.metadata?.patternName&&!t.blocks.attributes.get(i)?.metadata?.patternName?e.push(o.blocks.tree.get(i)):s.metadata&&!s.metadata?.patternName&&t.blocks.attributes.get(i)?.metadata?.patternName&&r.push(i)}if(!e?.length&&!r?.length)break;const i=ae({prevState:t,nextState:o,addedBlocks:e,removedClientIds:r});if(i)return{...o,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_LIST_SETTINGS":{const e=[],r=[],i="string"==typeof n.clientId?{[n.clientId]:n.settings}:n.clientId;for(const n in i){const i="contentOnly"!==t.blockListSettings[n]?.templateLock&&"contentOnly"===o.blockListSettings[n]?.templateLock,s="contentOnly"===t.blockListSettings[n]?.templateLock&&"contentOnly"!==o.blockListSettings[n]?.templateLock;i?e.push(o.blocks.tree.get(n)):s&&r.push(n)}if(!e.length&&!r.length)break;const s=ae({prevState:t,nextState:o,addedBlocks:e,removedClientIds:r});if(s)return{...o,derivedBlockEditingModes:s??t.derivedBlockEditingModes};break}case"SET_BLOCK_EDITING_MODE":case"UNSET_BLOCK_EDITING_MODE":case"SET_HAS_CONTROLLED_INNER_BLOCKS":{const e=re(o,n.clientId);if(!e)break;const r=ae({prevState:t,nextState:o,removedClientIds:[n.clientId],addedBlocks:[e]});if(r)return{...o,derivedBlockEditingModes:r??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{const e=ae({prevState:t,nextState:o,addedBlocks:n.blocks,removedClientIds:n.clientIds});if(e)return{...o,derivedBlockEditingModes:e??t.derivedBlockEditingModes};break}case"REPLACE_INNER_BLOCKS":{const e=t.blocks.order.get(n.rootClientId),r=ae({prevState:t,nextState:o,addedBlocks:n.blocks,removedClientIds:e});if(r)return{...o,derivedBlockEditingModes:r??t.derivedBlockEditingModes};break}case"MOVE_BLOCKS_TO_POSITION":{const e=n.clientIds.map((e=>o.blocks.byClientId.get(e))),r=ae({prevState:t,nextState:o,addedBlocks:e,removedClientIds:n.clientIds});if(r)return{...o,derivedBlockEditingModes:r??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":if(t?.settings?.[z]!==o?.settings?.[z])return{...o,derivedBlockEditingModes:le(o)};break;case"RESET_BLOCKS":case"SET_EDITOR_MODE":case"RESET_ZOOM_LEVEL":case"SET_ZOOM_LEVEL":return{...o,derivedBlockEditingModes:le(o)}}return o.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,o}}),(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}}))(oe);const ue=window.wp.primitives;var de=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});const pe=window.wp.richText,he=window.wp.blockSerializationDefaultParser,ge="core/block-editor";function me(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}const fe=(e,t,n)=>{const o=Array.isArray(t)?t:t.split(".");let r=e;return o.forEach((e=>{r=r?.[e]})),r??n};const be=["color","border","dimensions","typography","spacing"],ke={"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},ve={"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"},_e=e=>ve[e]||e;function ye(e,t,...n){const o=It(e,t),r=[];if(t){let n=t;do{const t=It(e,n);(0,p.hasBlockSupport)(t,"__experimentalSettings",!1)&&r.push(n)}while(n=e.blocks.parents.get(n))}return n.map((n=>{if(be.includes(n))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let i=(0,f.applyFilters)("blockEditor.useSetting.before",void 0,n,t,o);if(void 0!==i)return i;const s=_e(n);for(const t of r){const n=Et(e,t);if(i=fe(n.settings?.blocks?.[o],s)??fe(n.settings,s),void 0!==i)break}const l=_o(e);if(void 0===i&&o&&(i=fe(l.__experimentalFeatures?.blocks?.[o],s)),void 0===i&&(i=fe(l.__experimentalFeatures,s)),void 0!==i)return p.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[s]?i.custom??i.theme??i.default:i;const a=ke[s]?.(l);return void 0!==a?a:"typography.dropCap"===s||void 0}))}const{isContentBlock:xe}=G(p.privateApis);function Se(e){return e.isBlockInterfaceHidden}function we(e){return e?.lastBlockInserted?.clientIds}function Ce(e,t){return e.blocks.byClientId.get(t)}const Be=(e,t)=>{const n=t=>"disabled"===Do(e,t)&&xn(e,t).every(n);return xn(e,t).every(n)};function Ie(e,t,n){const o=xe(t),r=It(e,n),i=xe(r);return Xe(e)===n||i&&o}function je(e,t){const n=xn(e,t),o=[];for(const t of n){const n=je(e,t);"disabled"!==Do(e,t)?o.push({clientId:t,innerBlocks:n}):o.push(...n)}return o}const Ee=(0,g.createRegistrySelector)((()=>(0,g.createSelector)(je,(e=>[e.blocks.order,e.derivedBlockEditingModes,e.blockEditingModes])))),Te=(0,g.createSelector)(((e,t,n=!1)=>Qt(e,t,n).filter((t=>"disabled"!==Do(e,t)))),(e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]));function Me(e){return e.removalPromptData}function Pe(e){return e.blockRemovalRules}function Re(e){return e.openedBlockSettingsMenu}const Ae=(0,g.createSelector)((e=>{const t=Lt(e).reduce(((e,t,n)=>(e[t]=n,e)),{});return[...e.styleOverrides].sort(((e,n)=>{const[,{clientId:o}]=e,[,{clientId:r}]=n;return(t[o]??-1)-(t[r]??-1)}))}),(e=>[e.blocks.order,e.styleOverrides]));function Ne(e){return e.registeredInserterMediaCategories}const Le=(0,g.createSelector)((e=>{const{settings:{inserterMediaCategories:t,allowedMimeTypes:n,enableOpenverseMediaCategory:o},registeredInserterMediaCategories:r}=e;if(!t&&!r.length||!n)return;const i=t?.map((({name:e})=>e))||[];return[...t||[],...(r||[]).filter((({name:e})=>!i.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])),De=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n=null)=>{const{getAllPatterns:o}=G(e(ge)),r=o(),{allowedBlockTypes:i}=_o(t);return r.some((e=>{const{inserter:o=!0}=e;if(!o)return!1;const r=bt(e);return vt(r,i)&&r.every((({name:e})=>$n(t,e,n)))}))}),((t,n)=>[..._t(e)(t),...yt(e)(t,n)])))),Oe=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n)=>{if(n?.startsWith("core/block/")){const o=parseInt(n.slice(11),10),r=G(e(ge)).getReusableBlocks().find((({id:e})=>e===o));return r?mt(r,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[D]?.(e)??[]].find((({name:e})=>e===n))}),((t,n)=>n?.startsWith("core/block/")?[G(e(ge)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[D]?.(e)])))),ze=(0,g.createRegistrySelector)((e=>(0,g.createSelector)((t=>[...G(e(ge)).getReusableBlocks().map((e=>mt(e,t.settings.__experimentalUserPatternCategories))),...t.settings.__experimentalBlockPatterns??[],...t.settings[D]?.(e)??[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))),_t(e)))),Ve=[],Fe=(0,g.createRegistrySelector)((e=>t=>{const n=t.settings[O];return(n?n(e):t.settings.__experimentalReusableBlocks)??Ve}));function He(e){return e.lastFocus}function Ue(e){return e.isDragging}function Ge(e){return e.expandedBlock}const $e=(e,t)=>{let n,o=t;for(;!n&&(o=e.blocks.parents.get(o));)"contentOnly"===Hn(e,o)&&(n=o);return n},We=(e,t)=>{let n,o=t;for(;!n&&(o=e.blocks.parents.get(o));)Ke(e,o)&&(n=o);return n};function Ke(e,t){const n=It(e,t);if("core/block"===n||"contentOnly"===Hn(e,t))return!0;const o=Et(e,t),r="core/template-part"===n;return!(!o?.metadata?.patternName&&!r||!window?.__experimentalContentOnlyPatternInsertion)}function Ze(e){return e.temporarilyEditingAsBlocks}function qe(e){return e.temporarilyEditingFocusModeRevert}const Ye=(0,g.createSelector)(((e,t)=>t.reduce(((t,n)=>(t[n]=e.blocks.attributes.get(n)?.style,t)),{})),((e,t)=>[...t.map((t=>e.blocks.attributes.get(t)?.style))]));function Xe(e){return e.settings?.[z]}function Qe(e){return"auto-scaled"===e.zoomLevel||e.zoomLevel<100}function Je(e){return e.zoomLevel}function et(e,t,n=""){const o=Array.isArray(t)?t:[t],r=t=>o.every((n=>$n(e,n,t)));if(!n){if(r(n))return n;const t=Xe(e);return t&&r(t)?t:null}let i=n;for(;null!==i&&!r(i);){i=Xt(e,i)}return i}function tt(e,t,n){const{allowedBlockTypes:o}=_o(e);if(!vt(bt(t),o))return null;return et(e,bt(t).map((({blockName:e})=>e)),n)}function nt(e){return e.insertionPoint}const ot=(e,t)=>{const n=It(e,t);if(!(0,p.hasBlockSupport)(e,n,"visibility",!0))return!1;const o=e.blocks.attributes.get(t);return!1===o?.metadata?.blockVisibility};function rt(e){return!!e.hasBlockSpotlight}const it={user:"user",theme:"theme",directory:"directory"},st="fully",lt="unsynced",at={name:"allPatterns",label:(0,T._x)("All","patterns")},ct={name:"myPatterns",label:(0,T.__)("My patterns")},ut={name:"core/starter-content",label:(0,T.__)("Starter content")};function dt(e,t,n){const o=e.name.startsWith("core/block"),r="core"===e.source||e.source?.startsWith("pattern-directory");return!(t!==it.theme||!o&&!r)||(!(t!==it.directory||!o&&r)||(t===it.user&&e.type!==it.user||(n===st&&""!==e.syncStatus||!(n!==lt||"unsynced"===e.syncStatus||!o))))}const pt=Symbol("isFiltered"),ht=new WeakMap,gt=new WeakMap;function mt(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:it.user,title:e.title?.raw,categories:e.wp_pattern_category?.map((e=>{const n=t.find((({id:t})=>t===e));return n?n.slug:e})),content:e.content?.raw,syncStatus:e.wp_pattern_sync_status}}function ft(e){let t=ht.get(e);return t||(t=function(e){const t=(0,p.parse)(e.content,{__unstableSkipMigrationLogs:!0});return 1===t.length&&(t[0].attributes={...t[0].attributes,metadata:{...t[0].attributes.metadata||{},categories:e.categories,patternName:e.name,name:t[0].attributes.metadata?.name||e.title}}),{...e,blocks:t}}(e),ht.set(e,t)),t}function bt(e){let t=gt.get(e);return t||(t=(0,he.parse)(e.content),t=t.filter((e=>null!==e.blockName)),gt.set(e,t)),t}const kt=(e,t,n=null)=>"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,vt=(e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){const e=n.shift();if(!kt(t,e.name||e.blockName,!0))return!1;e.innerBlocks?.forEach((e=>{n.push(e)}))}return!0},_t=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[D]?.(e),t.blockPatterns,G(e(ge)).getReusableBlocks()],yt=()=>(e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,Do(e,t),Xe(e),Ke(e,t)];function xt(e,t,n="asc"){return e.concat().sort(((e,t,n)=>(o,r)=>{let i,s;if("function"==typeof e?(i=e(o),s=e(r)):(i=o[e],s=r[e]),i>s)return"asc"===n?1:-1;if(s>i)return"asc"===n?-1:1;const l=t.findIndex((e=>e===o)),a=t.findIndex((e=>e===r));return l>a?1:a>l?-1:0})(t,e,n))}const{isContentBlock:St}=G(p.privateApis),wt=[],Ct=new Set,Bt={[pt]:!0};function It(e,t){const n=e.blocks.byClientId.get(t),o="core/social-link";if("web"!==h.Platform.OS&&n?.name===o){const n=e.blocks.attributes.get(t),{service:r}=n??{};return r?`${o}-${r}`:o}return n?n.name:null}function jt(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function Et(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function Tt(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const Mt=(0,g.createSelector)(((e,t)=>{const n=e.blocks.byClientId.get(t);return n?{...n,attributes:Et(e,t)}:null}),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function Pt(e,t){const n=t&&Eo(e,t)?"controlled||"+t:t||"";return e.blocks.tree.get(n)?.innerBlocks||wt}const Rt=(0,g.createSelector)(((e,t)=>(I()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:At(e,t)})),(e=>[e.blocks.order])),At=(0,g.createSelector)(((e,t="")=>(I()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),xn(e,t).map((t=>Rt(e,t))))),(e=>[e.blocks.order])),Nt=(0,g.createSelector)(((e,t)=>{t=Array.isArray(t)?[...t]:[t];const n=[];for(const o of t){const t=e.blocks.order.get(o);t&&n.push(...t)}let o=0;for(;o[e.blocks.order])),Lt=e=>Nt(e,""),Dt=(0,g.createSelector)(((e,t)=>{const n=Lt(e);if(!t)return n.length;let o=0;for(const r of n){e.blocks.byClientId.get(r).name===t&&o++}return o}),(e=>[e.blocks.order,e.blocks.byClientId])),Ot=(0,g.createSelector)(((e,t)=>{if(!t)return wt;const n=Array.isArray(t)?t:[t],o=Lt(e).filter((t=>{const o=e.blocks.byClientId.get(t);return n.includes(o.name)}));return o.length>0?o:wt}),(e=>[e.blocks.order,e.blocks.byClientId]));function zt(e,t){return I()("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),Ot(e,t)}const Vt=(0,g.createSelector)(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>Tt(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),Ft=(0,g.createSelector)(((e,t)=>Vt(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>Vt(e,t)));function Ht(e,t){return xn(e,t).length}function Ut(e){return e.selection.selectionStart}function Gt(e){return e.selection.selectionEnd}function $t(e){return e.selection.selectionStart.clientId}function Wt(e){return e.selection.selectionEnd.clientId}function Kt(e){const t=an(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function Zt(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function qt(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function Yt(e){const t=qt(e);return t?Tt(e,t):null}function Xt(e,t){return e.blocks.parents.get(t)??null}const Qt=(0,g.createSelector)(((e,t,n=!1)=>{const o=[];let r=t;for(;r=e.blocks.parents.get(r);)o.push(r);return o.length?n?o:o.reverse():wt}),(e=>[e.blocks.parents])),Jt=(0,g.createSelector)(((e,t,n,o=!1)=>{const r=Qt(e,t,o),i=Array.isArray(n)?e=>n.includes(e):e=>n===e;return r.filter((t=>i(It(e,t))))}),(e=>[e.blocks.parents]));function en(e,t){let n,o=t;do{n=o,o=e.blocks.parents.get(o)}while(o);return n}function tn(e,t){const n=qt(e),o=[...Qt(e,t),t],r=[...Qt(e,n),n];let i;const s=Math.min(o.length,r.length);for(let e=0;e{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return wt;if(t.clientId===n.clientId)return[t.clientId];const o=Xt(e,t.clientId);if(null===o)return wt;const r=xn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId);return i>s?r.slice(s,i+1):r.slice(i,s+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function an(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?wt:ln(e)}const cn=(0,g.createSelector)((e=>{const t=an(e);return t.length?t.map((t=>Tt(e,t))):wt}),(e=>[...ln.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function un(e){return an(e)[0]||null}function dn(e){const t=an(e);return t[t.length-1]||null}function pn(e,t){return un(e)===t}function hn(e,t){return-1!==an(e).indexOf(t)}const gn=(0,g.createSelector)(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=Xt(e,n),o=hn(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function mn(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function fn(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function bn(e){const t=Ut(e),n=Gt(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function kn(e){const t=Ut(e),n=Gt(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function vn(e){return ln(e).some((t=>{const n=It(e,t);return!(0,p.getBlockType)(n).merge}))}function _n(e,t){const n=Ut(e),o=Gt(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=Xt(e,n.clientId);if(r!==Xt(e,o.clientId))return!1;const i=xn(e,r);let s,l;i.indexOf(n.clientId)>i.indexOf(o.clientId)?(s=o,l=n):(s=n,l=o);const a=t?l.clientId:s.clientId,c=t?s.clientId:l.clientId,u=It(e,a);if(!(0,p.getBlockType)(u).merge)return!1;const d=Tt(e,c);if(d.name===u)return!0;const h=(0,p.switchToBlockType)(d,u);return h&&h.length}const yn=e=>{const t=Ut(e),n=Gt(e);if(t.clientId===n.clientId)return wt;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return wt;const o=Xt(e,t.clientId);if(o!==Xt(e,n.clientId))return wt;const r=xn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId),[l,a]=i>s?[n,t]:[t,n],c=Tt(e,l.clientId),u=Tt(e,a.clientId),d=c.attributes[l.attributeKey],p=u.attributes[a.attributeKey];let h=(0,pe.create)({html:d}),g=(0,pe.create)({html:p});return h=(0,pe.remove)(h,0,l.offset),g=(0,pe.remove)(g,a.offset,g.text.length),[{...c,attributes:{...c.attributes,[l.attributeKey]:(0,pe.toHTMLString)({value:h})}},{...u,attributes:{...u.attributes,[a.attributeKey]:(0,pe.toHTMLString)({value:g})}}]};function xn(e,t){return e.blocks.order.get(t||"")||wt}function Sn(e,t){return xn(e,Xt(e,t)).indexOf(t)}function wn(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function Cn(e,t,n=!1){const o=ln(e);return!!o.length&&(n?o.some((n=>Qt(e,n,!0).includes(t))):o.some((n=>Xt(e,n)===t)))}function Bn(e,t,n=!1){return xn(e,t).some((t=>Nn(e,t)||n&&Bn(e,t,n)))}function In(e,t){if(!t)return!1;const n=an(e),o=n.indexOf(t);return o>-1&&oNn(e,t)))}function Dn(){return I()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const On=(0,g.createSelector)((e=>{let t,n;const{insertionCue:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:i}=r;return i?(t=Xt(e,i)||void 0,n=Sn(e,r.clientId)+1):n=xn(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function zn(e){return null!==e.insertionCue}function Vn(e){return e.template.isValid}function Fn(e){return e.settings.template}function Hn(e,t){return t?vo(e,t)?.templateLock??!1:e.settings.templateLock??!1}const Un=(e,t,n=null)=>{let o,r;if(t&&"object"==typeof t?(o=t,r=t.name):(o=(0,p.getBlockType)(t),r=t),!o)return!1;const{allowedBlockTypes:i}=_o(e);if(!kt(i,r,!0))return!1;const s=(Array.isArray(o.parent)?o.parent:[]).concat(Array.isArray(o.ancestor)?o.ancestor:[]);if(s.length>0){if(s.includes("core/post-content"))return!0;let t=n,o=!1;do{if(s.includes(It(e,t))){o=!0;break}t=e.blocks.parents.get(t)}while(t);return o}return!0},Gn=(e,t,n=null)=>{if(!Un(e,t,n))return!1;let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=(0,p.getBlockType)(t),Hn(e,n))return!1;const r=Do(e,n??"");if("disabled"===r)return!1;const i=vo(e,n);if(n&&void 0===i)return!1;const s=St(t),l=!!Ke(e,n),a=!!We(e,n);if((l||a)&&!s)return!1;if((l||"contentOnly"===r)&&!Ie(e,t,n))return!1;const c=It(e,n),u=(0,p.getBlockType)(c),d=u?.allowedBlocks;let h=kt(d,t);if(!1!==h){const e=i?.allowedBlocks,n=kt(e,t);null!==n&&(h=n)}const g=o.parent,m=kt(g,c);let b=!0;const k=o.ancestor;if(k){b=[n,...Qt(e,n)].some((t=>kt(k,It(e,t))))}const v=b&&(null===h&&null===m||!0===h||!0===m);return v?(0,f.applyFilters)("blockEditor.__unstableCanInsertBlockType",v,o,n,{getBlock:Tt.bind(null,e),getBlockParentsByBlockName:Jt.bind(null,e)}):v},$n=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(Gn,((t,n,o)=>yt(e)(t,o)))));function Wn(e,t,n=null){return t.every((t=>$n(e,It(e,t),n)))}function Kn(e,t){const n=Et(e,t);if(null===n)return!0;if(void 0!==n.lock?.remove)return!n.lock.remove;const o=Xt(e,t);if(Hn(e,o))return!1;const r=!!We(e,t),i=St(It(e,t));if(r&&!i)return!1;const s=!!Ke(e,o),l=Do(e,o);return!((s||"contentOnly"===l)&&!Ie(e,It(e,t),o))&&"disabled"!==l}function Zn(e,t){return t.every((t=>Kn(e,t)))}function qn(e,t){const n=Et(e,t);if(null===n)return!0;if(void 0!==n.lock?.move)return!n.lock.move;const o=Xt(e,t),r=Hn(e,o);if("all"===r||"contentOnly"===r)return!1;const i=!!We(e,t),s=St(It(e,t));if(i&&!s)return!1;const l=!!Ke(e,o),a=Do(e,o);return!((l||"contentOnly"===a)&&!Ie(e,It(e,t),o))&&"disabled"!==Do(e,o)}function Yn(e,t){return t.every((t=>qn(e,t)))}function Xn(e,t){const n=Et(e,t);if(null===n)return!0;const{lock:o}=n;return!o?.edit}function Qn(e,t){return!!(0,p.hasBlockSupport)(t,"lock",!0)&&!!e.settings?.canLockBlocks}function Jn(e,t){return e.preferences.insertUsage?.[t]??null}const eo=(e,t,n)=>!!(0,p.hasBlockSupport)(t,"inserter",!0)&&Gn(e,t.name,n),to=(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}},no=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;(0,p.hasBlockSupport)(n.name,"multiple",!0)||(r=Vt(e,Lt(e)).some((({name:e})=>e===n.name)));const{time:i,count:s=0}=Jn(e,o)||{},l={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:to(i,s)};if("transform"===t)return l;const a=(0,p.getBlockVariations)(n.name,"inserter");return{...l,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,parent:n.parent,ancestor:n.ancestor,variations:a,example:n.example,utility:1}},oo=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n=null,o=Bt)=>{const r=Gn(t,"core/block",n)?G(e(ge)).getReusableBlocks().map((e=>{const n=e.wp_pattern_sync_status?de:{src:de,foreground:"var(--wp-block-synced-color)"},o=mt(e),{time:r,count:i=0}=Jn(t,o.name)||{},s=to(r,i);return{id:o.name,name:"core/block",initialAttributes:{ref:e.id},title:o.title,icon:n,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:s,content:o.content,get blocks(){return ft(o).blocks},syncStatus:o.syncStatus}})):[],i=no(t,{buildScope:"inserter"});let s=(0,p.getBlockTypes)().filter((e=>(0,p.hasBlockSupport)(e,"inserter",!0))).map(i);s=!1!==o[pt]?s.filter((e=>eo(t,e,n))):s.filter((e=>Un(t,e,n))).map((e=>({...e,isAllowedInCurrentRoot:eo(t,e,n)})));const l=[],a=s.reduce(((e,n)=>{const{variations:o=[]}=n;if(o.some((({isDefault:e})=>e))||e.push(n),o.length){const r=((e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:i=0}=Jn(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:to(r,i)}})(t,n);o.map(r).forEach((t=>{"core/paragraph/stretchy-paragraph"===t.id||"core/heading/stretchy-heading"===t.id?l.push(t):e.push(t)}))}return e}),[]);a.push(...l);const{core:c,noncore:u}=a.reduce(((e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e}),{core:[],noncore:[]});return[...[...c,...u],...r]}),((t,n)=>[(0,p.getBlockTypes)(),G(e(ge)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...yt(e)(t,n)])))),ro=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((e,t,n=null)=>{const o=Array.isArray(t)?t:[t],r=no(e,{buildScope:"transform"}),i=(0,p.getBlockTypes)().filter((t=>eo(e,t,n))).map(r),s=Object.fromEntries(Object.entries(i).map((([,e])=>[e.name,e])));return xt((0,p.getPossibleBlockTransformations)(o).reduce(((e,t)=>(s[t?.name]&&e.push(s[t.name]),e)),[]),(e=>s[e.name].frecency),"desc")}),((t,n,o)=>[(0,p.getBlockTypes)(),t.preferences.insertUsage,...yt(e)(t,o)])))),io=(e,t=null)=>{if((0,p.getBlockTypes)().some((n=>eo(e,n,t))))return!0;return Gn(e,"core/block",t)},so=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((e,t=null)=>{if(!t)return;const n=(0,p.getBlockTypes)().filter((n=>eo(e,n,t)));return Gn(e,"core/block",t)&&n.push("core/block"),n}),((t,n)=>[(0,p.getBlockTypes)(),...yt(e)(t,n)])))),lo=(0,g.createSelector)(((e,t=null)=>(I()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),so(e,t))),((e,t)=>so.getDependants(e,t)));function ao(e,t=null){if(!t)return;const{defaultBlock:n,directInsert:o}=e.blockListSettings[t]??{};return n&&o?n:void 0}function co(e,t=null){return I()('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),ao(e,t)}const uo=(0,g.createRegistrySelector)((e=>(t,n)=>{const o=G(e(ge)).getPatternBySlug(n);return o?ft(o):null})),po=e=>(t,n)=>[..._t(e)(t),...yt(e)(t,n)],ho=new WeakMap;function go(e){let t=ho.get(e);return t||(t={...e,get blocks(){return ft(e).blocks}},ho.set(e,t)),t}const mo=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n=null,o=Bt)=>{const{getAllPatterns:r}=G(e(ge)),i=r(),{allowedBlockTypes:s}=_o(t);return i.filter((({inserter:e=!0})=>!!e)).map(go).filter((e=>vt(bt(e),s))).filter((e=>bt(e).every((({blockName:e})=>!1!==o[pt]?$n(t,e,n):Un(t,e,n)))))}),po(e)))),fo=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n,o=null)=>{if(!n)return wt;const r=e(ge).__experimentalGetAllowedPatterns(o),i=Array.isArray(n)?n:[n],s=r.filter((e=>e?.blockTypes?.some?.((e=>i.includes(e)))));return 0===s.length?wt:s}),((t,n,o)=>po(e)(t,o))))),bo=(0,g.createRegistrySelector)((e=>(I()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(ge).getPatternsByBlockTypes))),ko=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n,o=null)=>{if(!n)return wt;if(n.some((({clientId:e,innerBlocks:n})=>n.length||Eo(t,e))))return wt;const r=Array.from(new Set(n.map((({name:e})=>e))));return e(ge).getPatternsByBlockTypes(r,o)}),((t,n,o)=>po(e)(t,o)))));function vo(e,t){return e.blockListSettings[t]}function _o(e){return e.settings}function yo(e){return e.blocks.isPersistentChange}const xo=(0,g.createSelector)(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),So=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n)=>{I()("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});const o=G(e(ge)).getReusableBlocks().find((e=>e.id===n));return o?o.title?.raw:null}),(()=>[G(e(ge)).getReusableBlocks()]))));function wo(e){return e.blocks.isIgnoredChange}function Co(e){return e.lastBlockAttributesChange}function Bo(){return I()('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function Io(e){return!!e.automaticChangeStatus}function jo(e,t){return e.highlightedBlock===t}function Eo(e,t){return!!e.blocks.controlledInnerBlocks[t]}const To=(0,g.createSelector)(((e,t)=>{if(!t.length)return null;const n=qt(e);if(t.includes(It(e,n)))return n;const o=an(e),r=Jt(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Mo(e,t,n){const{lastBlockInserted:o}=e;return o.clientIds?.includes(t)&&o.source===n}function Po(e,t){return e.blockVisibility?.[t]??!0}function Ro(){I()("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}const Ao=(0,g.createSelector)((e=>{const t=new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])));return 0===t.size?Ct:t}),(e=>[e.blockVisibility]));function No(e,t){if("default"!==Do(e,t))return!1;if(!Xn(e,t))return!0;if(Qe(e)){const n=Xe(e);if(n){const o=xn(e,n);if(o?.includes(t))return!0}else if(t&&!Xt(e,t))return!0}return!(0,p.hasBlockSupport)(It(e,t),"__experimentalDisableBlockOverlay",!1)&&Eo(e,t)&&!wn(e,t)&&!Cn(e,t,!0)}function Lo(e,t){let n=e.blocks.parents.get(t);for(;n;){if(No(e,n))return!0;n=e.blocks.parents.get(n)}return!1}function Do(e,t=""){return null===t&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blockEditingModes.has(t)?e.blockEditingModes.get(t):"default"}const Oo=(0,g.createRegistrySelector)((e=>(t,n="")=>{const o=n||qt(t);if(!o)return!1;const{getGroupingBlockName:r}=e(p.store),i=Tt(t,o),s=r();return i&&(i.name===s||(0,p.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&Kn(t,o)})),zo=(0,g.createRegistrySelector)((e=>(t,n=wt)=>{const{getGroupingBlockName:o}=e(p.store),r=o(),i=n?.length?n:ln(t),s=i?.length?Xt(t,i[0]):void 0;return $n(t,r,s)&&i.length&&Zn(t,i)})),Vo=(e,t)=>(I()("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),$e(e,t));function Fo(e){return I()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),Ze(e)}function Ho(e){return I()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingFocusModeToRevert",{since:"6.5",version:"6.7"}),qe(e)}const Uo=window.wp.a11y,Go=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function $o(e,{stripExperimentalSettings:t=!1,reset:n=!1}={}){let o=e;Object.hasOwn(o,"__unstableIsPreviewMode")&&(I()("__unstableIsPreviewMode argument in wp.data.dispatch('core/block-editor').updateSettings",{since:"6.8",alternative:"isPreviewMode"}),o={...o},o.isPreviewMode=o.__unstableIsPreviewMode,delete o.__unstableIsPreviewMode);let r=o;if(t&&"web"===h.Platform.OS){r={};for(const e in o)Go.includes(e)||(r[e]=o[e])}return{type:"UPDATE_SETTINGS",settings:r,reset:n}}function Wo(){return{type:"HIDE_BLOCK_INTERFACE"}}function Ko(){return{type:"SHOW_BLOCK_INTERFACE"}}const Zo=(e,t=!0,n=!1)=>({select:o,dispatch:r,registry:i})=>{if(!e||!e.length)return;var s;s=e,e=Array.isArray(s)?s:[s];if(!o.canRemoveBlocks(e))return;const l=!n&&o.getBlockRemovalRules();if(l){let n=function(e){const t=[],n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t.push(o)}return t};const i=n(e.map(o.getBlock));let s;for(const n of l)if(s=n.callback(i),s)return void r(Yo(e,t,s))}t&&r.selectPreviousBlock(e[0],t),i.batch((()=>{r({type:"REMOVE_BLOCKS",clientIds:e}),r(qo())}))},qo=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;const{__unstableHasCustomAppender:n}=e.getSettings();n||t.insertDefaultBlock()};function Yo(e,t,n){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:n}}function Xo(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Qo(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Jo(e){return{type:"SET_OPENED_BLOCK_SETTINGS_MENU",clientId:e}}function er(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function tr(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function nr(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function or(e){return({select:t,dispatch:n,registry:o})=>{const r=G(o.select(ji)).getTemporarilyEditingFocusModeToRevert();n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:"contentOnly"}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:"contentOnly"}),n.updateSettings({focusMode:r}),n.__unstableSetTemporarilyEditingAsBlocks()}}function rr(){return{type:"START_DRAGGING"}}function ir(){return{type:"STOP_DRAGGING"}}function sr(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function lr(e){return{type:"SET_INSERTION_POINT",value:e}}const ar=e=>({select:t,dispatch:n})=>{n.selectBlock(e),n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:void 0}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:!1});const o=t.getSettings().focusMode;n.updateSettings({focusMode:!0}),n.__unstableSetTemporarilyEditingAsBlocks(e,o)},cr=(e=100)=>({select:t,dispatch:n})=>{if(100!==e){const e=t.getBlockSelectionStart(),o=t.getSectionRootClientId();if(e){let r;if(o){const n=t.getBlockOrder(o);r=n?.includes(e)?e:t.getBlockParents(e).find((e=>n.includes(e)))}else r=t.getBlockHierarchyRootClientId(e);r?n.selectBlock(r):n.clearSelectedBlock(),(0,Uo.speak)((0,T.__)("You are currently in zoom-out mode."))}}n({type:"SET_ZOOM_LEVEL",zoom:e})};function ur(){return{type:"RESET_ZOOM_LEVEL"}}function dr(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}const pr=window.wp.notices,hr=window.wp.preferences,gr="†";function mr(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return("string"==typeof n||n instanceof pe.RichTextData)&&-1!==n.toString().indexOf(gr)}))}function fr(e){for(const[t,n]of Object.entries(e.attributes))if("rich-text"===n.source||"html"===n.source)return t}const br=e=>Array.isArray(e)?e:[e],kr=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(vr(e))},vr=e=>({select:t,dispatch:n})=>{const o=t.getTemplate(),r=t.getTemplateLock(),i=!o||"all"!==r||(0,p.doBlocksMatchTemplate)(e,o);if(i!==t.isValidTemplate())return n.setTemplateValidity(i),i};function _r(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function yr(e){return I()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function xr(e,t,n={uniqueByBlock:!1}){return"boolean"==typeof n&&(n={uniqueByBlock:n}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:br(e),attributes:t,options:n}}function Sr(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function wr(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Cr(){return I()('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}const Br=(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)}},Ir=e=>({select:t,dispatch:n})=>{const o=t.getNextBlockClientId(e);o&&n.selectBlock(o)};function jr(){return{type:"START_MULTI_SELECT"}}function Er(){return{type:"STOP_MULTI_SELECT"}}const Tr=(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 i=o.getSelectedBlockCount();(0,Uo.speak)((0,T.sprintf)((0,T._n)("%s block selected.","%s blocks selected.",i),i),"assertive")};function Mr(){return{type:"CLEAR_SELECTED_BLOCK"}}function Pr(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}const Rr=(e,t,n,o=0,r)=>({select:i,dispatch:s,registry:l})=>{e=br(e),t=br(t);const a=i.getBlockRootClientId(e[0]);for(let e=0;e{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),s.ensureDefaultBlock()}))};function Ar(e,t){return Rr(e,t)}const Nr=e=>(t,n)=>({select:o,dispatch:r})=>{o.canMoveBlocks(t)&&r({type:e,clientIds:br(t),rootClientId:n})},Lr=Nr("MOVE_BLOCKS_DOWN"),Dr=Nr("MOVE_BLOCKS_UP"),Or=(e,t="",n="",o)=>({select:r,dispatch:i})=>{if(r.canMoveBlocks(e)){if(t!==n){if(!r.canRemoveBlocks(e))return;if(!r.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}};function zr(e,t="",n="",o){return Or([e],t,n,o)}function Vr(e,t,n,o,r){return Fr([e],t,n,o,0,r)}const Fr=(e,t,n,o=!0,r=0,i)=>({select:s,dispatch:l})=>{null!==r&&"object"==typeof r&&(i=r,r=0,I()("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=br(e);const a=[];for(const t of e){s.canInsertBlockType(t.name,n)&&a.push(t)}a.length&&l({type:"INSERT_BLOCKS",blocks:a,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:i})};function Hr(e,t,n={}){const{__unstableWithInserter:o,operation:r,nearestSide:i}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o,operation:r,nearestSide:i}}const Ur=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function Gr(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const $r=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});const n=e.getBlocks(),o=e.getTemplate(),r=(0,p.synchronizeBlocksWithTemplate)(n,o);t.resetBlocks(r)},Wr=e=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd();if(r.clientId===i.clientId)return;if(!r.attributeKey||!i.attributeKey||void 0===r.offset||void 0===i.offset)return!1;const s=n.getBlockRootClientId(r.clientId);if(s!==n.getBlockRootClientId(i.clientId))return;const l=n.getBlockOrder(s);let a,c;l.indexOf(r.clientId)>l.indexOf(i.clientId)?(a=i,c=r):(a=r,c=i);const u=e?c:a,d=n.getBlock(u.clientId),h=(0,p.getBlockType)(d.name);if(!h.merge)return;const g=a,m=c,f=n.getBlock(g.clientId),b=n.getBlock(m.clientId),k=f.attributes[g.attributeKey],v=b.attributes[m.attributeKey];let _=(0,pe.create)({html:k}),y=(0,pe.create)({html:v});_=(0,pe.remove)(_,g.offset,_.text.length),y=(0,pe.insert)(y,gr,0,m.offset);const x=(0,p.cloneBlock)(f,{[g.attributeKey]:(0,pe.toHTMLString)({value:_})}),S=(0,p.cloneBlock)(b,{[m.attributeKey]:(0,pe.toHTMLString)({value:y})}),w=e?x:S,C=f.name===b.name?[w]:(0,p.switchToBlockType)(w,h.name);if(!C||!C.length)return;let B;if(e){const e=C.pop();B=h.merge(e.attributes,S.attributes)}else{const e=C.shift();B=h.merge(x.attributes,e.attributes)}const I=mr(B),j=B[I],E=(0,pe.create)({html:j}),T=E.text.indexOf(gr),M=(0,pe.remove)(E,T,T+1),P=(0,pe.toHTMLString)({value:M});B[I]=P;const R=n.getSelectedBlockClientIds(),A=[...e?C:[],{...d,attributes:{...d.attributes,...B}},...e?[]:C];t.batch((()=>{o.selectionChange(d.clientId,I,T,T),o.replaceBlocks(R,A,0,n.getSelectedBlocksInitialCaretPosition())}))},Kr=(e=[])=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd(),s=n.getBlockRootClientId(r.clientId),l=n.getBlockRootClientId(i.clientId);if(s!==l)return;const a=n.getBlockOrder(s);let c,u;a.indexOf(r.clientId)>a.indexOf(i.clientId)?(c=i,u=r):(c=r,u=i);const d=c,h=u,g=n.getBlock(d.clientId),m=n.getBlock(h.clientId),f=(0,p.getBlockType)(g.name),b=(0,p.getBlockType)(m.name),k="string"==typeof d.attributeKey?d.attributeKey:fr(f),v="string"==typeof h.attributeKey?h.attributeKey:fr(b),_=n.getBlockAttributes(d.clientId),y=_?.metadata?.bindings;if(y?.[k]){if(e.length){const{createWarningNotice:e}=t.dispatch(pr.store);return void e((0,T.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"})}return void o.insertAfterBlock(d.clientId)}if(!k||!v||void 0===r.offset||void 0===i.offset)return;if(d.clientId===h.clientId&&k===v&&d.offset===h.offset)if(e.length){if((0,p.isUnmodifiedDefaultBlock)(g))return void o.replaceBlocks([d.clientId],e,e.length-1,-1)}else if(!n.getBlockOrder(d.clientId).length){let e=function(){const e=(0,p.getDefaultBlockName)();return n.canInsertBlockType(e,s)?(0,p.createBlock)(e):(0,p.createBlock)(n.getBlockName(d.clientId))};const t=_[k].length;if(0===d.offset&&t)return void o.insertBlocks([e()],n.getBlockIndex(d.clientId),s,!1);if(d.offset===t)return void o.insertBlocks([e()],n.getBlockIndex(d.clientId)+1,s)}const x=g.attributes[k],S=m.attributes[v];let w=(0,pe.create)({html:x}),C=(0,pe.create)({html:S});w=(0,pe.remove)(w,d.offset,w.text.length),C=(0,pe.remove)(C,0,h.offset);let B={...g,innerBlocks:g.clientId===m.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[k]:(0,pe.toHTMLString)({value:w})}},I={...m,clientId:g.clientId===m.clientId?(0,p.createBlock)(m.name).clientId:m.clientId,attributes:{...m.attributes,[v]:(0,pe.toHTMLString)({value:C})}};const j=(0,p.getDefaultBlockName)();if(g.clientId===m.clientId&&j&&I.name!==j&&n.canInsertBlockType(j,s)){const e=(0,p.switchToBlockType)(I,j);1===e?.length&&(I=e[0])}if(!e.length)return void o.replaceBlocks(n.getSelectedBlockClientIds(),[B,I]);let E;const M=[],P=[...e],R=P.shift(),A=(0,p.getBlockType)(B.name),N=A.merge&&R.name===A.name?[R]:(0,p.switchToBlockType)(R,A.name);if(N?.length){const e=N.shift();B={...B,attributes:{...B.attributes,...A.merge(B.attributes,e.attributes)}},M.push(B),E={clientId:B.clientId,attributeKey:k,offset:(0,pe.create)({html:B.attributes[k]}).text.length},P.unshift(...N)}else(0,p.isUnmodifiedBlock)(B)||M.push(B),M.push(R);const L=P.pop(),D=(0,p.getBlockType)(I.name);if(P.length&&M.push(...P),L){const e=D.merge&&D.name===L.name?[L]:(0,p.switchToBlockType)(L,D.name);if(e?.length){const t=e.pop();M.push({...I,attributes:{...I.attributes,...D.merge(t.attributes,I.attributes)}}),M.push(...e),E={clientId:I.clientId,attributeKey:v,offset:(0,pe.create)({html:t.attributes[v]}).text.length}}else M.push(L),(0,p.isUnmodifiedBlock)(I)||M.push(I)}else(0,p.isUnmodifiedBlock)(I)||M.push(I);t.batch((()=>{o.replaceBlocks(n.getSelectedBlockClientIds(),M,M.length-1,0),E&&o.selectionChange(E.clientId,E.attributeKey,E.offset,E.offset)}))},Zr=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();t.selectionChange({start:{clientId:n.clientId},end:{clientId:o.clientId}})},qr=(e,t)=>({registry:n,select:o,dispatch:r})=>{const i=e,s=t,l=o.getBlock(i),a=(0,p.getBlockType)(l.name);if(!a||"disabled"===o.getBlockEditingMode(i)||"disabled"===o.getBlockEditingMode(s))return;const c=o.getBlock(s);if(!a.merge&&(0,p.getBlockSupport)(l.name,"__experimentalOnMerge")){const e=(0,p.switchToBlockType)(c,a.name);if(1!==e?.length)return void r.selectBlock(l.clientId);const[t]=e;return t.innerBlocks.length<1?void r.selectBlock(l.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,p.isUnmodifiedDefaultBlock)(l))return void r.removeBlock(i,o.isBlockSelected(i));if((0,p.isUnmodifiedDefaultBlock)(c))return void r.removeBlock(s,o.isBlockSelected(s));if(!a.merge)return void((0,p.isUnmodifiedBlock)(c,"content")?r.removeBlock(s,o.isBlockSelected(s)):r.selectBlock(l.clientId));const u=(0,p.getBlockType)(c.name),{clientId:d,attributeKey:h,offset:g}=o.getSelectionStart(),m=(d===i?a:u).attributes[h],f=(d===i||d===s)&&void 0!==h&&void 0!==g&&!!m;m||("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 b=(0,p.cloneBlock)(l),k=(0,p.cloneBlock)(c);if(f){const e=d===i?b:k,t=e.attributes[h],n=(0,pe.insert)((0,pe.create)({html:t}),gr,g,g);e.attributes[h]=(0,pe.toHTMLString)({value:n})}const v=l.name===c.name?[k]:(0,p.switchToBlockType)(k,l.name);if(!v||!v.length)return;const _=a.merge(b.attributes,v[0].attributes);if(f){const e=mr(_),t=_[e],n=(0,pe.create)({html:t}),o=n.text.indexOf(gr),i=(0,pe.remove)(n,o,o+1),s=(0,pe.toHTMLString)({value:i});_[e]=s,r.selectionChange(l.clientId,e,o,o)}r.replaceBlocks([l.clientId,c.clientId],[{...l,attributes:{...l.attributes,..._}},...v.slice(1)],0)},Yr=(e,t=!0)=>Zo(e,t);function Xr(e,t){return Yr([e],t)}function Qr(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 Jr(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function ei(){return{type:"START_TYPING"}}function ti(){return{type:"STOP_TYPING"}}function ni(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function oi(){return{type:"STOP_DRAGGING_BLOCKS"}}function ri(){return I()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function ii(){return I()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function si(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const li=(e,t,n)=>({dispatch:o})=>{const r=(0,p.getDefaultBlockName)();if(!r)return;const i=(0,p.createBlock)(r,e);return o.insertBlock(i,n,t)};function ai(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function ci(e){return $o(e,{stripExperimentalSettings:!0})}function ui(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function di(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function pi(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const hi=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:t=e=>setTimeout(e,100)}=window;t((()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},gi=e=>({registry:t})=>{t.dispatch(hr.store).set("core","editorTool",e),"navigation"===e?(0,Uo.speak)((0,T.__)("You are currently in Write mode.")):"edit"===e&&(0,Uo.speak)((0,T.__)("You are currently in Design mode."))};function mi(){return I()('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}const fi=(e,t=!0)=>({select:n,dispatch:o})=>{if(!e||!e.length)return;const r=n.getBlocksByClientId(e);if(r.some((e=>!e)))return;if(r.map((e=>e.name)).some((e=>!(0,p.hasBlockSupport)(e,"multiple",!0))))return;const i=n.getBlockRootClientId(e[0]),s=br(e),l=n.getBlockIndex(s[s.length-1]),a=r.map((e=>(0,p.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(a,l+1,i,t),a.length>1&&t&&o.multiSelect(a[0].clientId,a[a.length-1].clientId),a.map((e=>e.clientId))},bi=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const l=(0,p.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(l,r,o)},ki=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r+1);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const l=(0,p.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(l,r+1,o)};function vi(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const _i=(e,t=150)=>async({dispatch:n})=>{n(vi(e,!0)),await new Promise((e=>setTimeout(e,t))),n(vi(e,!1))};function yi(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function xi(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Si(e,t){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e,focusModeToRevert:t}}const wi=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 Ci(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function Bi(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}const Ii={reducer:ce,selectors:t,actions:i},ji=(0,g.createReduxStore)(ge,{...Ii,persist:["preferences"]}),Ei=(0,g.registerStore)(ge,{...Ii,persist:["preferences"]});function Ti(...e){const{clientId:t=null}=C();return(0,g.useSelect)((n=>G(n(ji)).getBlockSettings(t,...e)),[t,...e])}function Mi(e){I()("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]=Ti(e);return t}G(Ei).registerPrivateActions(r),G(Ei).registerPrivateSelectors(e),G(ji).registerPrivateActions(r),G(ji).registerPrivateSelectors(e);const Pi=window.wp.styleEngine,Ri="1600px",Ai="320px",Ni=1,Li=.25,Di=.75,Oi="14px";function zi({minimumFontSize:e,maximumFontSize:t,fontSize:n,minimumViewportWidth:o=Ai,maximumViewportWidth:r=Ri,scaleFactor:i=Ni,minimumFontSizeLimit:s}){if(s=Vi(s)?s:Oi,n){const o=Vi(n);if(!o?.unit)return null;const r=Vi(s,{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),Li),Di),i=Fi(o.value*n,3);e=r?.value&&i{if("string"==typeof e.fontWeight&&/\s/.test(e.fontWeight.trim())){i=!0;let[t,o]=e.fontWeight.split(" ");t=parseInt(t.slice(0,1)),o="1000"===o?10:parseInt(o.slice(0,1));for(let e=t;e<=o;e++){const t=`${e.toString()}00`;n.some((e=>e.value===t))||n.push(Hi(t))}}const o=Hi("number"==typeof e.fontWeight?e.fontWeight.toString():e.fontWeight),r=function(e){if(!e)return{};if("object"==typeof e)return e;let t;switch(e){case"normal":t=(0,T._x)("Regular","font style");break;case"italic":t=(0,T._x)("Italic","font style");break;case"oblique":t=(0,T._x)("Oblique","font style");break;default:t=e}return{name:t,value:e}}(e.fontStyle);r&&Object.keys(r).length&&(t.some((e=>e.value===r.value))||t.push(r)),o&&Object.keys(o).length&&(n.some((e=>e.value===o.value))||i||n.push(o))})),n.some((e=>e.value>="600"))||n.push({name:(0,T._x)("Bold","font weight"),value:"700"}),t.some((e=>"italic"===e.value))||t.push({name:(0,T._x)("Italic","font style"),value:"italic"}),r&&(t=Ui,n=Gi),t=0===t.length?Ui:t,n=0===n.length?Gi:n,t.forEach((({name:e,value:t})=>{n.forEach((({name:n,value:r})=>{const i="normal"===t?n:(0,T.sprintf)((0,T._x)("%1$s %2$s","font"),n,e);o.push({key:`${t}-${r}`,name:i,style:{fontStyle:t,fontWeight:r}})}))})),{fontStyles:t,fontWeights:n,combinedStyleAndWeightOptions:o,isSystemFont:r,isVariableFont:i}}function Wi(e,t){const{size:n}=e;if(!n||"0"===n||!1===e?.fluid)return n;if(!Ki(t?.typography)&&!Ki(e))return n;let o=function(e){const t=e?.typography,n=e?.layout,o=Vi(n?.wideSize)?n?.wideSize:null;return Ki(t)&&o?{fluid:{maxViewportWidth:o,...t.fluid}}:{fluid:t?.fluid}}(t);o="object"==typeof o?.fluid?o?.fluid:{};const r=zi({minimumFontSize:e?.fluid?.min,maximumFontSize:e?.fluid?.max,fontSize:n,minimumFontSizeLimit:o?.minFontSize,maximumViewportWidth:o?.maxViewportWidth,minimumViewportWidth:o?.minViewportWidth});return r||n}function Ki(e){const t=e?.fluid;return!0===t||t&&"object"==typeof t&&Object.keys(t).length>0}function Zi(e,t){if(!(t="number"==typeof t?t.toString():t)||"string"!=typeof t)return"";if(!e||0===e.length)return t;const n=e?.reduce(((e,{value:n})=>Math.abs(parseInt(n)-parseInt(t))`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>Wi(e,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",classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]}],Qi={"color.background":"color","color.text":"color","filter.duotone":"duotone","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.caption.color.text":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",shadow:"shadow","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function Ji(){return(0,m.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function es(e,t,n,o,r){const i=[fe(e,["blocks",t,...n]),fe(e,n)];for(const s of i)if(s){const i=["custom","theme","default"];for(const l of i){const i=s[l];if(i){const s=i.find((e=>e[o]===r));if(s){if("slug"===o)return s;return es(e,t,n,"slug",s.slug)[o]===s[o]?s:void 0}}}}}function ts(e,t,n){if(!n||"string"!=typeof n){if("string"!=typeof n?.ref)return n;if(!(n=fe(e,n.ref))||n?.ref)return n}const o="var:",r="var(--wp--";let i;if(n.startsWith(o))i=n.slice(4).split("|");else{if(!n.startsWith(r)||!n.endsWith(")"))return n;i=n.slice(10,-1).split("--")}const[s,...l]=i;return"preset"===s?function(e,t,n,[o,r]){const i=Xi.find((e=>e.cssVarInfix===o));if(!i)return n;const s=es(e.settings,t,i.path,"slug",r);if(s){const{valueKey:n}=i;return ts(e,t,s[n])}return n}(e,t,n,l):"custom"===s?function(e,t,n,o){const r=fe(e.settings,["blocks",t,"custom",...o])??fe(e.settings,["custom",...o]);return r?ts(e,t,r):n}(e,t,n,l):n}function ns(e,t){if(!e||!t)return 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 os(e,t){return"object"!=typeof e||"object"!=typeof t?e===t:E()(e?.styles,t?.styles)&&E()(e?.settings,t?.settings)}function rs(e,t){if(!e||!t)return e;const n=function(e,t){if(!e||!t)return e;if("string"!=typeof e&&e?.ref){const n=(0,Pi.getCSSValueFromRawStyle)(fe(t,e.ref));if(n?.ref)return;return void 0===n?e:n}return e}(e,t);return n?.url&&(n.url=function(e,t){if(!e||!t||!Array.isArray(t))return e;const n=t.find((t=>t?.name===e));return n?.href?n?.href:e}(n.url,t?._links?.["wp:theme-file"])),n}const is=(0,h.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}});is.displayName="GlobalStylesContext";const ss={settings:{},styles:{}},ls=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.style","border.width","border.radiusSizes","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.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textTransform","typography.writingMode"],as=()=>{const{user:e,setUserConfig:t}=(0,h.useContext)(is),n={settings:e.settings,styles:e.styles};return[!!n&&!E()(n,ss),(0,h.useCallback)((()=>t(ss)),[t])]};function cs(e,t,n="all"){const{setUserConfig:o,...r}=(0,h.useContext)(is),i=t?".blocks."+t:"",s=e?"."+e:"",l=`settings${i}${s}`,a=`settings${s}`,c="all"===n?"merged":n;return[(0,h.useMemo)((()=>{const t=r[c];if(!t)throw"Unsupported source";if(e)return fe(t,l)??fe(t,a);let n={};return ls.forEach((e=>{const o=fe(t,`settings${i}.${e}`)??fe(t,`settings.${e}`);void 0!==o&&(n=me(n,e.split("."),o))})),n}),[r,c,e,l,a,i]),e=>{o((t=>me(t,l.split("."),e)))}]}function us(e,t,n="all",{shouldDecodeEncode:o=!0}={}){const{merged:r,base:i,user:s,setUserConfig:l}=(0,h.useContext)(is),a=e?"."+e:"",c=t?`styles.blocks.${t}${a}`:`styles${a}`;let u,d;switch(n){case"all":u=fe(r,c),d=o?ts(r,t,u):u;break;case"user":u=fe(s,c),d=o?ts(r,t,u):u;break;case"base":u=fe(i,c),d=o?ts(i,t,u):u;break;default:throw"Unsupported source"}return[d,n=>{l((i=>me(i,c.split("."),o?function(e,t,n,o){if(!o)return o;const r=Qi[n],i=Xi.find((e=>e.cssVarInfix===r));if(!i)return o;const{valueKey:s,path:l}=i,a=es(e,t,l,s,o);return a?`var:preset|${r}|${a.slug}`:o}(r.settings,t,e,n):n)))}]}function ds(e,t,n){const{supportedStyles:o,supports:r}=(0,g.useSelect)((e=>({supportedStyles:G(e(p.store)).getSupportedStyles(t,n),supports:e(p.store).getBlockType(t)?.supports})),[t,n]);return(0,h.useMemo)((()=>{const t={...e};return o.includes("fontSize")||(t.typography={...t.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!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","textAlign","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})})),["backgroundImage","backgroundSize"].forEach((e=>{o.includes(e)||(t.background={...t.background,[e]:!1})})),t.shadow=!!o.includes("shadow")&&t.shadow,n&&(t.typography.textAlign=!1),t}),[e,o,r,n])}function ps(e){const t=e?.color?.palette?.custom,n=e?.color?.palette?.theme,o=e?.color?.palette?.default,r=e?.color?.defaultPalette;return(0,h.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,T._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,T._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,T._x)("Custom","Indicates this palette is created by the user."),colors:t}),e}),[t,n,o,r])}function hs(e){const t=e?.color?.gradients?.custom,n=e?.color?.gradients?.theme,o=e?.color?.gradients?.default,r=e?.color?.defaultGradients;return(0,h.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,T._x)("Theme","Indicates this palette comes from the theme."),gradients:n}),r&&o&&o.length&&e.push({name:(0,T._x)("Default","Indicates this palette comes from WordPress."),gradients:o}),t&&t.length&&e.push({name:(0,T._x)("Custom","Indicates this palette is created by the user."),gradients:t}),e}),[t,n,o,r])}function gs(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map((([e,t])=>[e,fs(t)])).filter((([,e])=>void 0!==e));return t.length?Object.fromEntries(t):void 0};function bs(e,t,n,o,r,i){if(Object.values(e??{}).every((e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===o.length)return n;let s=o[0]?.attributes;if(i.length>1&&o.length>1){if(!o[r])return n;s=o[r]?.attributes}let l=n;return Object.entries(e).forEach((([e,n])=>{n&&t[e].forEach((e=>{const t=fe(s,e);t&&(l={...l,attributes:me(l.attributes,e,t)})}))})),l}function ks(e,t,n){const o=(0,p.getBlockSupport)(e,t),r=o?.__experimentalSkipSerialization;return Array.isArray(r)?r.includes(n):r}const vs=new WeakMap;function _s({id:e,css:t}){return ys({id:e,css:t})}function ys({id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i}={}){const{setStyleOverride:s,deleteStyleOverride:l}=G((0,g.useDispatch)(ji)),a=(0,g.useRegistry)(),c=(0,h.useId)();(0,h.useEffect)((()=>{if(!t&&!n)return;const u=e||c,d={id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i};return vs.get(a)||vs.set(a,[]),vs.get(a).push([u,d]),window.queueMicrotask((()=>{vs.get(a)?.length&&a.batch((()=>{vs.get(a).forEach((e=>{s(...e)})),vs.set(a,[])}))})),()=>{const e=vs.get(a)?.find((([e])=>e===u));e?vs.set(a,vs.get(a).filter((([e])=>e!==u))):l(u)}}),[e,t,i,n,o,c,s,l,a])}function xs(e,t){const[n,o,r,i,s,l,a,c,u,d,p,g,m,f,b,k,v,_,y,x,S,w,C,B,I,j,E,T,M,P,R,A,N,L,D,O,z,V,F,H,U,G,$,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re,ie]=Ti("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.minHeight","layout","border.color","border.radius","border.style","border.width","border.radiusSizes","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 ds((0,h.useMemo)((()=>({background:{backgroundImage:n,backgroundSize:o},color:{palette:{custom:V,theme:H,default:U},gradients:{custom:q,theme:Y,default:X},duotone:{custom:W,theme:K,default:Z},defaultGradients:Q,defaultPalette:G,defaultDuotone:$,custom:z,customGradient:J,customDuotone:F,background:ee,link:te,heading:oe,button:re,text:ne},typography:{fontFamilies:{custom:r,default:i,theme:s},fontSizes:{custom:a,default:c,theme:u},customFontSize:d,defaultFontSizes:l,fontStyle:p,fontWeight:g,lineHeight:m,textAlign:f,textColumns:b,textDecoration:k,textTransform:_,letterSpacing:y,writingMode:v},spacing:{spacingSizes:{custom:I,default:j,theme:E},customSpacingSize:B,defaultSpacingSizes:C,padding:x,margin:S,blockGap:w,units:T},border:{color:A,radius:N,style:L,width:D,radiusSizes:O},dimensions:{aspectRatio:M,minHeight:P},layout:R,parentLayout:t,shadow:ie})),[n,o,r,i,s,l,a,c,u,d,p,g,m,f,b,k,_,y,v,x,S,w,C,B,I,j,E,T,M,P,R,t,A,N,L,D,O,z,V,F,H,U,G,$,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re,ie]),e)}const Ss=(0,h.memo)((function({index:e,useBlockProps:t,setAllWrapperProps:n,...o}){const r=t(o),i=t=>n((n=>{const o=[...n];return o[e]=t,o}));return(0,h.useEffect)((()=>(i(r),()=>{i(void 0)}))),null}));(0,f.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,p.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));const ws=window.wp.components;var Cs={default:(0,ws.createSlotFill)("BlockControls"),block:(0,ws.createSlotFill)("BlockControlsBlock"),inline:(0,ws.createSlotFill)("BlockFormatControls"),other:(0,ws.createSlotFill)("BlockControlsOther"),parent:(0,ws.createSlotFill)("BlockControlsParent")};function Bs({group:e="default",controls:t,children:n,__experimentalShareWithChildBlocks:o=!1}){const r=function(e,t){const n=C();return n[b]?Cs[e]?.Fill:n[k]&&t?Cs.parent.Fill:null}(e,o);if(!r)return null;const i=(0,d.jsxs)(d.Fragment,{children:["default"===e&&(0,d.jsx)(ws.ToolbarGroup,{controls:t}),n]});return(0,d.jsx)(ws.__experimentalStyleProvider,{document,children:(0,d.jsx)(r,{children:e=>{const{forwardedContext:t=[]}=e;return t.reduce(((e,[t,n])=>(0,d.jsx)(t,{...n,children:e})),i)}})})}const Is=window.wp.warning;var js=n.n(Is);const{ComponentsContext:Es}=G(ws.privateApis);function Ts({group:e="default",...t}){const n=(0,h.useContext)(ws.__experimentalToolbarContext),o=(0,h.useContext)(Es),r=(0,h.useMemo)((()=>({forwardedContext:[[ws.__experimentalToolbarContext.Provider,{value:n}],[Es.Provider,{value:o}]]})),[n,o]),i=Cs[e],s=(0,ws.__experimentalUseSlotFills)(i.name);if(!i)return js()(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;const{Slot:l}=i,a=(0,d.jsx)(l,{...t,bubblesVirtually:!0,fillProps:r});return"default"===e?a:(0,d.jsx)(ws.ToolbarGroup,{children:a})}const Ms=Bs;Ms.Slot=Ts;const Ps=e=>(0,d.jsx)(Bs,{group:"inline",...e});Ps.Slot=e=>(0,d.jsx)(Ts,{group:"inline",...e});var Rs=Ms,As=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})}),Ns=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})}),Ls=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})}),Ds=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})}),Os=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})}),zs=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),Vs=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})});const Fs={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",rules:{"margin-block-start":"0"}},{selector:" > :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",rules:{"margin-block-start":"0"}},{selector:" > :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:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function Hs(e,t=""){return e.split(",").map((e=>`${e}${t?` ${t}`:""}`)).join(",")}function Us(e,t=Fs,n,o){let r="";return t?.[n]?.spacingStyles?.length&&o&&t[n].spacingStyles.forEach((t=>{r+=`${Hs(e,t.selector.trim())} { `,r+=Object.entries(t.rules).map((([e,t])=>`${e}: ${t||o}`)).join("; "),r+="; }"})),r}function Gs(e){const{contentSize:t,wideSize:n,type:o="default"}=e,r={},i=/^(?!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 i.test(t)&&"constrained"===o&&(r.none=(0,T.sprintf)((0,T.__)("Max %s wide"),t)),i.test(n)&&(r.wide=(0,T.sprintf)((0,T.__)("Max %s wide"),n)),r}var $s=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})}),Ws=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.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,d.jsx)(ue.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,d.jsx)(ue.Path,{d:"m18 7.5v9h1.5v-9z"})]}),Ks=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.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,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,d.jsx)(ue.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]}),Zs=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.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,d.jsx)(ue.Path,{d:"m16.5 6h-9v-1.5h9z"})]}),qs=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.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,d.jsx)(ue.Path,{d:"m18 16.5v-9h1.5v9z"})]}),Ys=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.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,d.jsx)(ue.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]}),Xs=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.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,d.jsx)(ue.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});const Qs=8,Js=["top","right","bottom","left"],el={top:void 0,right:void 0,bottom:void 0,left:void 0},tl={custom:$s,axial:$s,horizontal:Ws,vertical:Ks,top:Zs,right:qs,bottom:Ys,left:Xs},nl={default:(0,T.__)("Spacing control"),top:(0,T.__)("Top"),bottom:(0,T.__)("Bottom"),left:(0,T.__)("Left"),right:(0,T.__)("Right"),mixed:(0,T.__)("Mixed"),vertical:(0,T.__)("Vertical"),horizontal:(0,T.__)("Horizontal"),axial:(0,T.__)("Horizontal & vertical"),custom:(0,T.__)("Custom")},ol={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function rl(e){return!!e?.includes&&("0"===e||e.includes("var:preset|spacing|"))}function il(e,t){if(!rl(e))return e;const n=al(e),o=t.find((e=>String(e.slug)===n));return o?.size}function sl(e,t){if(!e||rl(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 ll(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function al(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 cl(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 ul(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=ll(n?.top)||t,r=ll(n?.left)||t;return o===r?o:`${o} ${r}`}var dl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})}),pl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})}),hl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})}),gl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})}),ml=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});const fl={top:{icon:dl,title:(0,T._x)("Align top","Block vertical alignment setting")},center:{icon:pl,title:(0,T._x)("Align middle","Block vertical alignment setting")},bottom:{icon:hl,title:(0,T._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:gl,title:(0,T._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:ml,title:(0,T._x)("Space between","Block vertical alignment setting")}},bl=["top","center","bottom"];var kl=function({value:e,onChange:t,controls:n=bl,isCollapsed:o=!0,isToolbar:r}){const i=fl[e],s=fl.top,l=r?ws.ToolbarGroup:ws.ToolbarDropdownMenu,a=r?{isCollapsed:o}:{};return(0,d.jsx)(l,{icon:i?i.icon:s.icon,label:(0,T._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((n=>{return{...fl[n],isActive:e===n,role:o?"menuitemradio":void 0,onClick:(r=n,()=>t(e===r?void 0:r))};var r})),...a})};const vl=e=>(0,d.jsx)(kl,{...e,isToolbar:!1}),_l=e=>(0,d.jsx)(kl,{...e,isToolbar:!0}),yl={left:As,center:Ns,right:Ls,"space-between":Ds,stretch:Os};var xl=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:i}){const s=e=>{n(e===o?void 0:e)},l=o?yl[o]:yl.left,a=[{name:"left",icon:As,title:(0,T.__)("Justify items left"),isActive:"left"===o,onClick:()=>s("left")},{name:"center",icon:Ns,title:(0,T.__)("Justify items center"),isActive:"center"===o,onClick:()=>s("center")},{name:"right",icon:Ls,title:(0,T.__)("Justify items right"),isActive:"right"===o,onClick:()=>s("right")},{name:"space-between",icon:Ds,title:(0,T.__)("Space between items"),isActive:"space-between"===o,onClick:()=>s("space-between")},{name:"stretch",icon:Os,title:(0,T.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>s("stretch")}],c=i?ws.ToolbarGroup:ws.ToolbarDropdownMenu,u=i?{isCollapsed:t}:{};return(0,d.jsx)(c,{icon:l,popoverProps:r,label:(0,T.__)("Change items justification"),controls:a.filter((t=>e.includes(t.name))),...u})};const Sl=e=>(0,d.jsx)(xl,{...e,isToolbar:!1}),wl=e=>(0,d.jsx)(xl,{...e,isToolbar:!0}),Cl={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},Bl={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Il={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},jl="center",El="top",Tl=["wrap","nowrap"];var Ml={name:"flex",label:(0,T.__)("Flex"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowOrientation:o=!0,allowJustification:r=!0}=n;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.Flex,{children:[r&&(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(Al,{layout:e,onChange:t})}),o&&(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(Ll,{layout:e,onChange:t})})]}),(0,d.jsx)(Nl,{layout:e,onChange:t})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){const{allowVerticalAlignment:o=!0,allowJustification:r=!0}=n;return r||o?(0,d.jsxs)(Rs,{group:"block",__experimentalShareWithChildBlocks:!0,children:[r&&(0,d.jsx)(Al,{layout:e,onChange:t,isToolbar:!0}),o&&(0,d.jsx)(Pl,{layout:e,onChange:t})]}):null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Fs}){const{orientation:s="horizontal"}=t,l=n?.spacing?.blockGap&&!ks(o,"spacing","blockGap")?ul(n?.spacing?.blockGap,"0.5em"):void 0,a=Cl[t.justifyContent],c=Tl.includes(t.flexWrap)?t.flexWrap:"wrap",u=Il[t.verticalAlignment],d=Bl[t.justifyContent]||Bl.left;let p="";const h=[];return c&&"wrap"!==c&&h.push(`flex-wrap: ${c}`),"horizontal"===s?(u&&h.push(`align-items: ${u}`),a&&h.push(`justify-content: ${a}`)):(u&&h.push(`justify-content: ${u}`),h.push("flex-direction: column"),h.push(`align-items: ${d}`)),h.length&&(p=`${Hs(e)} {\n\t\t\t\t${h.join("; ")};\n\t\t\t}`),r&&l&&(p+=Us(e,i,"flex",l)),p},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function Pl({layout:e,onChange:t}){const{orientation:n="horizontal"}=e,o="horizontal"===n?jl:El,{verticalAlignment:r=o}=e;return(0,d.jsx)(vl,{onChange:n=>{t({...e,verticalAlignment:n})},value:r,controls:"horizontal"===n?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}const Rl={placement:"bottom-start"};function Al({layout:e,onChange:t,isToolbar:n=!1}){const{justifyContent:o="left",orientation:r="horizontal"}=e,i=n=>{t({...e,justifyContent:n})},s=["left","center","right"];if("horizontal"===r?s.push("space-between"):s.push("stretch"),n)return(0,d.jsx)(Sl,{allowedControls:s,value:o,onChange:i,popoverProps:Rl});const l=[{value:"left",icon:As,label:(0,T.__)("Justify items left")},{value:"center",icon:Ns,label:(0,T.__)("Justify items center")},{value:"right",icon:Ls,label:(0,T.__)("Justify items right")}];return"horizontal"===r?l.push({value:"space-between",icon:Ds,label:(0,T.__)("Space between items")}):l.push({value:"stretch",icon:Os,label:(0,T.__)("Stretch items")}),(0,d.jsx)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Justification"),value:o,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:l.map((({value:e,icon:t,label:n})=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})}function Nl({layout:e,onChange:t}){const{flexWrap:n="wrap"}=e;return(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Allow to wrap to multiple lines"),onChange:n=>{t({...e,flexWrap:n?"wrap":"nowrap"})},checked:"wrap"===n})}function Ll({layout:e,onChange:t}){const{orientation:n="horizontal",verticalAlignment:o,justifyContent:r}=e;return(0,d.jsxs)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,T.__)("Orientation"),value:n,onChange:n=>{let i=o,s=r;return"horizontal"===n?("space-between"===o&&(i="center"),"stretch"===r&&(s="left")):("stretch"===o&&(i="top"),"space-between"===r&&(s="left")),t({...e,orientation:n,verticalAlignment:i,justifyContent:s})},children:[(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{icon:zs,value:"horizontal",label:(0,T.__)("Horizontal")}),(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{icon:Vs,value:"vertical",label:(0,T.__)("Vertical")})]})}var Dl={name:"default",label:(0,T.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,style:t,blockName:n,hasBlockGapSupport:o,layoutDefinitions:r=Fs}){const i=ul(t?.spacing?.blockGap);let s="";ks(n,"spacing","blockGap")||(i?.top?s=ul(i?.top):"string"==typeof i&&(s=ul(i)));let l="";return o&&s&&(l+=Us(e,r,"default",s)),l},getOrientation:()=>"vertical",getAlignments(e,t){const n=Gs(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}},Ol=(0,h.forwardRef)((({icon:e,size:t=24,...n},o)=>(0,h.cloneElement)(e,{width:t,height:t,...n,ref:o}))),zl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})}),Vl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),Fl={name:"constrained",label:(0,T.__)("Constrained"),inspectorControls:function({layout:e,onChange:t,layoutBlockSupport:n={}}){const{wideSize:o,contentSize:r,justifyContent:i="center"}=e,{allowJustification:s=!0,allowCustomContentAndWideSize:l=!0}=n,a=[{value:"left",icon:As,label:(0,T.__)("Justify items left")},{value:"center",icon:Ns,label:(0,T.__)("Justify items center")},{value:"right",icon:Ls,label:(0,T.__)("Justify items right")}],[c]=Ti("spacing.units"),u=(0,ws.__experimentalUseCustomUnits)({availableUnits:c||["%","px","em","rem","vw"]});return(0,d.jsxs)(ws.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[l&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Content width"),labelPosition:"top",value:r||o||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:u,prefix:(0,d.jsx)(ws.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,d.jsx)(Ol,{icon:zl})})}),(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Wide width"),labelPosition:"top",value:o||r||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:u,prefix:(0,d.jsx)(ws.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,d.jsx)(Ol,{icon:Vl})})}),(0,d.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,T.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),s&&(0,d.jsx)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Justification"),value:i,onChange:n=>{t({...e,justifyContent:n})},children:a.map((({value:e,icon:t,label:n})=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){const{allowJustification:o=!0}=n;return o?(0,d.jsx)(Rs,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,d.jsx)(Ul,{layout:e,onChange:t})}):null},getLayoutStyle:function({selector:e,layout:t={},style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Fs}){const{contentSize:s,wideSize:l,justifyContent:a}=t,c=ul(n?.spacing?.blockGap);let u="";ks(o,"spacing","blockGap")||(c?.top?u=ul(c?.top):"string"==typeof c&&(u=ul(c)));const d="left"===a?"0 !important":"auto !important",p="right"===a?"0 !important":"auto !important";let h=s||l?`\n\t\t\t\t\t${Hs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${s??l};\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${Hs(e,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${l??s};\n\t\t\t\t\t}\n\t\t\t\t\t${Hs(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?h+=`${Hs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${d}; }`:"right"===a&&(h+=`${Hs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${p}; }`),n?.spacing?.padding){(0,Pi.getCSSRules)(n).forEach((t=>{if("paddingRight"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${Hs(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}else if("paddingLeft"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${Hs(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}}))}return r&&u&&(h+=Us(e,i,"constrained",u)),h},getOrientation:()=>"vertical",getAlignments(e){const t=Gs(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}};const Hl={placement:"bottom-start"};function Ul({layout:e,onChange:t}){const{justifyContent:n="center"}=e;return(0,d.jsx)(Sl,{allowedControls:["left","center","right"],value:n,onChange:n=>{t({...e,justifyContent:n})},popoverProps:Hl})}const Gl={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},$l=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}];var Wl={name:"grid",label:(0,T.__)("Grid"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowSizingOnChildren:o=!1}=n,r=window.__experimentalEnableGridInteractivity||!!e?.columnCount,i=window.__experimentalEnableGridInteractivity||!e?.columnCount;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ql,{layout:e,onChange:t}),(0,d.jsxs)(ws.__experimentalVStack,{spacing:4,children:[r&&(0,d.jsx)(Zl,{layout:e,onChange:t,allowSizingOnChildren:o}),i&&(0,d.jsx)(Kl,{layout:e,onChange:t})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Fs}){const{minimumColumnWidth:s=null,columnCount:l=null,rowCount:a=null}=t;const c=n?.spacing?.blockGap&&!ks(o,"spacing","blockGap")?ul(n?.spacing?.blockGap,"0.5em"):void 0;let u="";const d=[];if(s&&l>0){const e=`max(${s}, ( 100% - (${c||"1.2rem"}*${l-1}) ) / ${l})`;d.push(`grid-template-columns: repeat(auto-fill, minmax(${e}, 1fr))`,"container-type: inline-size"),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)}else l?(d.push(`grid-template-columns: repeat(${l}, minmax(0, 1fr))`),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)):d.push(`grid-template-columns: repeat(auto-fill, minmax(min(${s||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return d.length&&(u=`${Hs(e)} { ${d.join("; ")}; }`),r&&c&&(u+=Us(e,i,"grid",c)),u},getOrientation:()=>"horizontal",getAlignments:()=>[]};function Kl({layout:e,onChange:t}){const{minimumColumnWidth:n,columnCount:o,isManualPlacement:r}=e,i=n||(r||o?null:"12rem"),[s,l="rem"]=(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(i);return(0,d.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:(0,T.__)("Minimum column width")}),(0,d.jsxs)(ws.Flex,{gap:4,children:[(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.__experimentalUnitControl,{size:"__unstable-large",onChange:n=>{t({...e,minimumColumnWidth:""===n?void 0:n})},onUnitChange:n=>{let o;["em","rem"].includes(n)&&"px"===l?o=(s/16).toFixed(2)+n:["em","rem"].includes(l)&&"px"===n&&(o=Math.round(16*s)+n),t({...e,minimumColumnWidth:o})},value:i,units:$l,min:0,label:(0,T.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:n=>{t({...e,minimumColumnWidth:[n,l].join("")})},value:s||0,min:0,max:Gl[l]||600,withInputField:!1,label:(0,T.__)("Minimum column width"),hideLabelFromVision:!0})})]})]})}function Zl({layout:e,onChange:t,allowSizingOnChildren:n}){const o=window.__experimentalEnableGridInteractivity?void 0:3,{columnCount:r=o,rowCount:i,isManualPlacement:s}=e;return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[(!window.__experimentalEnableGridInteractivity||!s)&&(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:(0,T.__)("Columns")}),(0,d.jsxs)(ws.Flex,{gap:4,children:[(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{if(window.__experimentalEnableGridInteractivity){const o=""===n||"0"===n?s?1:void 0:parseInt(n,10);t({...e,columnCount:o})}else{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,columnCount:o})}},value:r,min:1,label:(0,T.__)("Columns"),hideLabelFromVision:!window.__experimentalEnableGridInteractivity||!s})}),(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:window.__experimentalEnableGridInteractivity&&n&&s?(0,d.jsx)(ws.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,rowCount:o})},value:i,min:1,label:(0,T.__)("Rows")}):(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:r??1,onChange:n=>t({...e,columnCount:""===n||"0"===n?1:n}),min:1,max:16,withInputField:!1,label:(0,T.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function ql({layout:e,onChange:t}){const{columnCount:n,rowCount:o,minimumColumnWidth:r,isManualPlacement:i}=e,[s,l]=(0,h.useState)(n||3),[a,c]=(0,h.useState)(o),[u,p]=(0,h.useState)(r||"12rem"),g=i||n&&!window.__experimentalEnableGridInteractivity?"manual":"auto",m="manual"===g?(0,T.__)("Grid items can be manually placed in any position on the grid."):(0,T.__)("Grid items are placed automatically depending on their order.");return(0,d.jsxs)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Grid item position"),value:g,onChange:i=>{"manual"===i?p(r||"12rem"):(l(n||3),c(o)),t({...e,columnCount:"manual"===i?s:null,rowCount:"manual"===i&&window.__experimentalEnableGridInteractivity?a:void 0,isManualPlacement:!("manual"!==i||!window.__experimentalEnableGridInteractivity)||void 0,minimumColumnWidth:"auto"===i?u:null})},isBlock:!0,help:window.__experimentalEnableGridInteractivity?m:void 0,children:[(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"auto",label:(0,T.__)("Auto")},"auto"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"manual",label:(0,T.__)("Manual")},"manual")]})}const Yl=[Dl,Ml,Fl,Wl];function Xl(e="default"){return Yl.find((t=>t.name===e))}const Ql={type:"default"},Jl=(0,h.createContext)(Ql);Jl.displayName="BlockLayoutContext";const ea=Jl.Provider;function ta(){return(0,h.useContext)(Jl)}const na=[],oa=["none","left","center","right","wide","full"],ra=["wide","full"];function ia(e=oa){e.includes("none")||(e=["none",...e]);const t=1===e.length&&"none"===e[0],[n,o,r]=(0,g.useSelect)((e=>{if(t)return[!1,!1,!1];const n=e(ji).getSettings();return[n.alignWide??!1,n.supportsLayout,n.__unstableIsBlockBasedTheme]}),[t]),i=ta();if(t)return na;const s=Xl(i?.type);if(o){const t=s.getAlignments(i,r).filter((t=>e.includes(t.name)));return 1===t.length&&"none"===t[0].name?na:t}if("default"!==s.name&&"constrained"!==s.name)return na;const l=e.filter((e=>i.alignments?i.alignments.includes(e):!(!n&&ra.includes(e))&&oa.includes(e))).map((e=>({name:e})));return 1===l.length&&"none"===l[0].name?na:l}var sa=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})}),la=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})}),aa=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),ca=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});const ua={none:{icon:zl,title:(0,T._x)("None","Alignment option")},left:{icon:sa,title:(0,T.__)("Align left")},center:{icon:la,title:(0,T.__)("Align center")},right:{icon:aa,title:(0,T.__)("Align right")},wide:{icon:Vl,title:(0,T.__)("Wide width")},full:{icon:ca,title:(0,T.__)("Full width")}};var da=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const i=ia(n);if(!!!i.length)return null;function s(n){t([e,"none"].includes(n)?void 0:n)}const l=ua[e],a=ua.none,c=o?ws.ToolbarGroup:ws.ToolbarDropdownMenu,u={icon:l?l.icon:a.icon,label:(0,T.__)("Align")},p=o?{isCollapsed:r,controls:i.map((({name:t})=>({...ua[t],isActive:e===t||!e&&"none"===t,role:r?"menuitemradio":void 0,onClick:()=>s(t)})))}:{toggleProps:{description:(0,T.__)("Change alignment")},children:({onClose:t})=>(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ws.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map((({name:n,info:o})=>{const{icon:r,title:i}=ua[n],l=n===e||!e&&"none"===n;return(0,d.jsx)(ws.MenuItem,{icon:r,iconPosition:"left",className:ms("components-dropdown-menu__menu-item",{"is-active":l}),isSelected:l,onClick:()=>{s(n),t()},role:"menuitemradio",info:o,children:i},n)}))})})};return(0,d.jsx)(c,{...u,...p})};const pa=e=>(0,d.jsx)(da,{...e,isToolbar:!1}),ha=e=>(0,d.jsx)(da,{...e,isToolbar:!0});function ga(e){const t=C(),{clientId:n=""}=t,{setBlockEditingMode:o,unsetBlockEditingMode:r}=(0,g.useDispatch)(ji),i=(0,g.useSelect)((e=>n?null:e(ji).getBlockEditingMode()),[n]);return(0,h.useEffect)((()=>(e&&o(n,e),()=>{e&&r(n)})),[n,e,o,r]),n?t[v]:i}const ma=["left","center","right","wide","full"],fa=["wide","full"];function ba(e,t=!0,n=!0){let o;return o=Array.isArray(e)?ma.filter((t=>e.includes(t))):!0===e?[...ma]:[],!n||!0===e&&!t?o.filter((e=>!fa.includes(e))):o}var ka={shareWithChildBlocks:!0,edit:function({name:e,align:t,setAttributes:n}){const o=ia(ba((0,p.getBlockSupport)(e,"align"),(0,p.hasBlockSupport)(e,"alignWide",!0))).map((({name:e})=>e)),r=ga();return o.length&&"default"===r?(0,d.jsx)(Rs,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,d.jsx)(pa,{value:t,onChange:t=>{if(!t){const n=(0,p.getBlockType)(e),o=n?.attributes?.align?.default;o&&(t="")}n({align:t})},controls:o})}):null},useBlockProps:function({name:e,align:t}){const n=ba((0,p.getBlockSupport)(e,"align"),(0,p.hasBlockSupport)(e,"alignWide",!0));if(ia(n).some((e=>e.name===t)))return{"data-align":t};return{}},addSaveProps:function(e,t,n){const{align:o}=n,r=(0,p.getBlockSupport)(t,"align"),i=(0,p.hasBlockSupport)(t,"alignWide",!0);ba(r,i).includes(o)&&(e.className=ms(`align${o}`,e.className));return e},attributeKeys:["align"],hasSupport:e=>(0,p.hasBlockSupport)(e,"align",!1)};(0,f.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",(function(e){return"type"in(e.attributes?.align??{})||(0,p.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...ma,""]}}),e}));const va=(0,ws.createSlotFill)("InspectorControls"),_a=(0,ws.createSlotFill)("InspectorAdvancedControls"),ya=(0,ws.createSlotFill)("InspectorControlsBindings"),xa=(0,ws.createSlotFill)("InspectorControlsBackground"),Sa=(0,ws.createSlotFill)("InspectorControlsBorder"),wa=(0,ws.createSlotFill)("InspectorControlsColor"),Ca=(0,ws.createSlotFill)("InspectorControlsFilter"),Ba=(0,ws.createSlotFill)("InspectorControlsDimensions"),Ia=(0,ws.createSlotFill)("InspectorControlsPosition"),ja=(0,ws.createSlotFill)("InspectorControlsTypography"),Ea=(0,ws.createSlotFill)("InspectorControlsListView"),Ta=(0,ws.createSlotFill)("InspectorControlsStyles");var Ma={default:va,advanced:_a,background:xa,bindings:ya,border:Sa,color:wa,dimensions:Ba,effects:(0,ws.createSlotFill)("InspectorControlsEffects"),filter:Ca,list:Ea,position:Ia,settings:va,styles:Ta,typography:ja};const Pa=(0,ws.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));function Ra({children:e,group:t="default",__experimentalGroup:n,resetAllFilter:o}){n&&(I()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=n);const r=C(),i=Ma[t]?.Fill;return i?r[b]?(0,d.jsx)(ws.__experimentalStyleProvider,{document,children:(0,d.jsx)(i,{children:t=>(0,d.jsx)(Na,{fillProps:t,children:e,resetAllFilter:o})})}):null:(js()(`Unknown InspectorControls group "${t}" provided.`),null)}function Aa({resetAllFilter:e,children:t}){const{registerResetAllFilter:n,deregisterResetAllFilter:o}=(0,h.useContext)(ws.__experimentalToolsPanelContext);return(0,h.useEffect)((()=>{if(e&&n&&o)return n(e),()=>{o(e)}}),[e,n,o]),t}function Na({children:e,resetAllFilter:t,fillProps:n}){const{forwardedContext:o=[]}=n,r=(0,d.jsx)(Aa,{resetAllFilter:t,children:e});return o.reduce(((e,[t,n])=>(0,d.jsx)(t,{...n,children:e})),r)}function La({children:e,group:t,label:n}){const{updateBlockAttributes:o}=(0,g.useDispatch)(ji),{getBlockAttributes:r,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:l}=(0,g.useSelect)(ji),a=Ji(),c=s(),u=(0,h.useCallback)(((e=[])=>{const t={},n=l()?i():[c];n.forEach((n=>{const{style:o}=r(n);let i={style:o};e.forEach((e=>{i={...i,...e(i)}})),i={...i,style:fs(i.style)},t[n]=i})),o(n,t,!0)}),[r,i,l,c,o]);return(0,d.jsx)(ws.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:n,resetAll:u,panelId:c,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:a,children:e},c)}function Da({Slot:e,fillProps:t,...n}){const o=(0,h.useContext)(ws.__experimentalToolsPanelContext),r=(0,h.useMemo)((()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[ws.__experimentalToolsPanelContext.Provider,{value:o}]]})),[o,t]);return(0,d.jsx)(e,{...n,fillProps:r,bubblesVirtually:!0})}function Oa({__experimentalGroup:e,group:t="default",label:n,fillProps:o,...r}){e&&(I()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);const i=Ma[t],s=(0,ws.__experimentalUseSlotFills)(i?.name);if(!i)return js()(`Unknown InspectorControls group "${t}" provided.`),null;if(!s?.length)return null;const{Slot:l}=i;return n?(0,d.jsx)(La,{group:t,label:n,children:(0,d.jsx)(Da,{...r,fillProps:o,Slot:l})}):(0,d.jsx)(l,{...r,fillProps:o,bubblesVirtually:!0})}const za=Ra;za.Slot=Oa;const Va=e=>(0,d.jsx)(Ra,{...e,group:"advanced"});Va.Slot=e=>(0,d.jsx)(Oa,{...e,group:"advanced"}),Va.slotName="InspectorAdvancedControls";var Fa=za,Ha=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7 11.5h10V13H7z"})});const Ua=window.wp.url,Ga=window.wp.dom,$a=window.wp.blob,Wa=window.wp.keycodes;var Ka=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,d.jsx)(ue.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"})]}),Za=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),qa=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})});var Ya=(0,ws.withFilters)("editor.MediaUpload")((()=>null));var Xa=function({fallback:e=null,children:t}){const n=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return!!t().mediaUpload}),[]);return n?t:e};const Qa=window.wp.isShallowEqual;var Ja=n.n(Qa),ec=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),tc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})}),nc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),oc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var rc=function e({children:t,settingsOpen:n,setSettingsOpen:o}){const r=(0,m.useReducedMotion)(),i=r?h.Fragment:ws.__unstableAnimatePresence,s=r?"div":ws.__unstableMotion.div,l=`link-control-settings-drawer-${(0,m.useInstanceId)(e)}`;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":n,onClick:()=>o(!n),icon:(0,T.isRTL)()?nc:oc,"aria-controls":l,children:(0,T._x)("Advanced","Additional link settings")}),(0,d.jsx)(i,{children:n&&(0,d.jsx)(s,{className:"block-editor-link-control__drawer",hidden:!n,id:l,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1},children:(0,d.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:t})})})]})},ic=n(1609);function sc(e){return"function"==typeof e}class lc extends h.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,h.createRef)(),this.inputRef=e.inputRef||(0,h.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.suggestionNodes[n].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),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,Ua.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,T.sprintf)((0,T._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,T.__)("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)}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 Wa.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case Wa.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case Wa.ENTER:this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e))}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Wa.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case Wa.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case Wa.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak((0,T.__)("Link selected.")));break;case Wa.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,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 i=r;const s=e&&e.length;return o||s||(i=!1),!0===n&&(i=!1),{showSuggestions:i,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,d.jsxs)(d.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){const{label:e=null,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,T.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:l=!1,help:a=null,disabled:c=!1}=this.props,{loading:u,showSuggestions:p,selectedSuggestion:h,suggestionsListboxId:g,suggestionOptionIdPrefix:m}=this.state,f=`url-input-control-${o}`,b={id:f,label:e,className:ms("block-editor-url-input",t,{"is-full-width":n}),hideLabelFromVision:l},k={id:f,value:s,required:!0,type:"text",onChange:c?()=>{}:this.onChange,onFocus:c?()=>{}:this.onFocus,placeholder:r,onKeyDown:c?()=>{}:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,T.__)("URL"),"aria-expanded":p,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":null!==h?`${m}-${h}`:void 0,ref:this.inputRef,disabled:c,suffix:this.props.suffix,help:a};return i?i(b,k,u):(0,d.jsxs)(ws.BaseControl,{__nextHasNoMarginBottom:!0,...b,children:[(0,d.jsx)(ws.__experimentalInputControl,{...k,__next40pxDefaultSize:!0}),u&&(0,d.jsx)(ws.Spinner,{})]})}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:o,suggestionsValue:r,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:l,loading:a}=this.state;if(!n||0===o.length)return null;const c={id:s,ref:this.autocompleteRef,role:"listbox"},u=(e,t)=>({role:"option",tabIndex:"-1",id:`${l}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===i||void 0});return sc(t)?t({suggestions:o,selectedSuggestion:i,suggestionsListProps:c,buildSuggestionItemProps:u,isLoading:a,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!r?.length,currentInputValue:r}):(0,d.jsx)(ws.Popover,{placement:"bottom",focusOnMount:!1,children:(0,d.jsx)("div",{...c,className:ms("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:o.map(((e,t)=>(0,ic.createElement)(ws.Button,{__next40pxDefaultSize:!0,...u(0,t),key:e.id,className:ms("block-editor-url-input__suggestion",{"is-selected":t===i}),onClick:()=>this.handleOnClick(e)},e.title)))})})}}var ac=(0,m.compose)(m.withSafeTimeout,ws.withSpokenMessages,m.withInstanceId,(0,g.withSelect)(((e,t)=>{if(sc(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(ji);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(lc),cc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var uc=({searchTerm:e,onClick:t,itemProps:n,buttonText:o})=>{if(!e)return null;let r;return r=o?"function"==typeof o?o(e):o:(0,h.createInterpolateElement)((0,T.sprintf)((0,T.__)("Create: %s"),e),{mark:(0,d.jsx)("mark",{})}),(0,d.jsx)(ws.MenuItem,{...n,iconPosition:"left",icon:cc,className:"block-editor-link-control__search-item",onClick:t,children:r})},dc=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.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"})}),pc=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,d.jsx)(ue.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"})]}),hc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),gc=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.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"})}),mc=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.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"})}),fc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})}),bc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),kc=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.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"})});const vc={post:{icon:dc,label:(0,T.__)("Post")},page:{icon:pc,label:(0,T.__)("Page")},post_tag:{icon:hc,label:(0,T.__)("Tag")},category:{icon:gc,label:(0,T.__)("Category")},attachment:{icon:mc,label:(0,T.__)("Attachment")}};function _c({isURL:e,suggestion:t}){let n=null;return e?n=fc:t.type in vc&&(n=vc[t.type].icon,"page"===t.type&&(t.isFrontPage&&(n=bc),t.isBlogHome&&(n=kc))),n?(0,d.jsx)(Ol,{className:"block-editor-link-control__search-item-icon",icon:n}):null}function yc(e){const t=e?.trim();return t?.length?e?.replace(/^\/?/,"/"):e}function xc(e){const t=e?.trim();return t?.length?e?.replace(/\/$/,""):e}const Sc=({itemProps:e,suggestion:t,searchTerm:n,onClick:o,isURL:r=!1,shouldShowType:i=!1})=>{const s=r?(0,T.__)("Press ENTER to add this link"):(l=t.url)?(0,m.pipe)(Ua.safeDecodeURI,Ua.getPath,(e=>t=>null==t||t!=t?e:t)(""),((e,...t)=>(...n)=>e(...n,...t))(Ua.filterURLForDisplay,24),xc,yc)(l):l;var l;return(0,d.jsx)(ws.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,d.jsx)(_c,{suggestion:t,isURL:r}),onClick:o,shortcut:i&&wc(t),className:"block-editor-link-control__search-item",children:(0,d.jsx)(ws.TextHighlight,{text:(0,Ga.__unstableStripHTML)(t.title),highlight:n})})};function wc(e){return e.isFrontPage?(0,T.__)("Front page"):e.isBlogHome?(0,T.__)("Blog home"):e.type in vc?vc[e.type].label:e.type}var Cc=Sc;const Bc=e=>(I()("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,d.jsx)(Sc,{...e})),Ic="__CREATE__",jc="link",Ec="mailto",Tc="internal",Mc=[jc,Ec,"tel",Tc],Pc=[{id:"opensInNewTab",title:(0,T.__)("Open in new tab")}];function Rc({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:n,suggestionsListProps:o,buildSuggestionItemProps:r,suggestions:i,selectedSuggestion:s,isLoading:l,isInitialSuggestions:a,createSuggestionButtonText:c,suggestionsQuery:u}){const p=ms("block-editor-link-control__search-results",{"is-loading":l}),h=1===i.length&&Mc.includes(i[0].type),g=e&&!h&&!a,m=!u?.type,f=a?(0,T.__)("Suggestions"):(0,T.sprintf)((0,T.__)('Search results for "%s"'),t);return(0,d.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,d.jsx)("div",{...o,className:p,"aria-label":f,children:(0,d.jsx)(ws.MenuGroup,{children:i.map(((e,o)=>g&&Ic===e.type?(0,d.jsx)(uc,{searchTerm:t,buttonText:c,onClick:()=>n(e),itemProps:r(e,o),isSelected:o===s},e.type):Ic===e.type?null:(0,d.jsx)(Cc,{itemProps:r(e,o),suggestion:e,index:o,onClick:()=>{n(e)},isSelected:o===s,isURL:Mc.includes(e.type),searchTerm:t,shouldShowType:m,isFrontPage:e?.isFrontPage,isBlogHome:e?.isBlogHome},`${e.id}-${e.type}`)))})})})}var Ac=Rc;const Nc=e=>(I()("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,d.jsx)(Rc,{...e}));function Lc(e){if(e.includes(" "))return!1;const t=(0,Ua.getProtocol)(e),n=(0,Ua.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."),i=e?.startsWith("#")&&(0,Ua.isValidFragment)(e);return n||r||i||o}const Dc=()=>Promise.resolve([]),Oc=e=>{let t=jc;const n=(0,Ua.getProtocol)(e)||"";return n.includes("mailto")&&(t=Ec),n.includes("tel")&&(t="tel"),e?.startsWith("#")&&(t=Tc),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,Ua.prependHTTP)(e):e,type:t}])};function zc(e,t,n){const{fetchSearchSuggestions:o,pageOnFront:r,pageForPosts:i}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return{pageOnFront:t().pageOnFront,pageForPosts:t().pageForPosts,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),s=t?Oc:Dc;return(0,h.useCallback)(((t,{isInitialSuggestions:l})=>Lc(t)?s(t,{isInitialSuggestions:l}):(async(e,t,n,o,r,i)=>{const{isInitialSuggestions:s}=t,l=await n(e,t);return l.map((e=>Number(e.id)===r?(e.isFrontPage=!0,e):Number(e.id)===i?(e.isBlogHome=!0,e):e)),s||Lc(e)||!o?l:l.concat({title:e,url:e,type:Ic})})(t,{...e,isInitialSuggestions:l},o,n,r,i)),[s,o,r,i,e,n])}const Vc=()=>Promise.resolve([]),Fc=()=>{},Hc=(0,h.forwardRef)((({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=Fc,onChange:l=Fc,onSelect:a=Fc,showSuggestions:c=!0,renderSuggestions:u=e=>(0,d.jsx)(Ac,{...e}),fetchSuggestions:p=null,allowDirectEntry:g=!0,showInitialSuggestions:m=!1,suggestionsQuery:f={},withURLSuggestion:b=!0,createSuggestionButtonText:k,hideLabelFromVision:v=!1,suffix:_,isEntity:y=!1},x)=>{const S=zc(f,g,i),w=c?p||S:Vc,[C,B]=(0,h.useState)(),I=async e=>{let t=e;if(Ic!==e.type){if(g||t&&Object.keys(t).length>=1){const{id:e,url:o,...r}=n??{};a({...r,...t},t)}}else try{t=await s(e.title),t?.url&&a(t)}catch(e){}},j=r??(0,T.__)("Search or type URL"),E=v&&""!==r?j:(0,T.__)("Link");return(0,d.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,d.jsx)(ac,{disableSuggestions:n?.url===e,label:E,hideLabelFromVision:v,className:o,value:e,onChange:(e,t)=>{l(e),B(t)},placeholder:j,__experimentalRenderSuggestions:c?e=>u({...e,withCreateSuggestion:i,createSuggestionButtonText:k,suggestionsQuery:f,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),I(t)}}):null,__experimentalFetchLinkSuggestions:w,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:m,onSubmit:(t,n)=>{const o=t||C;o||e?.trim()?.length?I(o||{url:e}):n.preventDefault()},inputRef:x,suffix:_,disabled:y}),t]})}));var Uc=Hc;const Gc=e=>(I()("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,d.jsx)(Hc,{...e}));var $c=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})}),Wc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),Kc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});const{Slot:Zc,Fill:qc}=(0,ws.createSlotFill)("BlockEditorLinkControlViewer");function Yc(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}`)}}var Xc=function(e){const[t,n]=(0,h.useReducer)(Yc,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,h.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 Qc({value:e,onEditClick:t,hasRichPreviews:n=!1,hasUnlinkControl:o=!1,onRemove:r}){const i=(0,g.useSelect)((e=>e(hr.store).get("core","showIconLabels")),[]),s=n?e?.url:null,{richData:l,isFetching:a}=Xc(s),c=l&&Object.keys(l).length,u=e&&(0,Ua.filterURLForDisplay)((0,Ua.safeDecodeURI)(e.url),24)||"",p=!e?.url?.length,h=!p&&(0,Ga.__unstableStripHTML)(l?.title||e?.title||u),f=!e?.url||h.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"")===u;let b;b=l?.icon?(0,d.jsx)("img",{src:l?.icon,alt:""}):p?(0,d.jsx)(Ol,{icon:$c,size:32}):(0,d.jsx)(Ol,{icon:fc});const{createNotice:k}=(0,g.useDispatch)(pr.store),v=(0,m.useCopyToClipboard)(e.url,(()=>{k("info",(0,T.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,d.jsx)("div",{role:"group","aria-label":(0,T.__)("Manage link"),className:ms("block-editor-link-control__search-item",{"is-current":!0,"is-rich":c,"is-fetching":!!a,"is-preview":!0,"is-error":p,"is-url-title":h===u}),children:(0,d.jsxs)("div",{className:"block-editor-link-control__search-item-top",children:[(0,d.jsxs)("span",{className:"block-editor-link-control__search-item-header",role:"figure","aria-label":(0,T.__)("Link information"),children:[(0,d.jsx)("span",{className:ms("block-editor-link-control__search-item-icon",{"is-image":l?.icon}),children:b}),(0,d.jsx)("span",{className:"block-editor-link-control__search-item-details",children:p?(0,d.jsx)("span",{className:"block-editor-link-control__search-item-error-notice",children:(0,T.__)("Link is empty")}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url,children:(0,d.jsx)(ws.__experimentalTruncate,{numberOfLines:1,children:h})}),!f&&(0,d.jsx)("span",{className:"block-editor-link-control__search-item-info",children:(0,d.jsx)(ws.__experimentalTruncate,{numberOfLines:1,children:u})})]})})]}),(0,d.jsx)(ws.Button,{icon:Wc,label:(0,T.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),o&&(0,d.jsx)(ws.Button,{icon:ec,label:(0,T.__)("Remove link"),onClick:r,size:"compact",showTooltip:!i}),(0,d.jsx)(ws.Button,{icon:Kc,label:(0,T.__)("Copy link"),ref:v,accessibleWhenDisabled:!0,disabled:p,size:"compact",showTooltip:!i}),(0,d.jsx)(Zc,{fillProps:e})]})})}const Jc=()=>{};var eu=({value:e,onChange:t=Jc,settings:n})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map((n=>{if("render"in n){if("function"==typeof n.render){const o=n.render(n,e,t);return(0,d.jsx)("div",{className:"block-editor-link-control__setting",children:o},n.id)}return null}return(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-link-control__setting",label:n.title,onChange:o(n),checked:!!e&&!!e[n.id],help:n?.help},n.id)})).filter(Boolean);return(0,d.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,d.jsx)(ws.VisuallyHidden,{as:"legend",children:(0,T.__)("Currently selected link settings")}),r]})};const tu=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 nu=n(5215),ou=n.n(nu);const ru=()=>{},iu="core/block-editor",su="linkControlSettingsDrawer";function lu({searchInputPlaceholder:e,value:t,settings:n=Pc,onChange:o=ru,onRemove:r,onCancel:i,noDirectEntry:s=!1,showSuggestions:l=!0,showInitialSuggestions:a,forceIsEditingLink:c,createSuggestion:u,withCreateSuggestion:p,inputValue:f="",suggestionsQuery:b={},noURLSuggestion:k=!1,createSuggestionButtonText:v,hasRichPreviews:_=!1,hasTextControl:y=!1,renderControlBottom:x=null,handleEntities:S=!1}){void 0===p&&u&&(p=!0);const[w,C]=(0,h.useState)(!1),{advancedSettingsPreference:B}=(0,g.useSelect)((e=>({advancedSettingsPreference:e(hr.store).get(iu,su)??!1})),[]),{set:I}=(0,g.useDispatch)(hr.store),j=B||w,E=(0,h.useRef)(!0),M=(0,h.useRef)(),P=(0,h.useRef)(),R=(0,h.useRef)(),A=(0,h.useRef)(!1),N=n.map((({id:e})=>e)),[L,D,O,z,V]=function(e){const[t,n]=(0,h.useState)(e||{}),[o,r]=(0,h.useState)(e);return ou()(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),F=S&&!!L?.id,H=(0,m.useInstanceId)(lu,"link-control"),U=F?`${H}__help`:null,G=t&&!(0,Qa.isShallowEqualObjects)(L,t),[$,W]=(0,h.useState)(void 0!==c?c:!t||!t.url),{createPage:K,isCreatingPage:Z,errorMessage:q}=function(e){const t=(0,h.useRef)(),[n,o]=(0,h.useState)(!1),[r,i]=(0,h.useState)(null);return(0,h.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),i(null);try{return t.current=tu(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||(0,T.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(u);(0,h.useEffect)((()=>{void 0!==c&&W(c)}),[c]),(0,h.useEffect)((()=>{if(E.current)return;(Ga.focus.focusable.find(M.current)[0]||M.current).focus(),A.current=!1}),[$,Z]),(0,h.useEffect)((()=>(E.current=!1,()=>{E.current=!0})),[]);const Y=t?.url?.trim()?.length>0,X=()=>{A.current=!!M.current?.contains(M.current.ownerDocument.activeElement),W(!1)},Q=()=>{G&&o({...t,...L,url:te}),X()},[J,ee]=(0,h.useState)(!1);(0,h.useEffect)((()=>{J&&(R.current?.focus(),ee(!1))}),[J]);const te=f||L?.url||"",ne=!te?.trim()?.length,oe=r&&t&&!$&&!Z,re=$&&Y,ie=Y&&y,se=($||!t)&&!Z,le=!G||ne,ae=!!n?.length&&$&&Y;return(0,d.jsxs)("div",{tabIndex:-1,ref:M,className:"block-editor-link-control",children:[Z&&(0,d.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,d.jsx)(ws.Spinner,{})," ",(0,T.__)("Creating"),"…"]}),se&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:ms({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":ie,"has-actions":re}),children:[ie&&(0,d.jsx)(ws.TextControl,{__nextHasNoMarginBottom:!0,ref:P,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,T.__)("Text"),value:L?.title,onChange:z,onKeyDown:e=>{const{keyCode:t}=e;t!==Wa.ENTER||ne||(e.preventDefault(),Q())},__next40pxDefaultSize:!0}),(0,d.jsx)(Uc,{ref:R,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:te,withCreateSuggestion:p,onCreateSuggestion:K,onChange:O,onSelect:e=>{const t=Object.keys(e).reduce(((t,n)=>(N.includes(n)||(t[n]=e[n]),t)),{});o({...L,...t,title:L?.title||e?.title}),X()},showInitialSuggestions:a,allowDirectEntry:!s,showSuggestions:l,suggestionsQuery:b,withURLSuggestion:!k,createSuggestionButtonText:v,hideLabelFromVision:!ie,isEntity:F,suffix:(0,d.jsx)(au,{isEntity:F,showActions:re,isDisabled:le,onUnlink:()=>{const{id:e,kind:t,type:n,...o}=L;D({...o,id:void 0,kind:void 0,type:void 0,url:void 0}),ee(!0)},onSubmit:Q,helpTextId:U})}),F&&U&&(0,d.jsx)("p",{id:U,className:"block-editor-link-control__help",children:(0,T.sprintf)((0,T.__)("Synced with the selected %s."),L?.type||"item")})]}),q&&(0,d.jsx)(ws.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:q})]}),t&&!$&&!Z&&(0,d.jsx)(Qc,{value:t,onEditClick:()=>W(!0),hasRichPreviews:_,hasUnlinkControl:oe,onRemove:()=>{r(),W(!0)}},t?.url),ae&&(0,d.jsx)("div",{className:"block-editor-link-control__tools",children:!ne&&(0,d.jsx)(rc,{settingsOpen:j,setSettingsOpen:e=>{I&&I(iu,su,e),C(e)},children:(0,d.jsx)(eu,{value:L,settings:n,onChange:V(N)})})}),re&&(0,d.jsxs)(ws.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),D(t),Y?X():r?.(),i?.()},children:(0,T.__)("Cancel")}),(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:le?ru:Q,className:"block-editor-link-control__search-submit","aria-disabled":le,children:(0,T.__)("Apply")})]}),!Z&&x&&x()]})}function au({isEntity:e,showActions:t,isDisabled:n,onUnlink:o,onSubmit:r,helpTextId:i}){return e?(0,d.jsx)(ws.Button,{icon:ec,onClick:o,"aria-describedby":i,showTooltip:!0,label:(0,T.__)("Unsync and edit"),__next40pxDefaultSize:!0}):t?void 0:(0,d.jsx)(ws.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,d.jsx)(ws.Button,{onClick:n?ru:r,label:(0,T.__)("Submit"),icon:tc,className:"block-editor-link-control__search-submit","aria-disabled":n,size:"small"})})}lu.ViewerFill=qc,lu.DEFAULT_LINK_SETTINGS=Pc;const cu=e=>(I()("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,d.jsx)(lu,{...e}));cu.ViewerFill=lu.ViewerFill,cu.DEFAULT_LINK_SETTINGS=lu.DEFAULT_LINK_SETTINGS;var uu=lu;const du=()=>{};let pu=0;var hu=(0,m.compose)([(0,g.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(pr.store);return{createNotice:t,removeNotice:n}})),(0,ws.withFilters)("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,mediaIds:n,allowedTypes:o,accept:r,onError:i,onSelect:s,onSelectURL:l,onReset:a,onToggleFeaturedImage:c,useFeaturedImage:u,onFilesUpload:p=du,name:h=(0,T.__)("Replace"),createNotice:m,removeNotice:f,children:b,multiple:k=!1,addToGallery:v,handleUpload:_=!0,popoverProps:y,renderToggle:x})=>{const{getSettings:S}=(0,g.useSelect)(ji),w="block-editor/media-replace-flow/error-notice/"+ ++pu,C=e=>{const t=(0,Ga.__unstableStripHTML)(e);i?i(t):setTimeout((()=>{m("error",t,{speak:!0,id:w,isDismissible:!0})}),1e3)},B=(e,t)=>{u&&c&&c(),t(),s(e),(0,Uo.speak)((0,T.__)("The media file has been replaced")),f(w)},I=e=>{e.keyCode===Wa.DOWN&&(e.preventDefault(),e.target.click())},j=k&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,d.jsx)(ws.Dropdown,{popoverProps:y,contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>x?x({"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:I,children:h}):(0,d.jsx)(ws.ToolbarButton,{"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:I,children:h}),renderContent:({onClose:i})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,d.jsxs)(Xa,{children:[(0,d.jsx)(Ya,{gallery:j,addToGallery:v,multiple:k,value:k?n:t,onSelect:e=>B(e,i),allowedTypes:o,render:({open:e})=>(0,d.jsx)(ws.MenuItem,{icon:Ka,onClick:e,children:(0,T.__)("Open Media Library")})}),(0,d.jsx)(ws.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!_)return t(),s(n);p(n),S().mediaUpload({allowedTypes:o,filesList:n,onFileChange:([e])=>{B(e,t)},onError:C})})(e,i)},accept:r,multiple:!!k,render:({openFileDialog:e})=>(0,d.jsx)(ws.MenuItem,{icon:Za,onClick:()=>{e()},children:(0,T._x)("Upload","verb")})})]}),c&&(0,d.jsx)(ws.MenuItem,{icon:qa,onClick:c,isPressed:u,children:(0,T.__)("Use featured image")}),e&&a&&(0,d.jsx)(ws.MenuItem,{onClick:()=>{a(),i()},children:(0,T.__)("Reset")}),"function"==typeof b?b({onClose:i}):b]}),l&&(0,d.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,d.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,T.__)("Current media URL:")}),(0,d.jsx)(uu,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:e})=>{l(e)},searchInputPlaceholder:(0,T.__)("Paste or type URL")})]})]})})}));const gu="image",mu={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},fu=()=>{},bu=e=>{window.requestAnimationFrame((()=>{const[t]=Ga.focus.tabbable.find(e?.current);t&&t.focus()}))};const ku=e=>{if(!e||isNaN(e.x)&&isNaN(e.y))return;return`${100*(isNaN(e.x)?.5:e.x)}% ${100*(isNaN(e.y)?.5:e.y)}%`},vu=e=>{if(!e)return{x:void 0,y:void 0};let[t,n]=e.split(" ").map((e=>parseFloat(e)/100));return t=isNaN(t)?void 0:t,n=isNaN(n)?t:n,{x:t,y:n}};function _u({as:e="span",imgUrl:t,toggleProps:n={},filename:o,label:r,onToggleCallback:i=fu}){const{isOpen:s,...l}=n;(0,h.useEffect)((()=>{void 0!==s&&i(s)}),[s,i]);const a=()=>(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",as:"span",className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[t&&(0,d.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator-wrapper","aria-hidden":!0,children:(0,d.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:`url(${t})`}})}),(0,d.jsxs)(ws.FlexItem,{as:"span",style:t?{}:{flexGrow:1},children:[(0,d.jsx)(ws.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:r}),(0,d.jsx)(ws.VisuallyHidden,{as:"span",children:t?(0,T.sprintf)((0,T.__)("Background image: %s"),o||r):(0,T.__)("No background image selected")})]})]});return"button"===e?(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...l,children:a()}):a()}function yu({label:e,filename:t,url:n,children:o,onToggle:r=fu,hasImageValue:i,onReset:s,containerRef:l}){if(!i)return;const a=e||(0,Ua.getFilename)(n)||(0,T.__)("Add background image");return(0,d.jsx)(ws.Dropdown,{popoverProps:mu,renderToggle:({onToggle:e,isOpen:o})=>{const i={onClick:e,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":o,"aria-label":(0,T.__)("Background size, position and repeat options."),isOpen:o};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(_u,{imgUrl:n,filename:t,label:a,toggleProps:i,as:"button",onToggleCallback:r}),s&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,label:(0,T.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:Ha,onClick:()=>{s(),o&&e(),bu(l)}})]})},renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:o})})}function xu(){return(0,d.jsx)(ws.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,d.jsx)(ws.Spinner,{})})}function Su({onChange:e,style:t,inheritedValue:n,onRemoveImage:o=fu,onResetImage:r=fu,displayInPanel:i,defaultValues:s,containerRef:l}){const[a,c]=(0,h.useState)(!1),{getSettings:u}=(0,g.useSelect)(ji),{id:p,title:m,url:f}=t?.background?.backgroundImage||{...n?.background?.backgroundImage},{createErrorNotice:b}=(0,g.useDispatch)(pr.store),k=e=>{b(e,{type:"snackbar"}),c(!1)},v=n=>{if(!n||!n.url)return e(me(t,["background","backgroundImage"],void 0)),void c(!1);if((0,$a.isBlobURL)(n.url))return void c(!0);if(n.media_type&&n.media_type!==gu||!n.media_type&&n.type&&n.type!==gu)return void k((0,T.__)("Only images can be used as a background image."));const o=t?.background?.backgroundSize||s?.backgroundSize,r=t?.background?.backgroundPosition;e(me(t,["background"],{...t?.background,backgroundImage:{url:n.url,id:n.id,source:"file",title:n.title||void 0},backgroundPosition:r||"auto"!==o&&o?r:"50% 0",backgroundSize:o})),c(!1),bu(l)},_=ju(t),y=!_&&ju(n),x=m||(0,Ua.getFilename)(f)||(0,T.__)("Add background image");return(0,d.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[a&&(0,d.jsx)(xu,{}),(0,d.jsx)(hu,{mediaId:p,mediaURL:f,allowedTypes:[gu],accept:"image/*",onSelect:v,popoverProps:{className:ms({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,d.jsx)(_u,{imgUrl:f,filename:m,label:x}),renderToggle:e=>(0,d.jsx)(ws.Button,{...e,__next40pxDefaultSize:!0}),onError:k,onReset:()=>{bu(l),r()},children:y&&(0,d.jsx)(ws.MenuItem,{onClick:()=>{bu(l),e(me(t,["background"],{backgroundImage:"none"})),o()},children:(0,T.__)("Remove")})}),(0,d.jsx)(ws.DropZone,{onFilesDrop:e=>{u().mediaUpload({allowedTypes:[gu],filesList:e,onFileChange([e]){v(e)},onError:k,multiple:!1})},label:(0,T.__)("Drop to upload")})]})}function wu({onChange:e,style:t,inheritedValue:n,defaultValues:o}){const r=t?.background?.backgroundSize||n?.background?.backgroundSize,i=t?.background?.backgroundRepeat||n?.background?.backgroundRepeat,s=t?.background?.backgroundImage?.url||n?.background?.backgroundImage?.url,l=t?.background?.backgroundImage?.id,a=t?.background?.backgroundPosition||n?.background?.backgroundPosition,c=t?.background?.backgroundAttachment||n?.background?.backgroundAttachment;let u=!r&&l?o?.backgroundSize:r||"auto";u=["cover","contain","auto"].includes(u)?u:"auto";const p=!("no-repeat"===i||"cover"===u&&void 0===i),h=n=>{let o=i,r=a;"contain"===n&&(o="no-repeat",r=void 0),"cover"===n&&(o=void 0,r=void 0),"cover"!==u&&"contain"!==u||"auto"!==n||(o=void 0,t?.background?.backgroundImage?.id&&(r="50% 0")),n||"auto"!==u||(n="auto"),e(me(t,["background"],{...t?.background,backgroundPosition:r,backgroundRepeat:o,backgroundSize:n}))},g=!a&&l&&"contain"===r?o?.backgroundPosition:a;return(0,d.jsxs)(ws.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,d.jsx)(ws.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Focal point"),url:s,value:vu(g),onChange:n=>{e(me(t,["background","backgroundPosition"],ku(n)))}}),(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Fixed background"),checked:"fixed"===c,onChange:()=>e(me(t,["background","backgroundAttachment"],"fixed"===c?"scroll":"fixed"))}),(0,d.jsxs)(ws.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:(0,T.__)("Size"),value:u,onChange:h,isBlock:!0,help:(m=r||o?.backgroundSize,"cover"===m||void 0===m?(0,T.__)("Image covers the space evenly."):"contain"===m?(0,T.__)("Image is contained without distortion."):(0,T.__)("Image has a fixed width.")),children:[(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"cover",label:(0,T._x)("Cover","Size option for background image control")},"cover"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"contain",label:(0,T._x)("Contain","Size option for background image control")},"contain"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"auto",label:(0,T._x)("Tile","Size option for background image control")},"tile")]}),(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,d.jsx)(ws.__experimentalUnitControl,{"aria-label":(0,T.__)("Background image width"),onChange:h,value:r,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,T.__)("Auto"),disabled:"auto"!==u||void 0===u}),(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Repeat"),checked:p,onChange:()=>e(me(t,["background","backgroundRepeat"],!0===p?"no-repeat":"repeat")),disabled:"cover"===u})]})]});var m}function Cu({value:e,onChange:t,inheritedValue:n=e,settings:o,defaultValues:r={}}){const{globalStyles:i,_links:s}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji),n=t();return{globalStyles:n[N],_links:n[L]}}),[]),l=(0,h.useMemo)((()=>{const e={background:{}};return n?.background?(Object.entries(n?.background).forEach((([t,n])=>{e.background[t]=rs(n,{styles:i,_links:s})})),e):n}),[i,s,n]),a=()=>t(me(e,["background"],{})),{title:c,url:u}=e?.background?.backgroundImage||{...l?.background?.backgroundImage},p=ju(e)||ju(l),m=p&&"none"!==(e?.background?.backgroundImage||n?.background?.backgroundImage)&&(o?.background?.backgroundSize||o?.background?.backgroundPosition||o?.background?.backgroundRepeat),[f,b]=(0,h.useState)(!1),k=(0,h.useRef)();return(0,d.jsx)("div",{ref:k,className:ms("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":f}),children:m?(0,d.jsx)(yu,{label:c,filename:c,url:u,onToggle:b,hasImageValue:p,onReset:a,containerRef:k,children:(0,d.jsxs)(ws.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,d.jsx)(Su,{onChange:t,style:e,inheritedValue:l,displayInPanel:!0,onResetImage:()=>{b(!1),a()},onRemoveImage:()=>b(!1),defaultValues:r,containerRef:k}),(0,d.jsx)(wu,{onChange:t,style:e,defaultValues:r,inheritedValue:l})]})}):(0,d.jsx)(Su,{onChange:t,style:e,inheritedValue:l,defaultValues:r,onResetImage:()=>{b(!1),a()},onRemoveImage:()=>b(!1),containerRef:k})})}const Bu={backgroundImage:!0};function Iu(e){return"web"===h.Platform.OS&&e?.background?.backgroundImage}function ju(e){return!!e?.background?.backgroundImage?.id||"string"==typeof e?.background?.backgroundImage||!!e?.background?.backgroundImage?.url}function Eu({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,headerLabel:i}){const s=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}function Tu({as:e=Eu,value:t,onChange:n,inheritedValue:o,settings:r,panelId:i,defaultControls:s=Bu,defaultValues:l={},headerLabel:a=(0,T.__)("Background image")}){const c=Iu(r),u=(0,h.useCallback)((e=>({...e,background:{}})),[]);return(0,d.jsx)(e,{resetAllFilter:u,value:t,onChange:n,panelId:i,headerLabel:a,children:c&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,T.__)("Image"),onDeselect:()=>n(me(t,["background"],{})),isShownByDefault:s.backgroundImage,panelId:i,children:(0,d.jsx)(Cu,{value:t,onChange:n,settings:r,inheritedValue:o,defaultControls:s,defaultValues:l})})})}const Mu="background",Pu={backgroundSize:"cover",backgroundPosition:"50% 50%"};function Ru(e,t="any"){const n=(0,p.getBlockSupport)(e,Mu);return!0===n||("any"===t?!!n?.backgroundImage||!!n?.backgroundSize||!!n?.backgroundRepeat:!!n?.[t])}function Au(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:Pu.backgroundSize}),"contain"!==e?.backgroundSize||e?.backgroundPosition||(t={backgroundPosition:Pu.backgroundPosition}),t}function Nu(e){return ju(e)?"has-background":""}function Lu({children:e}){const t=(0,h.useCallback)((e=>({...e,style:{...e.style,background:void 0}})),[]);return(0,d.jsx)(Fa,{group:"background",resetAllFilter:t,children:e})}function Du({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,inheritedValue:i}=(0,g.useSelect)((n=>{const{getBlockAttributes:o,getSettings:r}=n(ji),i=r();return{style:o(e)?.style,inheritedValue:i[N]?.blocks?.[t]}}),[e,t]);if(!Iu(o)||!Ru(t,"backgroundImage"))return null;const s={...o,background:{...o.background,backgroundSize:o?.background?.backgroundSize&&Ru(t,"backgroundSize")}},l=(0,p.getBlockSupport)(t,[Mu,"defaultControls"]);return(0,d.jsx)(Tu,{inheritedValue:i,as:Lu,panelId:e,defaultValues:Pu,settings:s,onChange:e=>{n({style:fs(e)})},defaultControls:l,value:r})}var Ou={useBlockProps:function({name:e,style:t}){if(!Ru(e)||!t?.background?.backgroundImage)return;const n=Au(t?.background);return n?{style:{...n}}:void 0},attributeKeys:["style"],hasSupport:Ru};(0,f.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));var zu=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});var Vu=(0,h.memo)((function({icon:e,showColors:t=!1,className:n,context:o}){"block-default"===e?.src&&(e={src:zu});const r=(0,d.jsx)(ws.Icon,{icon:e&&e.src?e.src:e,context:o}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,d.jsx)("span",{style:i,className:ms("block-editor-block-icon",n,{"has-colors":t}),children:r})}));var Fu=function({blockTypes:e,value:t,onItemChange:n}){return(0,d.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map((e=>(0,d.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,label:e.title,checked:t.includes(e.name),onChange:(...t)=>n(e,...t)}),(0,d.jsx)(Vu,{icon:e.icon})]},e.name)))})};var Hu=function e({title:t,blockTypes:n,selectedBlockTypes:o,onChange:r}){const i=(0,m.useInstanceId)(e),s=(0,h.useCallback)(((e,t)=>{r(t?[...o,e]:o.filter((({name:t})=>t!==e.name)))}),[o,r]),l=(0,h.useCallback)((e=>{r(e?[...o,...n.filter((e=>!o.find((({name:t})=>t===e.name))))]:o.filter((e=>!n.find((({name:t})=>t===e.name)))))}),[n,o,r]);if(!n.length)return null;const a=n.map((({name:e})=>e)).filter((e=>(o??[]).some((t=>t.name===e)))),c="block-editor-block-manager__category-title-"+i,u=a.length===n.length,p=!u&&a.length>0;return(0,d.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:u,onChange:l,className:"block-editor-block-manager__category-title",indeterminate:p,label:(0,d.jsx)("span",{id:c,children:t})}),(0,d.jsx)(Fu,{blockTypes:n,value:a,onItemChange:s})]})};function Uu({blockTypes:e,selectedBlockTypes:t,onChange:n,showSelectAll:o=!0}){const r=(0,m.useDebounce)(Uo.speak,500),[i,s]=(0,h.useState)(""),{categories:l,isMatchingSearchTerm:a}=(0,g.useSelect)((e=>({categories:e(p.store).getCategories(),isMatchingSearchTerm:e(p.store).isMatchingSearchTerm})),[]),c=e.filter((e=>!i||a(e,i))),u=t.length>0&&t.length!==e.length,f=e.length>0&&t.length===e.length;return(0,h.useEffect)((()=>{if(!i)return;const e=c.length,t=(0,T.sprintf)((0,T._n)("%d result found.","%d results found.",e),e);r(t)}),[c?.length,i,r]),(0,d.jsxs)(ws.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,d.jsx)(ws.SearchControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Search for a block"),placeholder:(0,T.__)("Search for a block"),value:i,onChange:e=>s(e),className:"block-editor-block-manager__search"}),o&&(0,d.jsx)(ws.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,T.__)("Select all"),checked:f,onChange:()=>{n(f?[]:e)},indeterminate:u,__nextHasNoMarginBottom:!0}),(0,d.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,T.__)("Available block types"),className:"block-editor-block-manager__results",children:[0===c.length&&(0,d.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,T.__)("No blocks found.")}),l.map((e=>(0,d.jsx)(Hu,{title:e.title,blockTypes:c.filter((t=>t.category===e.slug)),selectedBlockTypes:t,onChange:n},e.slug))),(0,d.jsx)(Hu,{title:(0,T.__)("Uncategorized"),blockTypes:c.filter((({category:e})=>!e)),selectedBlockTypes:t,onChange:n})]})]})}function Gu({clientId:e,blockTypes:t,selectedBlockTypes:n,onClose:o}){const[r,i]=(0,h.useState)(n),{updateBlockAttributes:s}=(0,g.useDispatch)(ji);return(0,d.jsx)(ws.Modal,{title:(0,T.__)("Manage allowed blocks"),onRequestClose:o,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,d.jsxs)(ws.__experimentalVStack,{as:"form",onSubmit:n=>{n.preventDefault(),(()=>{const n=r.length===t.length,i=r.map((({name:e})=>e));s(e,{allowedBlocks:n?void 0:i}),o()})()},spacing:"4",children:[(0,d.jsx)(ws.__experimentalText,{children:(0,T.__)("Select which blocks can be added inside this container.")}),(0,d.jsx)(Uu,{blockTypes:t,selectedBlockTypes:r,onChange:e=>{i(e)}}),(0,d.jsxs)(ws.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:o,__next40pxDefaultSize:!0,children:(0,T.__)("Cancel")})}),(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,T.__)("Apply")})})]})]})})}function $u({clientId:e}){const[t,n]=(0,h.useState)(!1),{blockTypes:o,selectedBlockNames:r}=(0,g.useSelect)((t=>{const{getBlockAttributes:n}=t(ji);return{blockTypes:t(p.store).getBlockTypes(),selectedBlockNames:n(e)?.allowedBlocks}}),[e]),i=o.filter((e=>(0,p.hasBlockSupport)(e,"inserter",!0)&&(!e.parent||e.parent.includes("core/post-content"))));if(!i)return null;const s=void 0===r?i:i.filter((e=>r.includes(e.name)));return(0,d.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,d.jsxs)(ws.BaseControl,{help:(0,T.__)("Specify which blocks are allowed inside this container."),__nextHasNoMarginBottom:!0,children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{children:(0,T.__)("Allowed Blocks")}),(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{n(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,T.__)("Manage allowed blocks")})]}),t&&(0,d.jsx)(Gu,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>n(!1)})]})}var Wu={edit:function({clientId:e}){return(0,g.useSelect)((t=>"contentOnly"===t(ji).getBlockEditingMode(e)),[e])?null:(0,d.jsx)(Pa.Fill,{children:(0,d.jsx)($u,{clientId:e})})},attributeKeys:["allowedBlocks"],hasSupport:e=>(0,p.hasBlockSupport)(e,"allowedBlocks")};(0,f.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",(function(e){return e?.attributes?.allowedBlocks?.type||(0,p.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e})),(0,f.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",(function(e,t,n,o){if(!(0,p.hasBlockSupport)(e.name,"allowedBlocks"))return e;if(1!==t.length&&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(o.length>1&&t.length>1&&o.length!==t.length)return e;if(e.attributes.allowedBlocks)return e;const r=t[n]?.attributes?.allowedBlocks;if(!r)return e;const i=(0,p.getBlockType)(e.name),s=i?.allowedBlocks||[];if(!s.length)return{...e,attributes:{...e.attributes,allowedBlocks:r}};const l=r.filter((e=>s.includes(e)));return{...e,attributes:{...e.attributes,allowedBlocks:l}}}));const Ku=/[\s#]/g,Zu={type:"string",source:"attribute",attribute:"id",selector:"*"};var qu={addSaveProps:function(e,t,n){(0,p.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor);return e},edit:function({anchor:e,setAttributes:t}){if("default"!==ga())return null;const n="web"===h.Platform.OS;return(0,d.jsx)(Fa,{group:"advanced",children:(0,d.jsx)(ws.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,T.__)("HTML anchor"),help:(0,d.jsxs)(d.Fragment,{children:[(0,T.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor”. Then, you’ll be able to link directly to this section of your page."),n&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsx)(ws.ExternalLink,{href:(0,T.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,T.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:n?null:(0,T.__)("Add an anchor"),onChange:e=>{e=e.replace(Ku,"-"),t({anchor:e})},autoCapitalize:"none",autoComplete:"off"})})},attributeKeys:["anchor"],hasSupport:e=>(0,p.hasBlockSupport)(e,"anchor")};(0,f.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return"type"in(e.attributes?.anchor??{})||(0,p.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Zu}),e}));var Yu={addSaveProps:function(e,t,n){return(0,p.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e},attributeKeys:["ariaLabel"],hasSupport:e=>(0,p.hasBlockSupport)(e,"ariaLabel")};(0,f.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){return e?.attributes?.ariaLabel?.type||(0,p.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}));var Xu={edit:function({className:e,setAttributes:t}){return"default"!==ga()?null:(0,d.jsx)(Fa,{group:"advanced",children:(0,d.jsx)(ws.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,T.__)("Additional CSS class(es)"),value:e||"",onChange:e=>{t({className:""!==e?e:void 0})},help:(0,T.__)("Separate multiple classes with spaces.")})})},addSaveProps:function(e,t,n){(0,p.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=ms(e.className,n.className));return e},attributeKeys:["className"],hasSupport:e=>(0,p.hasBlockSupport)(e,"customClassName",!0)};(0,f.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",(function(e){return(0,p.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,f.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",(function(e,t,n,o){if(!(0,p.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&&void 0===e.attributes.className)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,f.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,p.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,p.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,p.getBlockDefaultClassName)(t.name)),e}));var Qu={grad:.9,turn:360,rad:360/(2*Math.PI)},Ju=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},ed=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},td=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},nd=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},od=function(e){return{r:td(e.r,0,255),g:td(e.g,0,255),b:td(e.b,0,255),a:td(e.a)}},rd=function(e){return{r:ed(e.r),g:ed(e.g),b:ed(e.b),a:ed(e.a,3)}},id=/^#([0-9a-f]{3,8})$/i,sd=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},ld=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=Math.max(t,n,o),s=i-Math.min(t,n,o),l=s?i===t?(n-o)/s:i===n?2+(o-t)/s:4+(t-n)/s:0;return{h:60*(l<0?l+6:l),s:i?s/i*100:0,v:i/255*100,a:r}},ad=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var i=Math.floor(t),s=o*(1-n),l=o*(1-(t-i)*n),a=o*(1-(1-t+i)*n),c=i%6;return{r:255*[o,l,s,s,a,o][c],g:255*[a,o,o,l,s,s][c],b:255*[s,s,a,o,o,l][c],a:r}},cd=function(e){return{h:nd(e.h),s:td(e.s,0,100),l:td(e.l,0,100),a:td(e.a)}},ud=function(e){return{h:ed(e.h),s:ed(e.s),l:ed(e.l),a:ed(e.a,3)}},dd=function(e){return ad((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},pd=function(e){return{h:(t=ld(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},hd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,md=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bd={string:[[function(e){var t=id.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?ed(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?ed(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=md.exec(e)||fd.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:od({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=hd.exec(e)||gd.exec(e);if(!t)return null;var n,o,r=cd({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(Qu[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return dd(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=void 0===r?1:r;return Ju(t)&&Ju(n)&&Ju(o)?od({r:Number(t),g:Number(n),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,i=void 0===r?1:r;if(!Ju(t)||!Ju(n)||!Ju(o))return null;var s=cd({h:Number(t),s:Number(n),l:Number(o),a:Number(i)});return dd(s)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,i=void 0===r?1:r;if(!Ju(t)||!Ju(n)||!Ju(o))return null;var s=function(e){return{h:nd(e.h),s:td(e.s,0,100),v:td(e.v,0,100),a:td(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(i)});return ad(s)},"hsv"]]},kd=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=rd(this.rgba)).r,n=e.g,o=e.b,i=(r=e.a)<1?sd(ed(255*r)):"","#"+sd(t)+sd(n)+sd(o)+i;var e,t,n,o,r,i},e.prototype.toRgb=function(){return rd(this.rgba)},e.prototype.toRgbString=function(){return t=(e=rd(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 ud(pd(this.rgba))},e.prototype.toHslString=function(){return t=(e=ud(pd(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=ld(this.rgba),{h:ed(e.h),s:ed(e.s),v:ed(e.v),a:ed(e.a,3)};var e},e.prototype.invert=function(){return wd({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),wd(_d(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),wd(_d(this.rgba,-e))},e.prototype.grayscale=function(){return wd(_d(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),wd(xd(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),wd(xd(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?wd({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):ed(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=pd(this.rgba);return"number"==typeof e?wd({h:e,s:t.s,l:t.l,a:t.a}):ed(t.h)},e.prototype.isEqual=function(e){return this.toHex()===wd(e).toHex()},e}(),wd=function(e){return e instanceof Sd?e:new Sd(e)},Cd=[],Bd=function(e){e.forEach((function(e){Cd.indexOf(e)<0&&(e(Sd,bd),Cd.push(e))}))};function Id(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 i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,s,l=o[this.toHex()];if(l)return l;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var p in n){var h=(r=a,s=i[p],Math.pow(r.r-s.r,2)+Math.pow(r.g-s.g,2)+Math.pow(r.b-s.b,2));h(a=Ed(s))?(l+.05)/(a+.05):(a+.05)/(l+.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)>=(s=void 0===(i=(n=t).size)?"normal":i,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===s?7:"AA"===r&&"large"===s?3:4.5);var n,o,r,i,s}}Bd([Id,Td]);const{kebabCase:Md}=G(ws.privateApis),Pd=(e,t,n)=>{if(t){const n=e?.find((e=>e.slug===t));if(n)return n}return{color:n}},Rd=(e,t)=>e?.find((e=>e.color===t));function Ad(e,t){if(e&&t)return`has-${Md(t)}-${e}`}function Nd(){const[e,t,n,o,r,i,s,l,a,c]=Ti("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:!i};return u.colors=(0,h.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,T._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:n}),r&&o&&o.length&&e.push({name:(0,T._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:o}),t&&t.length&&e.push({name:(0,T._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),e}),[t,n,o,r]),u.gradients=(0,h.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,T._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:l}),c&&a&&a.length&&e.push({name:(0,T._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:a}),s&&s.length&&e.push({name:(0,T._x)("Custom","Indicates this palette is created by the user."),slug:"custom",gradients:s}),e}),[s,l,a,c]),u.hasColorsOrGradients=!!u.colors.length||!!u.gradients.length,u}var Ld=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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 Dd({isLinked:e,...t}){const n=e?(0,T.__)("Unlink radii"):(0,T.__)("Link radii");return(0,d.jsx)(ws.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?Ld:ec,iconSize:24,label:n})}function Od(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function zd(e){return!!e?.includes&&("0"===e||e.includes("var:preset|border-radius|"))}function Vd(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|border-radius\|(.+)/);return t?t[1]:void 0}function Fd(e,t){if(!zd(e))return e;const n=0===parseFloat(e,10)?"0":Vd(e),o=t.find((e=>String(e.slug)===n));return o?.size}function Hd(e,t,n){const o=parseInt(e,10);if("selectList"===t){if(0===o)return}else if(0===o)return"0";return`var:preset|border-radius|${n[e]?.slug}`}function Ud(e,t){if(!e||zd(e)||"0"===e)return e;const n=t.find((t=>String(t.size)===String(e)));return n?.slug?`var:preset|border-radius|${n.slug}`:e}var Gd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.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,d.jsx)(ue.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"})]}),$d=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Zm-12.5 9v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),Wd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.G,{opacity:".25",children:(0,d.jsx)(ue.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.75a.25.25 0 0 0-.25.25v3h-1.5V6c0-.966.784-1.75 1.75-1.75h3v1.5H6Z"})]}),Kd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.G,{opacity:".25",children:(0,d.jsx)(ue.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Z"})]}),Zd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.G,{opacity:".25",children:(0,d.jsx)(ue.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 15v3c0 .138.112.25.25.25h3v1.5H6A1.75 1.75 0 0 1 4.25 18v-3h1.5Z"})]}),qd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.G,{opacity:".25",children:(0,d.jsx)(ue.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 18.25h3a.25.25 0 0 0 .25-.25v-3h1.5v3A1.75 1.75 0 0 1 18 19.75h-3v-1.5Z"})]});const Yd={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},Xd=8,Qd=[],Jd={all:(0,T.__)("Border radius"),topLeft:(0,T.__)("Top left"),topRight:(0,T.__)("Top right"),bottomLeft:(0,T.__)("Bottom left"),bottomRight:(0,T.__)("Bottom right")},ep={all:$d,topLeft:Wd,topRight:Kd,bottomLeft:Zd,bottomRight:qd},tp=0,np={px:100,em:20,rem:20};function op({corner:e,onChange:t,selectedUnits:n,setSelectedUnits:o,values:r,units:i,presets:s}){const l=n=>{t("all"===e?{topLeft:n,topRight:n,bottomLeft:n,bottomRight:n}:{...a,[e]:n})},a="string"!=typeof r?r:{topLeft:r,topRight:r,bottomLeft:r,bottomRight:r};let c;if("all"===e){const e=function(e,t){if(!e||"object"!=typeof e)return e;const n={};return Object.keys(e).forEach((o=>{const r=e[o];if(zd(r)){const e=Fd(r,t);n[o]=void 0!==e?e:r}else n[o]=r})),n}(a,s),t=function(e={}){if("string"==typeof e)return e;const t=Object.values(e).map((e=>{const t=(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(e);return"string"==typeof e&&void 0===t[0]?[e,""]:t})),n=t.map((e=>e[0]??"")),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",i=Od(o);return 0===r||r?`${r}${i||""}`:void 0}(e);c=Ud(t,s)}else c=Ud(a[e],s);const u=zd(c)?Fd(c,s):c,[p,g]=(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(u),m=c?g:n[e]||n.flat||"px",f=i&&i.find((e=>e.value===m)),b=f?.step||1,[k,v]=(0,h.useState)(void 0!==c&&!zd(c)),_=s.length<=Xd,y=function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":Vd(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(c,s),x=s.slice(1,s.length-1).map(((e,t)=>({value:t+1,label:void 0}))),S=x.length>0;let w=[];_||(w=[...s,{name:(0,T.__)("Custom"),slug:"custom",size:u}].map(((e,t)=>({key:t,name:e.name}))));const C=ep[e];return(0,d.jsxs)(ws.__experimentalHStack,{children:[C&&(0,d.jsx)(ws.Icon,{className:"components-border-radius-control__icon",icon:C,size:24}),(!S||k)&&(0,d.jsxs)("div",{className:"components-border-radius-control__input-controls-wrapper",children:[(0,d.jsx)(ws.Tooltip,{text:Jd[e],placement:"top",children:(0,d.jsx)("div",{className:"components-border-radius-control__tooltip-wrapper",children:(0,d.jsx)(ws.__experimentalUnitControl,{className:"components-border-radius-control__unit-control","aria-label":Jd[e],value:[p,m].join(""),onChange:e=>{if(!t)return;const n=!isNaN(parseFloat(e));l(n?e:void 0)},onUnitChange:t=>{const r={...n};"all"===e?(r.flat=t,r.topLeft=t,r.topRight=t,r.bottomLeft=t,r.bottomRight=t):r[e]=t,o(r)},size:"__unstable-large",min:tp,units:i})})}),(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:p??"",min:tp,max:np[m],initialPosition:0,withInputField:!1,onChange:e=>{l(void 0!==e?`${e}${m}`:void 0)},step:b,__nextHasNoMarginBottom:!0})]}),S&&_&&!k&&(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,className:"components-border-radius-control__range-control",value:y,onChange:e=>{l(Hd(e,"range",s))},withInputField:!1,"aria-valuenow":y,"aria-valuetext":s[y]?.name,renderTooltipContent:e=>void 0===c?void 0:s[e]?.name,min:0,max:s.length-1,marks:x,label:Jd[e],hideLabelFromVision:!0,__nextHasNoMarginBottom:!0}),!_&&!k&&(0,d.jsx)(ws.CustomSelectControl,{className:"components-border-radius-control__custom-select-control",value:w.find((e=>e.key===y))||w[w.length-1],onChange:e=>{e.selectedItem.key===w.length-1?v(!0):l(Hd(e.selectedItem.key,"selectList",s))},options:w,label:Jd[e],hideLabelFromVision:!0,size:"__unstable-large"}),S&&(0,d.jsx)(ws.Button,{label:k?(0,T.__)("Use border radius preset"):(0,T.__)("Set custom border radius"),icon:Gd,onClick:()=>{v(!k)},isPressed:k,size:"small",className:"components-border-radius-control__custom-toggle",iconSize:24})]})}function rp({onChange:e,values:t,presets:n}){const[o,r]=(0,h.useState)(!function(e){return!!e&&("string"==typeof e||!!Object.values(e).filter((e=>!!e||0===e)).length)}(t)||!function(e={}){if("string"==typeof e)return!1;if(!e||"object"!=typeof e)return!1;const t=Object.values(e);if(0===t.length)return!1;const n=t[0];return!t.every((e=>e===n))}(t)),i=function(e){const t=e?.default??Qd,n=e?.custom??Qd,o=e?.theme??Qd;return(0,h.useMemo)((()=>{const e=[{name:(0,T.__)("None"),slug:"0",size:0},...n,...o,...t];return e.length>Xd?[{name:(0,T.__)("Default"),slug:"default",size:void 0},...e]:e}),[n,o,t])}(n),[s,l]=(0,h.useState)({flat:"string"==typeof t?(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[a]=Ti("spacing.units"),c=(0,ws.__experimentalUseCustomUnits)({availableUnits:a||["px","em","rem"]});return(0,d.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,d.jsxs)(ws.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:(0,T.__)("Radius")}),(0,d.jsx)(Dd,{onClick:()=>r(!o),isLinked:o})]}),o?(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(op,{onChange:e,selectedUnits:s,setSelectedUnits:l,values:t,units:c,corner:"all",presets:i})}):(0,d.jsx)(ws.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map((n=>(0,d.jsx)(op,{onChange:e,selectedUnits:s,setSelectedUnits:l,values:t||Yd,units:c,corner:n,presets:i},n)))})]})}var ip=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})}),sp=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.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"})});const lp=[];function ap({shadow:e,onShadowChange:t,settings:n}){const o=hp(n);return(0,d.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,d.jsxs)(ws.__experimentalVStack,{spacing:4,children:[(0,d.jsx)(ws.__experimentalHeading,{level:5,children:(0,T.__)("Drop shadow")}),(0,d.jsx)(cp,{presets:o,activeShadow:e,onSelect:t}),(0,d.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,T.__)("Clear")})})]})})}function cp({presets:e,activeShadow:t,onSelect:n}){return e?(0,d.jsx)(ws.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,T.__)("Drop shadows"),children:e.map((({name:e,slug:o,shadow:r})=>(0,d.jsx)(up,{label:e,isActive:r===t,type:"unset"===o?"unset":"preset",onSelect:()=>n(r===t?void 0:r),shadow:r},o)))}):null}function up({type:e,label:t,isActive:n,onSelect:o,shadow:r}){return(0,d.jsx)(ws.Tooltip,{text:t,children:(0,d.jsx)(ws.Composite.Item,{role:"option","aria-label":t,"aria-selected":n,className:ms("block-editor-global-styles__shadow__item",{"is-active":n}),render:(0,d.jsx)("button",{className:ms("block-editor-global-styles__shadow-indicator",{unset:"unset"===e}),onClick:o,style:{boxShadow:r},"aria-label":t,children:n&&(0,d.jsx)(Ol,{icon:ip})})})})}function dp({shadow:e,onShadowChange:t,settings:n}){return(0,d.jsx)(ws.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:pp(e,t),renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,d.jsx)(ap,{shadow:e,onShadowChange:t,settings:n})})})}function pp(e,t){return({onToggle:n,isOpen:o})=>{const r=(0,h.useRef)(void 0),i={onClick:n,className:ms("block-editor-global-styles__shadow-dropdown-toggle",{"is-open":o}),"aria-expanded":o,ref:r},s={onClick:()=>{o&&n(),t(void 0),r.current?.focus()},className:ms("block-editor-global-styles__shadow-editor__remove-button",{"is-open":o}),label:(0,T.__)("Remove")};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...i,children:(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",children:[(0,d.jsx)(Ol,{className:"block-editor-global-styles__toggle-icon",icon:sp,size:24}),(0,d.jsx)(ws.FlexItem,{children:(0,T.__)("Drop shadow")})]})}),!!e&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,size:"small",icon:Ha,...s})]})}}function hp(e){return(0,h.useMemo)((()=>{if(!e?.shadow)return lp;const t=e?.shadow?.defaultPresets,{default:n,theme:o,custom:r}=e?.shadow?.presets??{},i={name:(0,T.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&n||lp,...o||lp,...r||lp];return s.length&&s.unshift(i),s}),[e])}function gp(e){return Object.values(mp(e)).some(Boolean)}function mp(e){return{hasBorderColor:fp(e),hasBorderRadius:bp(e),hasBorderStyle:kp(e),hasBorderWidth:vp(e),hasShadow:_p(e)}}function fp(e){return e?.border?.color}function bp(e){return e?.border?.radius}function kp(e){return e?.border?.style}function vp(e){return e?.border?.width}function _p(e){const t=hp(e);return!!e?.shadow&&t.length>0}function yp({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,label:i}){const s=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}const xp={radius:!0,color:!0,width:!0,shadow:!0};function Sp({as:e=yp,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,name:s,defaultControls:l=xp}){const a=ps(r),c=(0,h.useCallback)((e=>ts({settings:r},"",e)),[r]),u=e=>{const t=a.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},p=(0,h.useMemo)((()=>{if((0,ws.__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]),g=e=>n({...t,border:e}),m=fp(r),f=kp(r),b=vp(r),k=bp(r),v=(0,h.useMemo)((()=>"object"!=typeof o?.border?.radius?c(o?.border?.radius):{topLeft:c(o?.border?.radius?.topLeft),topRight:c(o?.border?.radius?.topRight),bottomLeft:c(o?.border?.radius?.bottomLeft),bottomRight:c(o?.border?.radius?.bottomRight)}),[o?.border?.radius,c]),_=e=>g({...p,radius:e}),y=()=>{const e=t?.border?.radius;return"object"==typeof e?Object.entries(e).some(Boolean):!!e},x=_p(r),S=c(o?.shadow),w=r?.shadow?.presets??{},C=w.custom??w.theme??w.default??[],B=e=>{const o=C?.find((({shadow:t})=>t===e))?.slug;n(me(t,["shadow"],o?`var:preset|shadow|${o}`:e||void 0))},I=(0,h.useCallback)((e=>({...e,border:void 0,shadow:void 0})),[]),j=l?.color||l?.width,E=m||f||b||k,M=Ap({blockName:s,hasShadowControl:x,hasBorderControl:E});return(0,d.jsxs)(e,{resetAllFilter:I,value:t,onChange:n,panelId:i,label:M,children:[(b||m)&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>(0,ws.__experimentalIsDefinedBorder)(t?.border),label:(0,T.__)("Border"),onDeselect:()=>(()=>{if(y())return g({radius:t?.border?.radius});g(void 0)})(),isShownByDefault:j,panelId:i,children:(0,d.jsx)(ws.BorderBoxControl,{colors:a,enableAlpha:!0,enableStyle:f,onChange:e=>{const t={...e};(0,ws.__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)),g({radius:p?.radius,...t})},popoverOffset:40,popoverPlacement:"left-start",value:p,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!x,label:(0,T.__)("Border")})}),k&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:y,label:(0,T.__)("Radius"),onDeselect:()=>_(void 0),isShownByDefault:l.radius,panelId:i,children:(0,d.jsx)(rp,{presets:r?.border?.radiusSizes,values:v,onChange:e=>{_(e||void 0)}})}),x&&(0,d.jsxs)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Shadow"),hasValue:()=>!!t?.shadow,onDeselect:()=>B(void 0),isShownByDefault:l.shadow,panelId:i,children:[E?(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:(0,T.__)("Shadow")}):null,(0,d.jsx)(dp,{shadow:S,onShadowChange:B,settings:r})]})]})}const wp="__experimentalBorder",Cp="shadow",Bp=(e,t,n)=>{let o;return e.some((e=>e.colors.some((e=>e[t]===n&&(o=e,!0))))),o},Ip=({colors:e,namedColor:t,customColor:n})=>{if(t){const n=Bp(e,"slug",t);if(n)return n}if(!n)return{color:void 0};const o=Bp(e,"color",n);return o||{color:n}};function jp(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function Ep(e){if((0,ws.__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:fs(o),borderColor:n}}function Tp(e){return(0,ws.__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 Mp({label:e,children:t,resetAllFilter:n}){const o=(0,h.useCallback)((e=>{const t=Tp(e),o=n(t);return{...e,...Ep(o)}}),[n]);return(0,d.jsx)(Fa,{group:"border",resetAllFilter:o,label:e,children:t})}function Pp({clientId:e,name:t,setAttributes:n,settings:o}){const r=gp(o);const{style:i,borderColor:s}=(0,g.useSelect)((function(t){const{style:n,borderColor:o}=t(ji).getBlockAttributes(e)||{};return{style:n,borderColor:o}}),[e]),l=(0,h.useMemo)((()=>Tp({style:i,borderColor:s})),[i,s]);if(!r)return null;const a={...(0,p.getBlockSupport)(t,[wp,"__experimentalDefaultControls"]),...(0,p.getBlockSupport)(t,[Cp,"__experimentalDefaultControls"])};return(0,d.jsx)(Sp,{as:Mp,panelId:e,settings:o,value:l,onChange:e=>{n(Ep(e))},defaultControls:a})}function Rp(e,t="any"){if("web"!==h.Platform.OS)return!1;const n=(0,p.getBlockSupport)(e,wp);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}function Ap({blockName:e,hasBorderControl:t,hasShadowControl:n}={}){const o=mp(xs(e));return t||n||!e||(t=o?.hasBorderColor||o?.hasBorderStyle||o?.hasBorderWidth||o?.hasBorderRadius,n=o?.hasShadow),t&&n?(0,T.__)("Border & Shadow"):n?(0,T.__)("Shadow"):(0,T.__)("Border")}function Np(e,t,n){if(!Rp(t,"color")||ks(t,wp,"color"))return e;const o=Lp(n),r=ms(e.className,o);return e.className=r||void 0,e}function Lp(e){const{borderColor:t,style:n}=e,o=Ad("border-color",t);return ms({"has-border-color":t||n?.border?.color,[o]:!!o})}var Dp={useBlockProps:function({name:e,borderColor:t,style:n}){const{colors:o}=Nd();if(!Rp(e,"color")||ks(e,wp,"color"))return{};const{color:r}=Ip({colors:o,namedColor:t}),{color:i}=Ip({colors:o,namedColor:jp(n?.border?.top?.color)}),{color:s}=Ip({colors:o,namedColor:jp(n?.border?.right?.color)}),{color:l}=Ip({colors:o,namedColor:jp(n?.border?.bottom?.color)}),{color:a}=Ip({colors:o,namedColor:jp(n?.border?.left?.color)});return Np({style:fs({borderTopColor:i||r,borderRightColor:s||r,borderBottomColor:l||r,borderLeftColor:a||r})||{}},e,{borderColor:t,style:n})},addSaveProps:Np,attributeKeys:["borderColor","style"],hasSupport:e=>Rp(e,"color")};function Op(e){if(e)return`has-${e}-gradient-background`}function zp(e,t){const n=e?.find((e=>e.slug===t));return n&&n.gradient}function Vp(e,t){const n=e?.find((e=>e.gradient===t));return n}function Fp(e,t){const n=Vp(e,t);return n&&n.slug}function Hp({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=C(),[o,r,i]=Ti("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,h.useMemo)((()=>[...o||[],...r||[],...i||[]]),[o,r,i]),{gradient:l,customGradient:a}=(0,g.useSelect)((o=>{const{getBlockAttributes:r}=o(ji),i=r(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:c}=(0,g.useDispatch)(ji),u=(0,h.useCallback)((o=>{const r=Fp(s,o);c(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[s,n,c]),d=Op(l);let p;return p=l?zp(s,l):a,{gradientClass:d,gradientValue:p,setGradient:u}}(0,f.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Rp(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e}));const{Tabs:Up}=G(ws.privateApis),Gp=["colors","disableCustomColors","gradients","disableCustomGradients"],$p="color",Wp="gradient";function Kp({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,className:i,label:s,onColorChange:l,onGradientChange:a,colorValue:c,gradientValue:u,clearable:p,showTitle:h=!0,enableAlpha:g,headingLevel:m}){const f=l&&(e&&e.length>0||!n),b=a&&(t&&t.length>0||!o);if(!f&&!b)return null;const k={[$p]:(0,d.jsx)(ws.ColorPalette,{value:c,onChange:b?e=>{l(e),a()}:l,colors:e,disableCustomColors:n,__experimentalIsRenderedInSidebar:r,clearable:p,enableAlpha:g,headingLevel:m}),[Wp]:(0,d.jsx)(ws.GradientPicker,{value:u,onChange:f?e=>{a(e),l()}:a,gradients:t,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,clearable:p,headingLevel:m})},v=e=>(0,d.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:k[e]});return(0,d.jsx)(ws.BaseControl,{__nextHasNoMarginBottom:!0,className:ms("block-editor-color-gradient-control",i),children:(0,d.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,d.jsxs)(ws.__experimentalVStack,{spacing:1,children:[h&&(0,d.jsx)("legend",{children:(0,d.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,d.jsx)(ws.BaseControl.VisualLabel,{children:s})})}),f&&b&&(0,d.jsx)("div",{children:(0,d.jsxs)(Up,{defaultTabId:u?Wp:!!f&&$p,children:[(0,d.jsxs)(Up.TabList,{children:[(0,d.jsx)(Up.Tab,{tabId:$p,children:(0,T.__)("Color")}),(0,d.jsx)(Up.Tab,{tabId:Wp,children:(0,T.__)("Gradient")})]}),(0,d.jsx)(Up.TabPanel,{tabId:$p,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.color}),(0,d.jsx)(Up.TabPanel,{tabId:Wp,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.gradient})]})}),!b&&v($p),!f&&v(Wp)]})})})}function Zp(e){const[t,n,o,r]=Ti("color.palette","color.gradients","color.custom","color.customGradient");return(0,d.jsx)(Kp,{colors:t,gradients:n,disableCustomColors:!o,disableCustomGradients:!r,...e})}var qp=function(e){return Gp.every((t=>e.hasOwnProperty(t)))?(0,d.jsx)(Kp,{...e}):(0,d.jsx)(Zp,{...e})};function Yp(e){const t=Xp(e),n=nh(e),o=Qp(e),r=eh(e),i=th(e),s=Jp(e);return t||n||o||r||i||s}function Xp(e){const t=ps(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function Qp(e){const t=ps(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Jp(e){const t=ps(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function eh(e){const t=ps(e),n=hs(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function th(e){const t=ps(e),n=hs(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function nh(e){const t=ps(e),n=hs(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function oh({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T.__)("Elements"),resetAll:()=>{const o=e(n);t(o)},panelId:o,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:i,children:(0,d.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:r})})}const rh={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},ih={placement:"left-start",offset:36,shift:!0,flip:!0,resize:!1},{Tabs:sh}=G(ws.privateApis),lh=({indicators:e,label:t})=>(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",children:[(0,d.jsx)(ws.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map(((e,t)=>(0,d.jsx)(ws.Flex,{expanded:!1,children:(0,d.jsx)(ws.ColorIndicator,{colorValue:e})},t)))}),(0,d.jsx)(ws.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function ah({isGradient:e,inheritedValue:t,userValue:n,setValue:o,colorGradientControlSettings:r}){return(0,d.jsx)(qp,{...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 ch({label:e,hasValue:t,resetValue:n,isShownByDefault:o,indicators:r,tabs:i,colorGradientControlSettings:s,panelId:l}){const a=i.find((e=>void 0!==e.userValue)),{key:c,...u}=i[0]??{},p=(0,h.useRef)(void 0);return(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:n,isShownByDefault:o,panelId:l,children:(0,d.jsx)(ws.Dropdown,{popoverProps:ih,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:o,isOpen:i})=>{const s={onClick:o,className:ms("block-editor-panel-color-gradient-settings__dropdown",{"is-open":i}),"aria-expanded":i,ref:p};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{...s,__next40pxDefaultSize:!0,children:(0,d.jsx)(lh,{indicators:r,label:e})}),t()&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,label:(0,T.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Ha,onClick:()=>{n(),i&&o(),p.current?.focus()}})]})},renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,d.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[1===i.length&&(0,d.jsx)(ah,{...u,colorGradientControlSettings:s},c),i.length>1&&(0,d.jsxs)(sh,{defaultTabId:a?.key,children:[(0,d.jsx)(sh.TabList,{children:i.map((e=>(0,d.jsx)(sh.Tab,{tabId:e.key,children:e.label},e.key)))}),i.map((e=>{const{key:t,...n}=e;return(0,d.jsx)(sh.TabPanel,{tabId:t,focusable:!1,children:(0,d.jsx)(ah,{...n,colorGradientControlSettings:s},t)},t)}))]})]})})})})}function uh({as:e=oh,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=rh,children:l}){const a=ps(r),c=hs(r),u=r?.color?.custom,p=r?.color?.customGradient,g=a.length>0||u,m=c.length>0||p,f=e=>ts({settings:r},"",e),b=e=>{const t=a.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},k=e=>{const t=c.flatMap((({gradients:e})=>e)).find((({gradient:t})=>t===e));return t?"var:preset|gradient|"+t.slug:e},v=nh(r),_=f(o?.color?.background),y=f(t?.color?.background),x=f(o?.color?.gradient),S=f(t?.color?.gradient),w=Qp(r),C=f(o?.elements?.link?.color?.text),B=f(t?.elements?.link?.color?.text),I=f(o?.elements?.link?.[":hover"]?.color?.text),j=f(t?.elements?.link?.[":hover"]?.color?.text),E=Xp(r),M=f(o?.color?.text),P=f(t?.color?.text),R=e=>{let o=me(t,["color","text"],b(e));M===C&&(o=me(o,["elements","link","color","text"],b(e))),n(o)},A=[{name:"caption",label:(0,T.__)("Captions"),showPanel:Jp(r)},{name:"button",label:(0,T.__)("Button"),showPanel:th(r)},{name:"heading",label:(0,T.__)("Heading"),showPanel:eh(r)},{name:"h1",label:(0,T.__)("H1"),showPanel:eh(r)},{name:"h2",label:(0,T.__)("H2"),showPanel:eh(r)},{name:"h3",label:(0,T.__)("H3"),showPanel:eh(r)},{name:"h4",label:(0,T.__)("H4"),showPanel:eh(r)},{name:"h5",label:(0,T.__)("H5"),showPanel:eh(r)},{name:"h6",label:(0,T.__)("H6"),showPanel:eh(r)}],N=(0,h.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}})),{})}})),[]),L=[E&&{key:"text",label:(0,T.__)("Text"),hasValue:()=>!!P,resetValue:()=>R(void 0),isShownByDefault:s.text,indicators:[M],tabs:[{key:"text",label:(0,T.__)("Text"),inheritedValue:M,setValue:R,userValue:P}]},v&&{key:"background",label:(0,T.__)("Background"),hasValue:()=>!!y||!!S,resetValue:()=>{const e=me(t,["color","background"],void 0);e.color.gradient=void 0,n(e)},isShownByDefault:s.background,indicators:[x??_],tabs:[g&&{key:"background",label:(0,T.__)("Color"),inheritedValue:_,setValue:e=>{const o=me(t,["color","background"],b(e));o.color.gradient=void 0,n(o)},userValue:y},m&&{key:"gradient",label:(0,T.__)("Gradient"),inheritedValue:x,setValue:e=>{const o=me(t,["color","gradient"],k(e));o.color.background=void 0,n(o)},userValue:S,isGradient:!0}].filter(Boolean)},w&&{key:"link",label:(0,T.__)("Link"),hasValue:()=>!!B||!!j,resetValue:()=>{let e=me(t,["elements","link",":hover","color","text"],void 0);e=me(e,["elements","link","color","text"],void 0),n(e)},isShownByDefault:s.link,indicators:[C,I],tabs:[{key:"link",label:(0,T.__)("Default"),inheritedValue:C,setValue:e=>{n(me(t,["elements","link","color","text"],b(e)))},userValue:B},{key:"hover",label:(0,T.__)("Hover"),inheritedValue:I,setValue:e=>{n(me(t,["elements","link",":hover","color","text"],b(e)))},userValue:j}]}].filter(Boolean);return A.forEach((({name:e,label:r,showPanel:i})=>{if(!i)return;const l=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),h="caption"!==e;L.push({key:e,label:r,hasValue:()=>!!(p||u||d),resetValue:()=>{const o=me(t,["elements",e,"color","background"],void 0);o.elements[e].color.gradient=void 0,o.elements[e].color.text=void 0,n(o)},isShownByDefault:s[e],indicators:h?[c,a??l]:[c],tabs:[g&&{key:"text",label:(0,T.__)("Text"),inheritedValue:c,setValue:o=>{n(me(t,["elements",e,"color","text"],b(o)))},userValue:p},g&&h&&{key:"background",label:(0,T.__)("Background"),inheritedValue:l,setValue:o=>{const r=me(t,["elements",e,"color","background"],b(o));r.elements[e].color.gradient=void 0,n(r)},userValue:u},m&&h&&{key:"gradient",label:(0,T.__)("Gradient"),inheritedValue:a,setValue:o=>{const r=me(t,["elements",e,"color","gradient"],k(o));r.elements[e].color.background=void 0,n(r)},userValue:d,isGradient:!0}].filter(Boolean)})})),(0,d.jsxs)(e,{resetAllFilter:N,value:t,onChange:n,panelId:i,children:[L.map((e=>{const{key:t,...n}=e;return(0,d.jsx)(ch,{...n,colorGradientControlSettings:{colors:a,disableCustomColors:!u,gradients:c,disableCustomGradients:!p},panelId:i},t)})),l]})}Bd([Id,Td]);var dh=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fallbackLinkColor:o,fontSize:r,isLargeText:i,textColor:s,linkColor:l,enableAlphaChecker:a=!1}){const c=e||t;if(!c)return null;const u=s||n,p=l||o;if(!u&&!p)return null;const h=[{color:u,description:(0,T.__)("text color")},{color:p,description:(0,T.__)("link color")}],g=wd(c),m=g.alpha()<1,f=g.brightness(),b={level:"AA",size:i||!1!==i&&r>=24?"large":"small"};let k="",v="";for(const e of h){if(!e.color)continue;const t=wd(e.color),n=t.isReadable(g,b),o=t.alpha()<1;if(!n){if(m||o)continue;k=f({refsMap:(0,m.observableMap)()})),[]);return(0,d.jsx)(ph.Provider,{value:t,children:e})}function gh(e){const{refsMap:t}=(0,h.useContext)(ph);return(0,m.useRefEffect)((n=>(t.set(e,n),()=>t.delete(e))),[e])}function mh(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function fh(e,t){const{refsMap:n}=(0,h.useContext)(ph);(0,h.useLayoutEffect)((()=>{mh(t,n.get(e));const o=n.subscribe(e,(()=>mh(t,n.get(e))));return()=>{o(),mh(t,null)}}),[n,e,t])}function bh(e){const[t,n]=(0,h.useState)(null);return fh(e,n),t}function kh(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function vh(e,t){return Object.keys(t).some((n=>e[n]!==t[n]))?t:e}function _h({clientId:e}){const t=bh(e),[n,o]=(0,h.useReducer)(vh,{});return(0,h.useLayoutEffect)((()=>{function e(){o(function(e){if(!e)return{};const t=e.querySelector("a"),n=t?.innerText?kh(t,"color"):void 0,o=kh(e,"color");let r=e,i=kh(r,"background-color");for(;"rgba(0, 0, 0, 0)"===i&&r.parentNode&&r.parentNode.nodeType===r.parentNode.ELEMENT_NODE;)r=r.parentNode,i=kh(r,"background-color");return{textColor:o,backgroundColor:i,linkColor:n}}(t))}t&&window.requestAnimationFrame((()=>window.requestAnimationFrame(e)))})),(0,d.jsx)(dh,{backgroundColor:n.backgroundColor,textColor:n.textColor,linkColor:n.linkColor,enableAlphaChecker:!0})}ph.displayName="BlockRefsContext";const yh="color",xh=e=>{const t=(0,p.getBlockSupport)(e,yh);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Sh=e=>{if("web"!==h.Platform.OS)return!1;const t=(0,p.getBlockSupport)(e,yh);return null!==t&&"object"==typeof t&&!!t.link},wh=e=>{const t=(0,p.getBlockSupport)(e,yh);return null!==t&&"object"==typeof t&&!!t.gradients},Ch=e=>{const t=(0,p.getBlockSupport)(e,yh);return t&&!1!==t.background},Bh=e=>{const t=(0,p.getBlockSupport)(e,yh);return t&&!1!==t.text};function Ih(e,t,n){if(!xh(t)||ks(t,yh))return e;const o=wh(t),{backgroundColor:r,textColor:i,gradient:s,style:l}=n,a=e=>!ks(t,yh,e),c=a("text")?Ad("color",i):void 0,u=a("gradients")?Op(s):void 0,d=a("background")?Ad("background-color",r):void 0,p=a("background")||a("gradients"),h=r||l?.color?.background||o&&(s||l?.color?.gradient),g=ms(e.className,c,u,{[d]:!(o&&l?.color?.gradient||!d),"has-text-color":a("text")&&(i||l?.color?.text),"has-background":p&&h,"has-link-color":a("link")&&l?.elements?.link?.color});return e.className=g||void 0,e}function jh(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,i=e?.color?.gradient,s=i?.startsWith("var:preset|gradient|")?i.substring(20):void 0,l={...e};return l.color={...l.color,text:n?void 0:t,background:r?void 0:o,gradient:s?void 0:i},{style:fs(l),textColor:n,backgroundColor:r,gradient:s}}function Eh(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 Th({children:e,resetAllFilter:t}){const n=(0,h.useCallback)((e=>{const n=Eh(e),o=t(n);return{...e,...jh(o)}}),[t]);return(0,d.jsx)(Fa,{group:"color",resetAllFilter:n,children:e})}function Mh({clientId:e,name:t,setAttributes:n,settings:o}){const r=Yp(o);const{style:i,textColor:s,backgroundColor:l,gradient:a}=(0,g.useSelect)((function(t){const{style:n,textColor:o,backgroundColor:r,gradient:i}=t(ji).getBlockAttributes(e)||{};return{style:n,textColor:o,backgroundColor:r,gradient:i}}),[e]),c=(0,h.useMemo)((()=>Eh({style:i,textColor:s,backgroundColor:l,gradient:a})),[i,s,l,a]);if(!r)return null;const u=(0,p.getBlockSupport)(t,[yh,"__experimentalDefaultControls"]),m="web"===h.Platform.OS&&!c?.color?.gradient&&(o?.color?.text||o?.color?.link)&&!1!==(0,p.getBlockSupport)(t,[yh,"enableContrastChecker"]);return(0,d.jsx)(uh,{as:Th,panelId:e,settings:o,value:c,onChange:e=>{n(jh(e))},defaultControls:u,enableContrastChecker:!1!==(0,p.getBlockSupport)(t,[yh,"enableContrastChecker"]),children:m&&(0,d.jsx)(_h,{clientId:e})})}var Ph={useBlockProps:function({name:e,backgroundColor:t,textColor:n,gradient:o,style:r}){const[i,s,l]=Ti("color.palette.custom","color.palette.theme","color.palette.default"),a=(0,h.useMemo)((()=>[...i||[],...s||[],...l||[]]),[i,s,l]);if(!xh(e)||ks(e,yh))return{};const c={};n&&!ks(e,yh,"text")&&(c.color=Pd(a,n)?.color),t&&!ks(e,yh,"background")&&(c.backgroundColor=Pd(a,t)?.color);const u=Ih({style:c},e,{textColor:n,backgroundColor:t,gradient:o,style:r}),d=t||r?.color?.background||o||r?.color?.gradient;return{...u,className:ms(u.className,!d&&Nu(r))}},addSaveProps:Ih,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:xh};const Rh={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function Ah({__next40pxDefaultSize:e=!1,__nextHasNoMarginBottom:t=!1,value:n="",onChange:o,fontFamilies:r,className:i,...s}){const[l]=Ti("typography.fontFamilies");if(r||(r=l),!r||0===r.length)return null;const a=[{key:"",name:(0,T.__)("Default")},...r.map((({fontFamily:e,name:t})=>({key:e,name:t||e,style:{fontFamily:e}})))];t||I()("Bottom margin styles for wp.blockEditor.FontFamilyControl",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),e||void 0!==s.size&&"default"!==s.size||I()("36px default size for wp.blockEditor.__experimentalFontFamilyControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."});const c=a.find((e=>e.key===n))??"";return(0,d.jsx)(ws.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,T.__)("Font"),value:c,onChange:({selectedItem:e})=>o(e.key),options:a,className:ms("block-editor-font-family-control",i,{"is-next-has-no-margin-bottom":t}),...s})}(0,f.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return xh(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),wh(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,f.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return bs({linkColor:Sh(r),textColor:Bh(r),backgroundColor:Ch(r),gradient:wh(r)},Rh,e,t,n,o)}));const Nh=(e,t)=>e?t?(0,T.__)("Appearance"):(0,T.__)("Font style"):(0,T.__)("Font weight");function Lh(e){const{__next40pxDefaultSize:t=!1,onChange:n,hasFontStyles:o=!0,hasFontWeights:r=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:l},...a}=e,c=o||r,u=Nh(o,r),p={key:"default",name:(0,T.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:g,fontWeights:m,combinedStyleAndWeightOptions:f}=$i(i),b=(0,h.useMemo)((()=>o&&r?(()=>{const e=[p];return f&&e.push(...f),e})():o?(()=>{const e=[p];return g.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})})),e})():(()=>{const e=[p];return m.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})})),e})()),[e.options,g,m,f]),k=b.find((e=>e.style.fontStyle===s&&e.style.fontWeight===l))||b[0];return t||void 0!==a.size&&"default"!==a.size||I()("36px default size for wp.blockEditor.__experimentalFontAppearanceControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),c&&(0,d.jsx)(ws.CustomSelectControl,{...a,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:u,describedBy:k?o?r?(0,T.sprintf)((0,T.__)("Currently selected font appearance: %s"),k.name):(0,T.sprintf)((0,T.__)("Currently selected font style: %s"),k.name):(0,T.sprintf)((0,T.__)("Currently selected font weight: %s"),k.name):(0,T.__)("No selected font appearance"),options:b,value:k,onChange:({selectedItem:e})=>n(e.style)})}const Dh=1.5;var Oh=({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r})=>{const i=function(e){return void 0!==e&&""!==e}(t),s=(e,t)=>{if(i)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return Dh;default:return e}},l=i?t:"";return e||void 0!==r.size&&"default"!==r.size||I()("36px default size for wp.blockEditor.LineHeightControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,d.jsx)("div",{className:"block-editor-line-height-control",children:(0,d.jsx)(ws.__experimentalNumberControl,{...r,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{const n=["insertText","insertFromPaste"].includes(t.payload.event.nativeEvent?.inputType),o=s(e.value,n);return{...e,value:o}},onChange:(e,{event:t})=>{""!==e?"click"!==t.type?n(`${e}`):n(s(`${e}`,!1)):n()},label:(0,T.__)("Line height"),placeholder:Dh,step:.01,spinFactor:10,value:l,min:0,spinControls:"custom"})})};function zh({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r}){const[i]=Ti("spacing.units"),s=(0,ws.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return e||void 0!==r.size&&"default"!==r.size||I()("36px default size for wp.blockEditor.__experimentalLetterSpacingControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...r,label:(0,T.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:s,onChange:n})}var Vh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),Fh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),Hh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),Uh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});const Gh=[{label:(0,T.__)("Align text left"),value:"left",icon:Vh},{label:(0,T.__)("Align text center"),value:"center",icon:Fh},{label:(0,T.__)("Align text right"),value:"right",icon:Hh},{label:(0,T.__)("Justify text"),value:"justify",icon:Uh}],$h=["left","center","right"];function Wh({className:e,value:t,onChange:n,options:o=$h}){const r=(0,h.useMemo)((()=>Gh.filter((e=>o.includes(e.value)))),[o]);return r.length?(0,d.jsx)(ws.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,T.__)("Text alignment"),className:ms("block-editor-text-alignment-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:r.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))}):null}var Kh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),Zh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),qh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})});const Yh=[{label:(0,T.__)("None"),value:"none",icon:Ha},{label:(0,T.__)("Uppercase"),value:"uppercase",icon:Kh},{label:(0,T.__)("Lowercase"),value:"lowercase",icon:Zh},{label:(0,T.__)("Capitalize"),value:"capitalize",icon:qh}];function Xh({className:e,value:t,onChange:n}){return(0,d.jsx)(ws.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,T.__)("Letter case"),className:ms("block-editor-text-transform-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:Yh.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}var Qh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),Jh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})});const eg=[{label:(0,T.__)("None"),value:"none",icon:Ha},{label:(0,T.__)("Underline"),value:"underline",icon:Qh},{label:(0,T.__)("Strikethrough"),value:"line-through",icon:Jh}];function tg({value:e,onChange:t,className:n}){return(0,d.jsx)(ws.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,T.__)("Decoration"),className:ms("block-editor-text-decoration-control",n),value:e,onChange:n=>{t(n===e?void 0:n)},children:eg.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}var ng=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),og=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})});const rg=[{label:(0,T.__)("Horizontal"),value:"horizontal-tb",icon:ng},{label:(0,T.__)("Vertical"),value:(0,T.isRTL)()?"vertical-lr":"vertical-rl",icon:og}];function ig({className:e,value:t,onChange:n}){return(0,d.jsx)(ws.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,T.__)("Orientation"),className:ms("block-editor-writing-mode-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:rg.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const sg=1,lg=6;function ag(e){const t=ug(e),n=dg(e),o=pg(e),r=hg(e),i=mg(e),s=gg(e),l=fg(e),a=bg(e),c=kg(e),u=cg(e);return t||n||o||r||i||s||u||l||a||c}function cg(e){return!1!==e?.typography?.defaultFontSizes&&e?.typography?.fontSizes?.default?.length||e?.typography?.fontSizes?.theme?.length||e?.typography?.fontSizes?.custom?.length||e?.typography?.customFontSize}function ug(e){return["default","theme","custom"].some((t=>e?.typography?.fontFamilies?.[t]?.length))}function dg(e){return e?.typography?.lineHeight}function pg(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function hg(e){return e?.typography?.letterSpacing}function gg(e){return e?.typography?.textTransform}function mg(e){return e?.typography?.textAlign}function fg(e){return e?.typography?.textDecoration}function bg(e){return e?.typography?.writingMode}function kg(e){return e?.typography?.textColumns}function vg({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T.__)("Typography"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const _g={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,writingMode:!0,textColumns:!0};function yg({as:e=vg,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=_g,fitText:l=!1}){const a=e=>ts({settings:r},"",e),c=ug(r),u=a(o?.typography?.fontFamily),{fontFamilies:p,fontFamilyFaces:g}=(0,h.useMemo)((()=>function(e,t){const n=e?.typography?.fontFamilies,o=["default","theme","custom"].flatMap((e=>n?.[e]??[])),r=o.find((e=>e.fontFamily===t))?.fontFace??[];return{fontFamilies:o,fontFamilyFaces:r}}(r,u)),[r,u]),m=e=>{const o=p?.find((({fontFamily:t})=>t===e))?.slug;n(me(t,["typography","fontFamily"],o?`var:preset|font-family|${o}`:e||void 0))},f=cg(r),b=!r?.typography?.customFontSize,k=function(e){const t=e?.typography?.fontSizes,n=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...n?t?.default??[]:[]]}(r),v=a(o?.typography?.fontSize),_=(()=>{const e=o?.typography?.fontSize;if(!e||"string"!=typeof e)return;if(e.startsWith("var:preset|font-size|"))return e.replace("var:preset|font-size|","");const t=e.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);return t?t[1]:void 0})(),y=(e,o)=>{n(me(t,["typography","fontSize"],(o?.slug?`var:preset|font-size|${o?.slug}`:e)||void 0))},x=pg(r),S=function(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,T.__)("Appearance"):(0,T.__)("Font style"):(0,T.__)("Font weight")}(r),w=r?.typography?.fontStyle,C=r?.typography?.fontWeight,B=a(o?.typography?.fontStyle),I=a(o?.typography?.fontWeight),{nearestFontStyle:j,nearestFontWeight:E}=function(e,t,n){let o=t,r=n;const{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:l}=$i(e),a=i?.some((({value:e})=>e===t)),c=s?.some((({value:e})=>e?.toString()===n?.toString()));var u,d;return a||(o=t?(u=i,"string"==typeof(d=t)&&d&&["normal","italic","oblique"].includes(d)?!u||0===u.length||u.find((e=>e.value===d))?d:"oblique"!==d||u.find((e=>"oblique"===e.value))?"":"italic":""):l?.find((e=>e.style.fontWeight===Zi(s,n)))?.style?.fontStyle),c||(r=n?Zi(s,n):l?.find((e=>e.style.fontStyle===(o||t)))?.style?.fontWeight),{nearestFontStyle:o,nearestFontWeight:r}}(g,B,I),M=(0,h.useCallback)((({fontStyle:e,fontWeight:o})=>{e===B&&o===I||n({...t,typography:{...t?.typography,fontStyle:e||void 0,fontWeight:o||void 0}})}),[B,I,n,t]),P=(0,h.useCallback)((()=>{M({})}),[M]);(0,h.useEffect)((()=>{j&&E?M({fontStyle:j,fontWeight:E}):P()}),[j,E,P,M]);const R=dg(r),A=a(o?.typography?.lineHeight),N=e=>{n(me(t,["typography","lineHeight"],e||void 0))},L=hg(r),D=a(o?.typography?.letterSpacing),O=e=>{n(me(t,["typography","letterSpacing"],e||void 0))},z=kg(r),V=a(o?.typography?.textColumns),F=e=>{n(me(t,["typography","textColumns"],e||void 0))},H=gg(r),U=a(o?.typography?.textTransform),G=e=>{n(me(t,["typography","textTransform"],e||void 0))},$=fg(r),W=a(o?.typography?.textDecoration),K=e=>{n(me(t,["typography","textDecoration"],e||void 0))},Z=bg(r),q=a(o?.typography?.writingMode),Y=e=>{n(me(t,["typography","writingMode"],e||void 0))},X=mg(r),Q=a(o?.typography?.textAlign),J=e=>{n(me(t,["typography","textAlign"],e||void 0))},ee=(0,h.useCallback)((e=>({...e,typography:{}})),[]);return(0,d.jsxs)(e,{resetAllFilter:ee,value:t,onChange:n,panelId:i,children:[c&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Font"),hasValue:()=>!!t?.typography?.fontFamily,onDeselect:()=>m(void 0),isShownByDefault:s.fontFamily,panelId:i,children:(0,d.jsx)(Ah,{fontFamilies:p,value:u,onChange:m,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),f&&!l&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Size"),hasValue:()=>!!t?.typography?.fontSize,onDeselect:()=>y(void 0),isShownByDefault:s.fontSize,panelId:i,children:(0,d.jsx)(ws.FontSizePicker,{value:_||v,valueMode:_?"slug":"literal",onChange:y,fontSizes:k,disableCustomFontSizes:b,withReset:!1,withSlider:!0,size:"__unstable-large"})}),x&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:S,hasValue:()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,onDeselect:P,isShownByDefault:s.fontAppearance,panelId:i,children:(0,d.jsx)(Lh,{value:{fontStyle:B,fontWeight:I},onChange:M,hasFontStyles:w,hasFontWeights:C,fontFamilyFaces:g,size:"__unstable-large"})}),R&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Line height"),hasValue:()=>void 0!==t?.typography?.lineHeight,onDeselect:()=>N(void 0),isShownByDefault:s.lineHeight,panelId:i,children:(0,d.jsx)(Oh,{__unstableInputWidth:"auto",value:A,onChange:N,size:"__unstable-large"})}),L&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Letter spacing"),hasValue:()=>!!t?.typography?.letterSpacing,onDeselect:()=>O(void 0),isShownByDefault:s.letterSpacing,panelId:i,children:(0,d.jsx)(zh,{value:D,onChange:O,size:"__unstable-large",__unstableInputWidth:"auto"})}),z&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Columns"),hasValue:()=>!!t?.typography?.textColumns,onDeselect:()=>F(void 0),isShownByDefault:s.textColumns,panelId:i,children:(0,d.jsx)(ws.__experimentalNumberControl,{label:(0,T.__)("Columns"),max:lg,min:sg,onChange:F,size:"__unstable-large",spinControls:"custom",value:V,initialPosition:1})}),$&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Decoration"),hasValue:()=>!!t?.typography?.textDecoration,onDeselect:()=>K(void 0),isShownByDefault:s.textDecoration,panelId:i,children:(0,d.jsx)(tg,{value:W,onChange:K,size:"__unstable-large",__unstableInputWidth:"auto"})}),Z&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Orientation"),hasValue:()=>!!t?.typography?.writingMode,onDeselect:()=>Y(void 0),isShownByDefault:s.writingMode,panelId:i,children:(0,d.jsx)(ig,{value:q,onChange:Y,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),H&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Letter case"),hasValue:()=>!!t?.typography?.textTransform,onDeselect:()=>G(void 0),isShownByDefault:s.textTransform,panelId:i,children:(0,d.jsx)(Xh,{value:U,onChange:G,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),X&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Text alignment"),hasValue:()=>!!t?.typography?.textAlign,onDeselect:()=>J(void 0),isShownByDefault:s.textAlign,panelId:i,children:(0,d.jsx)(Wh,{value:Q,onChange:J,size:"__unstable-large",__nextHasNoMarginBottom:!0})})]})}const xg="typography.lineHeight";const Sg=window.wp.tokenList;var wg=n.n(Sg);const Cg="typography.__experimentalFontFamily",{kebabCase:Bg}=G(ws.privateApis);function Ig(e,t,n){if(!(0,p.hasBlockSupport)(t,Cg))return e;if(ks(t,Jg,"fontFamily"))return e;if(!n?.fontFamily)return e;const o=new(wg())(e.className);o.add(`has-${Bg(n?.fontFamily)}-font-family`);const r=o.value;return e.className=r||void 0,e}var jg={useBlockProps:function({name:e,fontFamily:t}){return Ig({},e,{fontFamily:t})},addSaveProps:Ig,attributeKeys:["fontFamily"],hasSupport:e=>(0,p.hasBlockSupport)(e,Cg)};(0,f.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,p.hasBlockSupport)(e,Cg)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e}));const{kebabCase:Eg}=G(ws.privateApis),Tg=(e,t,n)=>{if(t){const n=e?.find((({slug:e})=>e===t));if(n)return n}return{size:n}};function Mg(e,t){const n=e?.find((({size:e})=>e===t));return n||{size:t}}function Pg(e){if(e)return`has-${Eg(e)}-font-size`}const Rg="typography.fontSize";function Ag(e,t,n){if(!(0,p.hasBlockSupport)(t,Rg))return e;if(ks(t,Jg,"fontSize"))return e;const o=new(wg())(e.className);o.add(Pg(n.fontSize));const r=o.value;return e.className=r||void 0,e}var Ng={useBlockProps:function({name:e,fontSize:t,style:n}){const[o,r,i]=Ti("typography.fontSizes","typography.fluid","layout");if(!(0,p.hasBlockSupport)(e,Rg)||ks(e,Jg,"fontSize")||!t&&!n?.typography?.fontSize)return;let s;return n?.typography?.fontSize&&(s={style:{fontSize:Wi({size:n.typography.fontSize},{typography:{fluid:r},layout:i})}}),t&&(s={style:{fontSize:Tg(o,t,n?.typography?.fontSize).size}}),s?Ag(s,e,{fontSize:t}):void 0},addSaveProps:Ag,attributeKeys:["fontSize","style","fitText"],hasSupport:e=>(0,p.hasBlockSupport)(e,Rg)};const Lg={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,f.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,p.hasBlockSupport)(e,Rg)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,f.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){const r=e.name;return bs({fontSize:(0,p.hasBlockSupport)(r,Rg)},Lg,e,t,n,o)}));const Dg=[{icon:Vh,title:(0,T.__)("Align text left"),align:"left"},{icon:Fh,title:(0,T.__)("Align text center"),align:"center"},{icon:Hh,title:(0,T.__)("Align text right"),align:"right"}],Og={placement:"bottom-start"};var zg=function({value:e,onChange:t,alignmentControls:n=Dg,label:o=(0,T.__)("Align text"),description:r=(0,T.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function l(n){return()=>t(e===n?void 0:n)}const a=n.find((t=>t.align===e)),c=s?ws.ToolbarGroup:ws.ToolbarDropdownMenu,u=s?{isCollapsed:i}:{toggleProps:{description:r},popoverProps:Og};return(0,d.jsx)(c,{icon:a?a.icon:(0,T.isRTL)()?Hh:Vh,label:o,controls:n.map((t=>{const{align:n}=t,o=e===n;return{...t,isActive:o,role:i?"menuitemradio":void 0,onClick:l(n)}})),...u})};const Vg=e=>(0,d.jsx)(zg,{...e,isToolbar:!1}),Fg=e=>(0,d.jsx)(zg,{...e,isToolbar:!0}),Hg="typography.textAlign",Ug=[{icon:Vh,title:(0,T.__)("Align text left"),align:"left"},{icon:Fh,title:(0,T.__)("Align text center"),align:"center"},{icon:Hh,title:(0,T.__)("Align text right"),align:"right"}],Gg=["left","center","right"],$g=[];function Wg(e){return Array.isArray(e)?Gg.filter((t=>e.includes(t))):!0===e?Gg:$g}var Kg={edit:function({style:e,name:t,setAttributes:n}){const o=xs(t),r=o?.typography?.textAlign,i=ga();if(!r||"default"!==i)return null;const s=Wg((0,p.getBlockSupport)(t,Hg));if(!s.length)return null;const l=Ug.filter((e=>s.includes(e.align)));return(0,d.jsx)(Rs,{group:"block",children:(0,d.jsx)(Vg,{value:e?.typography?.textAlign,onChange:t=>{const o={...e,typography:{...e?.typography,textAlign:t}};n({style:fs(o)})},alignmentControls:l})})},useBlockProps:function({name:e,style:t}){if(!t?.typography?.textAlign)return null;if(!Wg((0,p.getBlockSupport)(e,Hg)).length)return null;if(ks(e,Jg,"textAlign"))return null;const n=t.typography.textAlign;return{className:ms({[`has-text-align-${n}`]:n})}},addSaveProps:function(e,t,n){if(!n?.style?.typography?.textAlign)return e;const{textAlign:o}=n.style.typography,r=(0,p.getBlockSupport)(t,Hg);Wg(r).includes(o)&&!ks(t,Jg,"textAlign")&&(e.className=ms(`has-text-align-${o}`,e.className));return e},attributeKeys:["style"],hasSupport:e=>(0,p.hasBlockSupport)(e,Hg,!1)};function Zg(e,t){if(!e)return;t(0);const n=function(e,t){const n=e.scrollHeight>e.clientHeight;let o=5,r=2400,i=o;const s=window.getComputedStyle(e),l=parseFloat(s.paddingLeft)||0,a=parseFloat(s.paddingRight)||0,c=document.createRange();for(c.selectNodeContents(e);o<=r;){const s=Math.floor((o+r)/2);t(s);const u=c.getBoundingClientRect().width,d=e.scrollWidth<=e.clientWidth&&u<=e.clientWidth-l-a,p=n||e.scrollHeight<=e.clientHeight;d&&p?(i=s,o=s+1):r=s-1}return c.detach(),i}(e,t);return t(n),n}const qg={},Yg="typography.fitText";(0,f.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",(function(e){return(0,p.hasBlockSupport)(e,Yg)?e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}:e}));var Xg={useBlockProps:function({name:e,fitText:t,clientId:n}){return function({fitText:e,name:t,clientId:n}){const o=(0,p.hasBlockSupport)(t,Yg),r=bh(n),{blockAttributes:i,parentId:s}=(0,g.useSelect)((t=>n&&o&&e?{blockAttributes:t(ji).getBlockAttributes(n),parentId:t(ji).getBlockRootClientId(n)}:qg),[n,o,e]),l=(0,h.useCallback)((()=>{if(!r||!o||!e)return;const t=`fit-text-${n}`;let i=r.ownerDocument.getElementById(t);i||(i=r.ownerDocument.createElement("style"),i.id=t,r.ownerDocument.head.appendChild(i));const s=`#block-${n}`;Zg(r,(e=>{i.textContent=0===e?"":`${s} { font-size: ${e}px !important; }`}))}),[r,n,o,e]);(0,h.useEffect)((()=>{if(!(e&&r&&n&&o))return;const t=r,i=t.style.visibility;let s,a=null,c=null,u=null;return a=window.requestAnimationFrame((()=>{t.style.visibility="hidden",c=window.requestAnimationFrame((()=>{l(),u=setTimeout((()=>{t.style.visibility=i}),10)}))})),window.ResizeObserver&&t.parentElement&&(s=new window.ResizeObserver(l),s.observe(t.parentElement),s.observe(t)),()=>{null!==a&&window.cancelAnimationFrame(a),null!==c&&window.cancelAnimationFrame(c),null!==u&&clearTimeout(u),s&&s.disconnect();const e=`fit-text-${n}`,o=t.ownerDocument.getElementById(e);o&&o.remove()}}),[e,n,s,l,r,o]),(0,h.useEffect)((()=>{if(e&&r&&o){const e=window.requestAnimationFrame((()=>{r&&l()}));return()=>window.cancelAnimationFrame(e)}}),[i,e,l,r,o])}({fitText:t,name:e,clientId:n}),t&&(0,p.hasBlockSupport)(e,Yg)?{className:"has-fit-text"}:{}},addSaveProps:function(e,t,n){if(!(0,p.hasBlockSupport)(t,Yg))return e;const{fitText:o}=n;if(!o)return e;const r=e.className?`${e.className} has-fit-text`:"has-fit-text";return{...e,className:r}},attributeKeys:["fitText"],hasSupport:e=>(0,p.hasBlockSupport)(e,Yg),edit:()=>null};function Qg(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))}const Jg="typography",em=[xg,Rg,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",Cg,Hg,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalWritingMode","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing",Yg];function tm(e){const t={...Qg(e,["fontFamily"])},n=e?.typography?.fontSize,o=e?.typography?.fontFamily,r="string"==typeof n&&n?.startsWith("var:preset|font-size|")?n.substring(21):void 0,i=o?.startsWith("var:preset|font-family|")?o.substring(23):void 0;return t.typography={...Qg(t.typography,["fontFamily"]),fontSize:r?void 0:n},{style:fs(t),fontFamily:i,fontSize:r}}function nm(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 om({children:e,resetAllFilter:t}){const n=(0,h.useCallback)((e=>{const n=nm(e),o=t(n);return{...e,...tm(o)}}),[t]);return(0,d.jsx)(Fa,{group:"typography",resetAllFilter:n,children:e})}function rm({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,fontFamily:i,fontSize:s,fitText:l}=(0,g.useSelect)((function(t){const{style:n,fontFamily:o,fontSize:r,fitText:i}=t(ji).getBlockAttributes(e)||{};return{style:n,fontFamily:o,fontSize:r,fitText:i}}),[e]),a=ag(o),c=(0,h.useMemo)((()=>nm({style:r,fontFamily:i,fontSize:s})),[r,s,i]);if(!a)return null;const u=(0,p.getBlockSupport)(t,[Jg,"__experimentalDefaultControls"]);return(0,d.jsx)(yg,{as:om,panelId:e,settings:o,value:c,onChange:e=>{n(tm(e))},defaultControls:u,fitText:l})}const im=[],sm=new Intl.Collator("und",{numeric:!0}).compare;function lm(){const[e,t,n,o]=Ti("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),r=e??im,i=t??im,s=n&&!1!==o?n:im;return(0,h.useMemo)((()=>{const e=[{name:(0,T.__)("None"),slug:"0",size:0},...r,...i,...s];return e.every((({slug:e})=>/^[0-9]/.test(e)))&&e.sort(((e,t)=>sm(e.slug,t.slug))),e.length>Qs?[{name:(0,T.__)("Default"),slug:"default",size:void 0},...e]:e}),[r,i,s])}const am={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 cm({icon:e,isMixed:t=!1,minimumCustomValue:n,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,side:l,spacingSizes:a,type:c,value:u}){u=sl(u,a);let p=a;const f=a.length<=Qs,b=(0,g.useSelect)((e=>{const t=e(ji).getSettings();return t?.disableCustomSpacingSizes})),[k,v]=(0,h.useState)(!b&&void 0!==u&&!rl(u)),[_,y]=(0,h.useState)(n),x=(0,m.usePrevious)(u);u&&x!==u&&!rl(u)&&!0!==k&&v(!0);const[S]=Ti("spacing.units"),w=(0,ws.__experimentalUseCustomUnits)({availableUnits:S||["px","em","rem"]});let C=null;!f&&!k&&void 0!==u&&(!rl(u)||rl(u)&&t)?(p=[...a,{name:t?(0,T.__)("Mixed"):(0,T.sprintf)((0,T.__)("Custom (%s)"),u),slug:"custom",size:u}],C=p.length-1):t||(C=k?il(u,a):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":al(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(u,a));const B=(0,h.useMemo)((()=>(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(C)),[C])[1]||w[0]?.value,I=parseFloat(C,10),j=(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|${a[e]?.slug}`},E=t?(0,T.__)("Mixed"):null,M=p.map(((e,t)=>({key:t,name:e.name}))),P=a.slice(1,a.length-1).map(((e,t)=>({value:t+1,label:void 0}))),R=Js.includes(l)&&s?nl[l]:"",A=s?c?.toLowerCase():c,N=(0,T.sprintf)((0,T._x)("%1$s %2$s","spacing"),R,A).trim();return(0,d.jsxs)(ws.__experimentalHStack,{className:"spacing-sizes-control__wrapper",children:[e&&(0,d.jsx)(ws.Icon,{className:"spacing-sizes-control__icon",icon:e,size:24}),k&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.__experimentalUnitControl,{onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,onChange:e=>o((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:C,units:w,min:_,placeholder:E,disableUnits:t,label:N,hideLabelFromVision:!0,className:"spacing-sizes-control__custom-value-input",size:"__unstable-large",onDragStart:()=>{"-"===u?.charAt(0)&&y(0)},onDrag:()=>{"-"===u?.charAt(0)&&y(0)},onDragEnd:()=>{y(n)}}),(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,value:I,min:0,max:am[B]?.max??10,step:am[B]?.steps??.1,withInputField:!1,onChange:e=>{o([e,B].join(""))},className:"spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0,label:N,hideLabelFromVision:!0})]}),f&&!k&&(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,className:"spacing-sizes-control__range-control",value:C,onChange:e=>o(j(e)),onMouseDown:e=>{e?.nativeEvent?.offsetX<35&&void 0===u&&o("0")},withInputField:!1,"aria-valuenow":C,"aria-valuetext":a[C]?.name,renderTooltipContent:e=>void 0===u?void 0:a[e]?.name,min:0,max:a.length-1,marks:P,label:N,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:i,onBlur:r}),!f&&!k&&(0,d.jsx)(ws.CustomSelectControl,{className:"spacing-sizes-control__custom-select-control",value:M.find((e=>e.key===C))||"",onChange:e=>{o(j(e.selectedItem.key,"selectList"))},options:M,label:N,hideLabelFromVision:!0,size:"__unstable-large",onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r}),!b&&(0,d.jsx)(ws.Button,{label:k?(0,T.__)("Use size preset"):(0,T.__)("Set custom size"),icon:Gd,onClick:()=>{v(!k)},isPressed:k,size:"small",className:"spacing-sizes-control__custom-toggle",iconSize:24})]})}const um=["vertical","horizontal"];function dm({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=e=>n=>{if(!t)return;const o={...Object.keys(l).reduce(((e,t)=>(e[t]=sl(l[t],i),e)),{})};"vertical"===e&&(o.top=n,o.bottom=n),"horizontal"===e&&(o.left=n,o.right=n),t(o)},c=r?.length?um.filter((e=>cl(r,e))):um;return(0,d.jsx)(d.Fragment,{children:c.map((t=>{const r="vertical"===t?l.top:l.left;return(0,d.jsx)(cm,{icon:tl[t],label:nl[t],minimumCustomValue:e,onChange:a(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:r,withInputField:!1},`spacing-sizes-control-${t}`)}))})}function pm({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=r?.length?Js.filter((e=>r.includes(e))):Js,c=e=>n=>{const o={...Object.keys(l).reduce(((e,t)=>(e[t]=sl(l[t],i),e)),{})};o[e]=n,t(o)};return(0,d.jsx)(d.Fragment,{children:a.map((t=>(0,d.jsx)(cm,{icon:tl[t],label:nl[t],minimumCustomValue:e,onChange:c(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:l[t],withInputField:!1},`spacing-sizes-control-${t}`)))})}function hm({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,values:a}){return(0,d.jsx)(cm,{label:nl[i],minimumCustomValue:e,onChange:(c=i,e=>{const n={...Object.keys(a).reduce(((e,t)=>(e[t]=sl(a[t],s),e)),{})};n[c]=e,t(n)}),onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,value:a[i],withInputField:!1});var c}function gm({isLinked:e,...t}){const n=e?(0,T.__)("Unlink sides"):(0,T.__)("Link sides");return(0,d.jsx)(ws.Button,{...t,size:"small",icon:e?Ld:ec,iconSize:24,label:n})}function mm({inputProps:e,label:t,minimumCustomValue:n=0,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,sides:l=Js,useSelect:a,values:c}){const u=lm(),p=c||el,g=1===l?.length,m=l?.includes("horizontal")&&l?.includes("vertical")&&2===l?.length,[f,b]=(0,h.useState)(function(e={},t){const{top:n,right:o,bottom:r,left:i}=e,s=[n,o,r,i].filter(Boolean),l=!(n!==r||i!==o||!n&&!i),a=!s.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),c=t?.includes("horizontal")&&t?.includes("vertical")&&2===t?.length;if(cl(t)&&(l||a))return ol.axial;if(c&&1===s.length){let t;return Object.entries(e).some((([e,n])=>(t=e,void 0!==n))),t}return 1!==t?.length||s.length?ol.custom:t[0]}(p,l)),k={...e,minimumCustomValue:n,onChange:e=>{const t={...c,...e};o(t)},onMouseOut:r,onMouseOver:i,sides:l,spacingSizes:u,type:t,useSelect:a,values:p},v=Js.includes(f)&&s?nl[f]:"",_=(0,T.sprintf)((0,T._x)("%1$s %2$s","spacing"),t,v).trim();return(0,d.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,d.jsxs)(ws.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:_}),!g&&!m&&(0,d.jsx)(gm,{label:t,onClick:()=>{b(f===ol.axial?ol.custom:ol.axial)},isLinked:f===ol.axial})]}),(0,d.jsx)(ws.__experimentalVStack,{spacing:.5,children:f===ol.axial?(0,d.jsx)(dm,{...k}):f===ol.custom?(0,d.jsx)(pm,{...k}):(0,d.jsx)(hm,{side:f,...k,showSideInLabel:s})})]})}const fm={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 bm({label:e=(0,T.__)("Height"),onChange:t,value:n}){const o=parseFloat(n),[r]=Ti("spacing.units"),i=(0,ws.__experimentalUseCustomUnits)({availableUnits:r||["%","px","em","rem","vh","vw"]}),s=(0,h.useMemo)((()=>(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(n)),[n])[1]||i[0]?.value||"px";return(0,d.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:e}),(0,d.jsxs)(ws.Flex,{children:[(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.__experimentalUnitControl,{value:n,units:i,onChange:t,onUnitChange:e=>{const[o,r]=(0,ws.__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,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,value:o,min:0,max:fm[s]?.max??100,step:fm[s]?.step??.1,withInputField:!1,onChange:e=>{t([e,s].join(""))},__nextHasNoMarginBottom:!0,label:e,hideLabelFromVision:!0})})})]})]})}function km(e,t){const{getBlockOrder:n,getBlockAttributes:o}=(0,g.useSelect)(ji);return(r,i)=>{const s=(i-1)*t+r-1;let l=0;for(const r of n(e)){const{columnStart:e,rowStart:n}=o(r).style?.layout??{};(n-1)*t+e-1{"fixed"!==i||s||t({...e,selfStretch:"fit"})}),[]),(0,d.jsxs)(ws.__experimentalVStack,{as:ws.__experimentalToolsPanelItem,spacing:2,hasValue:()=>!!i,label:a,onDeselect:()=>{t({selfStretch:void 0,flexSize:void 0})},isShownByDefault:o,panelId:r,children:[(0,d.jsxs)(ws.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:xm(n),value:i||"fit",help:vm(i,n),onChange:e=>{t({selfStretch:e,flexSize:"fixed"!==e?null:s})},isBlock:!0,children:[(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"fit",label:(0,T._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"fill",label:(0,T._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,T._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),"fixed"===i&&(0,d.jsx)(ws.__experimentalUnitControl,{size:"__unstable-large",units:u,onChange:e=>{t({selfStretch:i,flexSize:e})},value:s,min:0,label:a,hideLabelFromVision:!0})]})}function xm(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,T.__)("Width"):(0,T.__)("Height")}function Sm({childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{columnStart:i,rowStart:s,columnSpan:l,rowSpan:a}=e,{columnCount:c,rowCount:u}=n??{},p=(0,g.useSelect)((e=>e(ji).getBlockRootClientId(r))),{moveBlocksToPosition:h,__unstableMarkNextChangeAsNotPersistent:m}=(0,g.useDispatch)(ji),f=km(p,c||3),b=c?c-(i??1)+1:void 0,k=window.__experimentalEnableGridInteractivity&&u?u-(s??1)+1:void 0;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.Flex,{as:ws.__experimentalToolsPanelItem,hasValue:()=>!!l||!!a,label:(0,T.__)("Grid span"),onDeselect:()=>{t({columnSpan:void 0,rowSpan:void 0})},isShownByDefault:o,panelId:r,children:[(0,d.jsx)(ws.FlexItem,{style:{width:"50%"},children:(0,d.jsx)(ws.__experimentalInputControl,{size:"__unstable-large",label:(0,T.__)("Column span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10),o=b?Math.min(n,b):n;t({columnStart:i,rowStart:s,rowSpan:a,columnSpan:o})},value:l??1,min:1,max:b})}),(0,d.jsx)(ws.FlexItem,{style:{width:"50%"},children:(0,d.jsx)(ws.__experimentalInputControl,{size:"__unstable-large",label:(0,T.__)("Row span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10),o=k?Math.min(n,k):n;t({columnStart:i,rowStart:s,columnSpan:l,rowSpan:o})},value:a??1,min:1,max:k})})]}),window.__experimentalEnableGridInteractivity&&(0,d.jsxs)(ws.Flex,{as:ws.__experimentalToolsPanelItem,hasValue:()=>!!i||!!s,label:(0,T.__)("Grid placement"),onDeselect:()=>{t({columnStart:void 0,rowStart:void 0})},isShownByDefault:!1,panelId:r,children:[(0,d.jsx)(ws.FlexItem,{style:{width:"50%"},children:(0,d.jsx)(ws.__experimentalInputControl,{size:"__unstable-large",label:(0,T.__)("Column"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:n,rowStart:s,columnSpan:l,rowSpan:a}),m(),h([r],p,p,f(n,s))},value:i??1,min:1,max:c?c-(l??1)+1:void 0})}),(0,d.jsx)(ws.FlexItem,{style:{width:"50%"},children:(0,d.jsx)(ws.__experimentalInputControl,{size:"__unstable-large",label:(0,T.__)("Row"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:n,columnSpan:l,rowSpan:a}),m(),h([r],p,p,f(i,n))},value:s??1,min:1,max:u?u-(a??1)+1:void 0})})]})]})}function wm({panelId:e,value:t,onChange:n=()=>{},options:o,defaultValue:r="auto",hasValue:i,isShownByDefault:s=!0}){const l=t??"auto",[a,c,u]=Ti("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),p=c?.map((({name:e,ratio:t})=>({label:e,value:t}))),h=a?.map((({name:e,ratio:t})=>({label:e,value:t}))),g=[{label:(0,T._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...u?h:[],...p||[],{label:(0,T._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:i||(()=>l!==r),label:(0,T.__)("Aspect ratio"),onDeselect:()=>n(void 0),isShownByDefault:s,panelId:e,children:(0,d.jsx)(ws.SelectControl,{label:(0,T.__)("Aspect ratio"),value:l,options:o??g,onChange:n,size:"__unstable-large",__nextHasNoMarginBottom:!0})})}const Cm=["horizontal","vertical"];function Bm(e){const t=Im(e),n=jm(e),o=Em(e),r=Tm(e),i=Mm(e),s=Pm(e),l=Rm(e),a=Am(e);return"web"===h.Platform.OS&&(t||n||o||r||i||s||l||a)}function Im(e){return e?.layout?.contentSize}function jm(e){return e?.layout?.wideSize}function Em(e){return e?.spacing?.padding}function Tm(e){return e?.spacing?.margin}function Mm(e){return e?.spacing?.blockGap}function Pm(e){return e?.dimensions?.minHeight}function Rm(e){return e?.dimensions?.aspectRatio}function Am(e){const{type:t="default",default:{type:n="default"}={},allowSizingOnChildren:o=!1}=e?.parentLayout??{},r=("flex"===n||"flex"===t||"grid"===n||"grid"===t)&&o;return!!e?.layout&&r}function Nm(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 Lm(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function Dm({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T.__)("Dimensions"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const Om={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,aspectRatio:!0,childLayout:!0};function zm({as:e=Dm,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=Om,onVisualize:l=()=>{},includeLayoutControls:a=!1}){const{dimensions:c,spacing:u}=r,p=e=>e&&"object"==typeof e?Object.keys(e).reduce(((t,n)=>(t[n]=ts({settings:{dimensions:c,spacing:u}},"",e[n]),t)),{}):ts({settings:{dimensions:c,spacing:u}},"",e),g=function(e){const{defaultSpacingSizes:t,spacingSizes:n}=e?.spacing||{};return!1!==t&&n?.default?.length>0||n?.theme?.length>0||n?.custom?.length>0}(r),m=(0,ws.__experimentalUseCustomUnits)({availableUnits:r?.spacing?.units||["%","px","em","rem","vw"]}),f=-1/0,[b,k]=(0,h.useState)(f),v=Im(r)&&a,_=p(o?.layout?.contentSize),y=e=>{n(me(t,["layout","contentSize"],e||void 0))},x=jm(r)&&a,S=p(o?.layout?.wideSize),w=e=>{n(me(t,["layout","wideSize"],e||void 0))},C=Em(r),B=Lm(p(o?.spacing?.padding)),I=Array.isArray(r?.spacing?.padding)?r?.spacing?.padding:r?.spacing?.padding?.sides,j=I&&I.some((e=>Cm.includes(e))),E=e=>{const o=Nm(e,I);n(me(t,["spacing","padding"],o))},M=()=>l("padding"),P=Tm(r),R=Lm(p(o?.spacing?.margin)),A=Array.isArray(r?.spacing?.margin)?r?.spacing?.margin:r?.spacing?.margin?.sides,N=A&&A.some((e=>Cm.includes(e))),L=e=>{const o=Nm(e,A);n(me(t,["spacing","margin"],o))},D=()=>l("margin"),O=Mm(r),z=Array.isArray(r?.spacing?.blockGap)?r?.spacing?.blockGap:r?.spacing?.blockGap?.sides,V=z&&z.some((e=>Cm.includes(e))),F=p(o?.spacing?.blockGap),H=function(e,t){return e?"string"==typeof e?t?{top:e,right:e,bottom:e,left:e}:{top:e}:{...e,right:e?.left,bottom:e?.top}:e}(F,V),U=e=>{n(me(t,["spacing","blockGap"],e))},G=e=>{e||U(null),!V&&e?.hasOwnProperty("top")?U(e.top):U({top:e?.top,left:e?.left})},$=Pm(r),W=p(o?.dimensions?.minHeight),K=e=>{const o=me(t,["dimensions","minHeight"],e);n(me(o,["dimensions","aspectRatio"],void 0))},Z=Rm(r),q=p(o?.dimensions?.aspectRatio),Y=Am(r),X=o?.layout,Q=(0,h.useCallback)((e=>({...e,layout:fs({...e?.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0,columnStart:void 0,rowStart:void 0,columnSpan:void 0,rowSpan:void 0}),spacing:{...e?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...e?.dimensions,minHeight:void 0,aspectRatio:void 0}})),[]),J=()=>l(!1);return(0,d.jsxs)(e,{resetAllFilter:Q,value:t,onChange:n,panelId:i,children:[(v||x)&&(0,d.jsx)("span",{className:"span-columns",children:(0,T.__)("Set the width of the main content area.")}),v&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Content width"),hasValue:()=>!!t?.layout?.contentSize,onDeselect:()=>y(void 0),isShownByDefault:s.contentSize??Om.contentSize,panelId:i,children:(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Content width"),labelPosition:"top",value:_||"",onChange:e=>{y(e)},units:m,prefix:(0,d.jsx)(ws.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,d.jsx)(Ol,{icon:zl})})})}),x&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Wide width"),hasValue:()=>!!t?.layout?.wideSize,onDeselect:()=>w(void 0),isShownByDefault:s.wideSize??Om.wideSize,panelId:i,children:(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Wide width"),labelPosition:"top",value:S||"",onChange:e=>{w(e)},units:m,prefix:(0,d.jsx)(ws.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,d.jsx)(Ol,{icon:Vl})})})}),C&&(0,d.jsxs)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,label:(0,T.__)("Padding"),onDeselect:()=>E(void 0),isShownByDefault:s.padding??Om.padding,className:ms({"tools-panel-item-spacing":g}),panelId:i,children:[!g&&(0,d.jsx)(ws.BoxControl,{__next40pxDefaultSize:!0,values:B,onChange:E,label:(0,T.__)("Padding"),sides:I,units:m,allowReset:!1,splitOnAxis:j,inputProps:{onMouseOver:M,onMouseOut:J}}),g&&(0,d.jsx)(mm,{values:B,onChange:E,label:(0,T.__)("Padding"),sides:I,units:m,allowReset:!1,onMouseOver:M,onMouseOut:J})]}),P&&(0,d.jsxs)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,label:(0,T.__)("Margin"),onDeselect:()=>L(void 0),isShownByDefault:s.margin??Om.margin,className:ms({"tools-panel-item-spacing":g}),panelId:i,children:[!g&&(0,d.jsx)(ws.BoxControl,{__next40pxDefaultSize:!0,values:R,onChange:L,inputProps:{min:b,onDragStart:()=>{k(0)},onDragEnd:()=>{k(f)},onMouseOver:D,onMouseOut:J},label:(0,T.__)("Margin"),sides:A,units:m,allowReset:!1,splitOnAxis:N}),g&&(0,d.jsx)(mm,{values:R,onChange:L,minimumCustomValue:-1/0,label:(0,T.__)("Margin"),sides:A,units:m,allowReset:!1,onMouseOver:D,onMouseOut:J})]}),O&&(0,d.jsxs)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.blockGap,label:(0,T.__)("Block spacing"),onDeselect:()=>U(void 0),isShownByDefault:s.blockGap??Om.blockGap,className:ms({"tools-panel-item-spacing":g,"single-column":!g&&!V}),panelId:i,children:[!g&&(V?(0,d.jsx)(ws.BoxControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Block spacing"),min:0,onChange:G,units:m,sides:z,values:H,allowReset:!1,splitOnAxis:V}):(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Block spacing"),min:0,onChange:U,units:m,value:F})),g&&(0,d.jsx)(mm,{label:(0,T.__)("Block spacing"),min:0,onChange:G,showSideInLabel:!1,sides:V?z:["top"],values:H,allowReset:!1})]}),Y&&(0,d.jsx)(_m,{value:X,onChange:e=>{n({...t,layout:{...e}})},parentLayout:r?.parentLayout,panelId:i,isShownByDefault:s.childLayout??Om.childLayout}),$&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.dimensions?.minHeight,label:(0,T.__)("Minimum height"),onDeselect:()=>{K(void 0)},isShownByDefault:s.minHeight??Om.minHeight,panelId:i,children:(0,d.jsx)(bm,{label:(0,T.__)("Minimum height"),value:W,onChange:K})}),Z&&(0,d.jsx)(wm,{hasValue:()=>!!t?.dimensions?.aspectRatio,value:q,onChange:e=>{const o=me(t,["dimensions","aspectRatio"],e);n(me(o,["dimensions","minHeight"],void 0))},panelId:i,isShownByDefault:s.aspectRatio??Om.aspectRatio})]})}const Vm=new WeakMap;var Fm=function(e){const t=(0,m.useRefEffect)((t=>{function n(n){const{deltaX:o,deltaY:r,target:i}=n,s=e.current;let l=Vm.get(s);l||(l=(0,Ga.getScrollContainer)(s),Vm.set(s,l));const a=(0,Ga.getScrollContainer)(i);t.contains(a)||l.scrollBy(o,r)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e]);return e?t:null};const Hm=".block-editor-block-list__block",Um=".block-list-appender",Gm=".block-editor-button-block-appender";function $m(e,t){return e.closest(Hm)===t.closest(Hm)}function Wm(e,t){return t.closest([Hm,Um,Gm].join(","))===e}function Km(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(Hm);return t?t.id.slice(6):void 0}function Zm(e,t){const n=Math.min(e.left,t.left),o=Math.max(e.right,t.right),r=Math.max(e.bottom,t.bottom),i=Math.min(e.top,t.top);return new window.DOMRectReadOnly(n,i,o-n,r-i)}function qm(e){const t=e.ownerDocument.defaultView;if(!t)return!1;if(e.classList.contains("components-visually-hidden"))return!1;const n=e.getBoundingClientRect();if(0===n.width||0===n.height)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});const o=t.getComputedStyle(e);return"none"!==o.display&&"hidden"!==o.visibility&&"0"!==o.opacity}function Ym(e){const t=window.getComputedStyle(e);return"auto"===t.overflowX||"scroll"===t.overflowX||"auto"===t.overflowY||"scroll"===t.overflowY}const Xm=["core/navigation"];function Qm(e){const t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let n=e.getBoundingClientRect();const o=e.getAttribute("data-type");if(o&&Xm.includes(o)){const t=[e];let o;for(;o=t.pop();)if(!Ym(o))for(const e of o.children)if(qm(e)){n=Zm(n,e.getBoundingClientRect()),t.push(e)}}const r=Math.max(n.left,0),i=Math.min(n.right,t.innerWidth);return n=new window.DOMRectReadOnly(r,n.top,i-r,n.height),n}const Jm=Number.MAX_SAFE_INTEGER;const ef=(0,h.forwardRef)((function({clientId:e,bottomClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,shift:i=!0,...s},l){const a=bh(e),c=bh(t??e),u=(0,m.useMergeRefs)([l,Fm(r)]),[p,g]=(0,h.useReducer)((e=>(e+1)%Jm),0);(0,h.useLayoutEffect)((()=>{if(!a)return;const e=new window.MutationObserver(g);return e.observe(a,{attributes:!0}),()=>{e.disconnect()}}),[a]);const f=(0,h.useMemo)((()=>{if(!(p<0||!a||t&&!c))return{getBoundingClientRect:()=>c?Zm(Qm(a),Qm(c)):Qm(a),contextElement:a}}),[p,a,t,c]);return!a||t&&!c?null:(0,d.jsx)(ws.Popover,{ref:u,animate:!1,focusOnMount:!1,anchor:f,__unstableSlotName:o,inline:!o,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:ms("block-editor-block-popover",s.className),variant:"unstyled",children:n})}));var tf=(0,h.forwardRef)((({clientId:e,bottomClientId:t,children:n,...o},r)=>(0,d.jsx)(ef,{...o,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:r,children:n})));function nf({selectedElement:e,additionalStyles:t={},children:n}){const[o,r]=(0,h.useState)(e.offsetWidth),[i,s]=(0,h.useState)(e.offsetHeight);(0,h.useEffect)((()=>{const t=new window.ResizeObserver((()=>{r(e.offsetWidth),s(e.offsetHeight)}));return t.observe(e,{box:"border-box"}),()=>t.disconnect()}),[e]);const l=(0,h.useMemo)((()=>({position:"absolute",width:o,height:i,...t})),[o,i,t]);return(0,d.jsx)("div",{style:l,children:n})}var of=(0,h.forwardRef)((function({clientId:e,bottomClientId:t,children:n,shift:o=!1,additionalStyles:r,...i},s){t??=e;const l=bh(e);return(0,d.jsx)(ef,{ref:s,clientId:e,bottomClientId:t,shift:o,...i,children:l&&e===t?(0,d.jsx)(nf,{selectedElement:l,additionalStyles:r,children:n}):n})}));function rf({clientId:e,value:t,computeStyle:n,forceShow:o}){const r=bh(e),[i,s]=(0,h.useReducer)((()=>n(r)));(0,h.useEffect)((()=>{if(!r)return;const e=new window.MutationObserver(s);return e.observe(r,{attributes:!0,attributeFilter:["style","class"]}),()=>{e.disconnect()}}),[r]);const l=(0,h.useRef)(t),[a,c]=(0,h.useState)(!1);return(0,h.useEffect)((()=>{if(Ja()(t,l.current)||o)return;c(!0),l.current=t;const e=setTimeout((()=>{c(!1)}),400);return()=>{c(!1),clearTimeout(e)}}),[t,o]),a||o?(0,d.jsx)(of,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,d.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})}):null}function sf(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function lf({clientId:e,value:t,forceShow:n}){return(0,d.jsx)(rf,{clientId:e,value:t?.spacing?.margin,computeStyle:e=>{const t=sf(e,"margin-top"),n=sf(e,"margin-right"),o=sf(e,"margin-bottom"),r=sf(e,"margin-left");return{borderTopWidth:t,borderRightWidth:n,borderBottomWidth:o,borderLeftWidth:r,top:t?`-${t}`:0,right:n?`-${n}`:0,bottom:o?`-${o}`:0,left:r?`-${r}`:0}},forceShow:n})}function af({clientId:e,value:t,forceShow:n}){return(0,d.jsx)(rf,{clientId:e,value:t?.spacing?.padding,computeStyle:e=>({borderTopWidth:sf(e,"padding-top"),borderRightWidth:sf(e,"padding-right"),borderBottomWidth:sf(e,"padding-bottom"),borderLeftWidth:sf(e,"padding-left")}),forceShow:n})}const cf="dimensions",uf="spacing";function df({children:e,resetAllFilter:t}){const n=(0,h.useCallback)((e=>{const n=e.style,o=t(n);return{...e,style:o}}),[t]);return(0,d.jsx)(Fa,{group:"dimensions",resetAllFilter:n,children:e})}function pf({clientId:e,name:t,setAttributes:n,settings:o}){const r=Bm(o),i=(0,g.useSelect)((t=>t(ji).getBlockAttributes(e)?.style),[e]),[s,l]=function(){const[e,t]=(0,h.useState)(!1),{hideBlockInterface:n,showBlockInterface:o}=G((0,g.useDispatch)(ji));return(0,h.useEffect)((()=>{e?n():o()}),[e,o,n]),[e,t]}();if(!r)return null;const a={...(0,p.getBlockSupport)(t,[cf,"__experimentalDefaultControls"]),...(0,p.getBlockSupport)(t,[uf,"__experimentalDefaultControls"])};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(zm,{as:df,panelId:e,settings:o,value:i,onChange:e=>{n({style:fs(e)})},defaultControls:a,onVisualize:l}),!!o?.spacing?.padding&&(0,d.jsx)(af,{forceShow:"padding"===s,clientId:e,value:i}),!!o?.spacing?.margin&&(0,d.jsx)(lf,{forceShow:"margin"===s,clientId:e,value:i})]})}function hf(e,t="any"){if("web"!==h.Platform.OS)return!1;const n=(0,p.getBlockSupport)(e,cf);return!0===n||("any"===t?!(!n?.aspectRatio&&!n?.minHeight):!!n?.[t])}var gf={useBlockProps:function({name:e,minHeight:t,style:n}){if(!hf(e,"aspectRatio")||ks(e,cf,"aspectRatio"))return{};const o=ms({"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=>hf(e,"aspectRatio")};function mf(){I()("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}const ff=[...em,wp,yh,cf,Mu,uf,Cp],bf=e=>ff.some((t=>(0,p.hasBlockSupport)(e,t)));function kf(e={}){const t={};return(0,Pi.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const vf={[`${wp}.__experimentalSkipSerialization`]:["border"],[`${yh}.__experimentalSkipSerialization`]:[yh],[`${Jg}.__experimentalSkipSerialization`]:[Jg],[`${cf}.__experimentalSkipSerialization`]:[cf],[`${uf}.__experimentalSkipSerialization`]:[uf],[`${Cp}.__experimentalSkipSerialization`]:[Cp]},_f={...vf,[`${cf}.aspectRatio`]:[`${cf}.aspectRatio`],[`${Mu}`]:[Mu]},yf={[`${cf}.aspectRatio`]:!0,[`${Mu}`]:!0},xf={gradients:"gradient"};function Sf(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;Sf(o[t],[n],!0)}else 1===e.length&&delete o[e[0]]})),o}function wf(e,t,n,o=_f){if(!bf(t))return e;let{style:r}=n;return Object.entries(o).forEach((([e,n])=>{const o=yf[e]||(0,p.getBlockSupport)(t,e);!0===o&&(r=Sf(r,n)),Array.isArray(o)&&o.forEach((e=>{const t=xf[e]||e;r=Sf(r,[[...n,t]])}))})),e.style={...kf(r),...e.style},e}var Cf={edit:function({clientId:e,name:t,setAttributes:n,__unstableParentLayout:o}){const r=xs(t,o),i=ga(),s={clientId:e,name:t,setAttributes:n,settings:{...r,typography:{...r.typography,textAlign:!1}}};return"default"!==i?null:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Mh,{...s}),(0,d.jsx)(Du,{...s}),(0,d.jsx)(rm,{...s}),(0,d.jsx)(Pp,{...s}),(0,d.jsx)(pf,{...s})]})},hasSupport:bf,addSaveProps:wf,attributeKeys:["style"],useBlockProps:function({name:e,style:t}){const n=(0,m.useInstanceId)(If,"wp-elements"),o=`.${n}`,r=t?.elements,i=(0,h.useMemo)((()=>{if(!r)return;const t=[];return Bf.forEach((({elementType:n,pseudo:i,elements:s})=>{if(ks(e,yh,n))return;const l=r?.[n];if(l){const e=ns(o,p.__EXPERIMENTAL_ELEMENTS[n]);t.push((0,Pi.compileCSS)(l,{selector:e})),i&&i.forEach((e=>{l[e]&&t.push((0,Pi.compileCSS)(l[e],{selector:ns(o,`${p.__EXPERIMENTAL_ELEMENTS[n]}${e}`)}))}))}s&&s.forEach((e=>{r[e]&&t.push((0,Pi.compileCSS)(r[e],{selector:ns(o,p.__EXPERIMENTAL_ELEMENTS[e])}))}))})),t.length>0?t.join(""):void 0}),[o,r,e]);return _s({css:i}),wf({className:n},e,{style:t},vf)}};const Bf=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],If={};(0,f.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return bf(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));(0,f.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){return t=e,(0,p.hasBlockSupport)(t,"__experimentalSettings",!1)?(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e;var t}));var jf=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var Ef=function e({id:t,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l}){let a;a="unset"===s?(0,d.jsx)(ws.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):s?(0,d.jsx)(ws.DuotoneSwatch,{values:s}):(0,d.jsx)(Ol,{icon:jf});const c=(0,T.__)("Apply duotone filter"),u=`${(0,m.useInstanceId)(e,"duotone-control",t)}__description`;return(0,d.jsx)(ws.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,T.__)("Duotone")},renderToggle:({isOpen:e,onToggle:t})=>(0,d.jsx)(ws.ToolbarButton,{showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==Wa.DOWN||(n.preventDefault(),t())},label:c,icon:a}),renderContent:()=>(0,d.jsxs)(ws.MenuGroup,{label:(0,T.__)("Duotone"),children:[(0,d.jsx)("p",{children:(0,T.__)("Create a two-tone color effect without losing your original image.")}),(0,d.jsx)(ws.DuotonePicker,{"aria-label":c,"aria-describedby":u,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l})]})})};function Tf(e){return`${e}{filter:none}`}function Mf(e,t){return`${e}{filter:url(#${t})}`}function Pf(e,t){const n=function(e=[]){const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=wd(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 Rf(e,t="root",n={}){if(!t)return null;const{fallback:o=!1}=n,{name:r,selectors:i,supports:s}=e,l=i&&Object.keys(i).length>0,a=Array.isArray(t)?t.join("."):t;let c=null;if(c=l&&i.root?i?.root:s?.__experimentalSelector?s.__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(l){return fe(i,`${a}.root`,null)||fe(i,a,null)||e}const t=fe(s,`${a}.__experimentalSelector`,null);return t?ns(c,t):e}let d;return l&&(d=fe(i,a,null)),d||(o?Rf(e,u[0],n):null)}const Af=[];function Nf(e,{presetSetting:t,defaultSetting:n}){const o=!e?.color?.[n],r=e?.color?.[t]?.custom||Af,i=e?.color?.[t]?.theme||Af,s=e?.color?.[t]?.default||Af;return(0,h.useMemo)((()=>[...r,...i,...o?Af:s]),[o,r,i,s])}function Lf(e){return Df(e)}function Df(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function Of({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T._x)("Filters","Name for applying graphical effects"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const zf={duotone:!0},Vf={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,T.__)("Duotone")},Ff=({indicator:e,label:t})=>(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",children:[(0,d.jsx)(ws.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,d.jsx)(ws.Flex,{expanded:!1,children:"unset"!==e&&e?(0,d.jsx)(ws.DuotoneSwatch,{values:e}):(0,d.jsx)(ws.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"})})}),(0,d.jsx)(ws.FlexItem,{title:t,children:t})]}),Hf=(e,t)=>({onToggle:n,isOpen:o})=>{const r=(0,h.useRef)(void 0),i={onClick:n,className:ms("block-editor-global-styles-filters-panel__dropdown-toggle",{"is-open":o}),"aria-expanded":o,ref:r},s={onClick:()=>{o&&n(),t(),r.current?.focus()},className:"block-editor-panel-duotone-settings__reset",label:(0,T.__)("Reset")};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...i,children:(0,d.jsx)(Ff,{indicator:e,label:(0,T.__)("Duotone")})}),e&&(0,d.jsx)(ws.Button,{size:"small",icon:Ha,...s})]})};function Uf({as:e=Of,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=zf}){const l=Df(r),a=Nf(r,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),c=Nf(r,{presetSetting:"palette",defaultSetting:"defaultPalette"}),u=(p=o?.filter?.duotone,ts({settings:r},"",p));var p;const g=e=>{const o=a.find((({colors:t})=>t===e)),r=o?`var:preset|duotone|${o.slug}`:e;n(me(t,["filter","duotone"],r))},m=()=>g(void 0),f=(0,h.useCallback)((e=>({...e,filter:{...e.filter,duotone:void 0}})),[]);return(0,d.jsx)(e,{resetAllFilter:f,value:t,onChange:n,panelId:i,children:l&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Duotone"),hasValue:()=>!!t?.filter?.duotone,onDeselect:m,isShownByDefault:s.duotone,panelId:i,children:(0,d.jsx)(ws.Dropdown,{popoverProps:Vf,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:Hf(u,m),renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,d.jsxs)(ws.MenuGroup,{label:(0,T.__)("Duotone"),children:[(0,d.jsx)("p",{children:(0,T.__)("Create a two-tone color effect without losing your original image.")}),(0,d.jsx)(ws.DuotonePicker,{colorPalette:c,duotonePalette:a,disableCustomColors:!0,disableCustomDuotone:!0,value:u,onChange:g})]})})})})})}const Gf=[],$f=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");function Wf({presetSetting:e,defaultSetting:t}){const[n,o,r,i]=Ti(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,h.useMemo)((()=>[...o||Gf,...r||Gf,...n&&i||Gf]),[n,o,r,i])}function Kf(e,t){if(!e)return;const n=t?.find((({slug:t})=>e===`var:preset|duotone|${t}`));return n?n.colors:void 0}Bd([Id]);var Zf={shareWithChildBlocks:!0,edit:function({style:e,setAttributes:t,name:n}){const o=e?.color?.duotone,r=xs(n),i=ga(),s=Wf({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),l=Wf({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[a,c]=Ti("color.custom","color.customDuotone"),u=!a,p=!c||0===l?.length&&u;if(0===s?.length&&p)return null;if("default"!==i)return null;const h="unset"===o||Array.isArray(o)?o:Kf(o,s);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Fa,{group:"filter",children:(0,d.jsx)(Uf,{value:{filter:{duotone:h}},onChange:n=>{const o={...e,color:{...n?.filter}};t({style:fs(o)})},settings:r})}),(0,d.jsx)(Rs,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,d.jsx)(Ef,{duotonePalette:s,colorPalette:l,disableCustomDuotone:p,disableCustomColors:u,value:h,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,s),r={...e,color:{...e?.color,duotone:o??n}};t({style:fs(r)})},settings:r})})]})},useBlockProps:function({clientId:e,name:t,style:n}){const o=(0,m.useInstanceId)(Yf),r=(0,h.useMemo)((()=>{const e=(0,p.getBlockType)(t);if(e){if(!(0,p.getBlockSupport)(e,"filter.duotone",!1))return null;const t=(0,p.getBlockSupport)(e,"color.__experimentalDuotone",!1);if(t){const n=Rf(e);return"string"==typeof t?ns(n,t):n}return Rf(e,"filter.duotone",{fallback:!0})}}),[t]),i=n?.color?.duotone,s=`wp-duotone-${o}`,l=r&&i;return qf({clientId:e,id:s,selector:r,attribute:i}),{className:l?s:""}},attributeKeys:["style"],hasSupport:e=>(0,p.hasBlockSupport)(e,"filter.duotone")};function qf({clientId:e,id:t,selector:n,attribute:o}){const r=Wf({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(o),s=i?void 0:Kf(o,r),l="string"==typeof o&&s;let a=null;l?a=s:("string"==typeof o&&!l||i)&&(a=o);const c=n.split(",").map((e=>`.${t}${e.trim()}`)).join(", "),u=Array.isArray(a)||"unset"===a;ys(u?{css:"unset"!==a?Mf(c,t):Tf(c),__unstableType:"presets"}:void 0),ys(u?{assets:"unset"!==a?Pf(t,a):"",__unstableType:"svgs"}:void 0);const d=bh(e);(0,h.useEffect)((()=>{if(u&&d&&$f){const e=d.style.display;d.style.setProperty("display","inline-block"),d.offsetHeight,d.style.setProperty("display",e)}}),[u,d,a])}const Yf={};function Xf(e){return(0,g.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(ji),{getBlockType:r,getActiveBlockVariation:i}=t(p.store),s=n(e),l=r(s);if(!l)return null;const a=o(e),c=i(s,a),u=(0,p.isReusableBlock)(l)||(0,p.isTemplatePart)(l),d=(u?(0,p.__experimentalGetBlockLabel)(l,a):void 0)||l.title,h=function(e){const t=e?.style?.position?.type;return"sticky"===t?(0,T.__)("Sticky"):"fixed"===t?(0,T.__)("Fixed"):null}(a),g={isSynced:u,title:d,icon:l.icon,description:l.description,anchor:a?.anchor,positionLabel:h,positionType:a?.style?.position?.type,name:a?.metadata?.name};return c?{isSynced:u,title:c.title||l.title,icon:c.icon||l.icon,description:c.description||l.description,anchor:a?.anchor,positionLabel:h,positionType:a?.style?.position?.type,name:a?.metadata?.name}:g}),[e])}(0,f.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,p.hasBlockSupport)(e,"filter.duotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));const Qf="position",Jf={key:"default",value:"",name:(0,T.__)("Default")},eb={key:"sticky",value:"sticky",name:(0,T._x)("Sticky","Name for the value of the CSS position property"),hint:(0,T.__)("The block will stick to the top of the window instead of scrolling.")},tb={key:"fixed",value:"fixed",name:(0,T._x)("Fixed","Name for the value of the CSS position property"),hint:(0,T.__)("The block will not move when the page is scrolled.")},nb=["top","right","bottom","left"],ob=["sticky","fixed"];function rb(e){const t=e?.style?.position?.type;return"sticky"===t||"fixed"===t}function ib({name:e}={}){const[t,n]=Ti("position.fixed","position.sticky"),o=!t&&!n;return r=e,!(0,p.getBlockSupport)(r,Qf)||o;var r}function sb({style:e={},clientId:t,name:n,setAttributes:o}){const r=function(e){const t=(0,p.getBlockSupport)(e,Qf);return!(!0!==t&&!t?.fixed)}(n),i=function(e){const t=(0,p.getBlockSupport)(e,Qf);return!(!0!==t&&!t?.sticky)}(n),s=e?.position?.type,{firstParentClientId:l}=(0,g.useSelect)((e=>{const{getBlockParents:n}=e(ji),o=n(t);return{firstParentClientId:o[o.length-1]}}),[t]),a=Xf(l),c=i&&s===eb.value&&a?(0,T.sprintf)((0,T.__)("The block will stick to the scrollable area of the parent %s block."),a.title):null,u=(0,h.useMemo)((()=>{const e=[Jf];return(i||s===eb.value)&&e.push(eb),(r||s===tb.value)&&e.push(tb),e}),[r,i,s]),m=s&&u.find((e=>e.value===s))||Jf;return h.Platform.select({web:u.length>1?(0,d.jsx)(Fa,{group:"position",children:(0,d.jsx)(ws.BaseControl,{__nextHasNoMarginBottom:!0,help:c,children:(0,d.jsx)(ws.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Position"),hideLabelFromVision:!0,describedBy:(0,T.sprintf)((0,T.__)("Currently selected position: %s"),m.name),options:u,value:m,onChange:({selectedItem:t})=>{(t=>{const n={...e,position:{...e?.position,type:t,top:"sticky"===t||"fixed"===t?"0px":void 0}};o({style:fs(n)})})(t.value)},size:"__unstable-large"})})}):null,native:null})}var lb={edit:function(e){return ib(e)?null:(0,d.jsx)(sb,{...e})},useBlockProps:function({name:e,style:t}){const n=(0,p.hasBlockSupport)(e,Qf),o=ib({name:e}),r=n&&!o,i=(0,m.useInstanceId)(ab),s=`.wp-container-${i}.wp-container-${i}`;let l;r&&(l=function({selector:e,style:t}){let n="";const{type:o}=t?.position||{};return ob.includes(o)?(n+=`${e} {`,n+=`position: ${o};`,nb.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:t})||"");const a=ms({[`wp-container-${i}`]:r&&!!l,[`is-position-${t?.position?.type}`]:r&&!!l&&!!t?.position?.type});return _s({css:l}),{className:a}},attributeKeys:["style"],hasSupport:e=>(0,p.hasBlockSupport)(e,Qf)};const ab={};const cb={button:"wp-element-button",caption:"wp-element-caption"},ub={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"},{kebabCase:db}=G(ws.privateApis);function pb(e={},t,n){let o=[];return Object.keys(e).forEach((r=>{const i=t+db(r.replace("/","-")),s=e[r];if(s instanceof Object){const e=i+n;o=[...o,...pb(s,e,n)]}else o.push(`${i}: ${s}`)})),o}const hb=(e,t)=>{const n={};return Object.entries(e).forEach((([e,o])=>{if("root"===e||!t?.[e])return;const r="string"==typeof o;if(r||Object.entries(o).forEach((([o,r])=>{if("root"===o||!t?.[e][o])return;const i=gb({[e]:{[o]:t[e][o]}});n[r]=[...n[r]||[],...i],delete t[e][o]})),r||o.root){const i=r?o:o.root,s=gb({[e]:t[e]});n[i]=[...n[i]||[],...s],delete t[e]}})),n};function gb(e={},t="",n,o={},r=!1){const i=qi===t,s=Object.entries(p.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,[o,{value:r,properties:s,useEngine:l,rootOnly:a}])=>{if(a&&!i)return t;const c=r;if("elements"===c[0]||l)return t;const u=fe(e,c);if("--wp--style--root--padding"===o&&("string"==typeof u||!n))return t;if(s&&"string"!=typeof u)Object.entries(s).forEach((e=>{const[n,o]=e;if(!fe(u,[o],!1))return;const r=n.startsWith("--")?n:db(n);t.push(`${r}: ${(0,Pi.getCSSValueFromRawStyle)(fe(u,[o]))}`)}));else if(fe(e,c,!1)){const n=o.startsWith("--")?o:db(o);t.push(`${n}: ${(0,Pi.getCSSValueFromRawStyle)(fe(e,c))}`)}return t}),[]);e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=rs(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...Au(e.background)}}));return(0,Pi.getCSSRules)(e).forEach((e=>{if(i&&(n||r)&&e.key.startsWith("padding"))return;const t=e.key.startsWith("--")?e.key:db(e.key);let l=rs(e.value,o);"font-size"===t&&(l=Wi({size:l},o?.settings)),"aspect-ratio"===t&&s.push("min-height: unset"),s.push(`${t}: ${l}`)})),s}function mb({layoutDefinitions:e=Fs,style:t,selector:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:i}){let s="",l=o?ul(t?.spacing?.blockGap):"";if(r&&(n===qi?l=l||"0.5em":!o&&i&&(l=i)),l&&e&&(Object.values(e).forEach((({className:e,name:t,spacingStyles:r})=>{(o||"flex"===t||"grid"===t)&&r?.length&&r.forEach((t=>{const r=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{r.push(`${e}: ${t||l}`)})),r.length){let i="";i=o?n===qi?`:root :where(.${e})${t?.selector||""}`:`:root :where(${n}-${e})${t?.selector||""}`:n===qi?`:where(.${e}${t?.selector||""})`:`:where(${n}.${e}${t?.selector||""})`,s+=`${i} { ${r.join("; ")}; }`}}))})),n===qi&&o&&(s+=`${Yi} { --wp--style--block-gap: ${l}; }`)),n===qi&&e){const t=["block","flex","grid"];Object.values(e).forEach((({className:e,displayMode:o,baseStyles:r})=>{o&&t.includes(o)&&(s+=`${n} .${e} { display:${o}; }`),r?.length&&r.forEach((t=>{const n=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{n.push(`${e}: ${t}`)})),n.length){s+=`${`.${e}${t?.selector||""}`} { ${n.join("; ")}; }`}}))}))}return s}const fb=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function bb(e){if(!e)return{};const t=Object.entries(e).filter((([e])=>fb.includes(e))).map((([e,t])=>[e,JSON.parse(JSON.stringify(t))]));return Object.fromEntries(t)}const kb=(e,t)=>{const n=[];if(!e?.styles)return n;const o=bb(e.styles);return o&&n.push({styles:o,selector:qi,skipSelectorWrapper:!0}),Object.entries(p.__EXPERIMENTAL_ELEMENTS).forEach((([t,o])=>{e.styles?.elements?.[t]&&n.push({styles:e.styles?.elements?.[t],selector:o,skipSelectorWrapper:!cb[t]})})),Object.entries(e.styles?.blocks??{}).forEach((([e,o])=>{const r=bb(o);if(o?.variations){const i={};Object.entries(o.variations).forEach((([o,r])=>{i[o]=bb(r),r?.css&&(i[o].css=r.css);const s=t[e]?.styleVariationSelectors?.[o];Object.entries(r?.elements??{}).forEach((([e,t])=>{t&&p.__EXPERIMENTAL_ELEMENTS[e]&&n.push({styles:t,selector:ns(s,p.__EXPERIMENTAL_ELEMENTS[e])})})),Object.entries(r?.blocks??{}).forEach((([e,o])=>{const r=ns(s,t[e]?.selector),i=ns(s,t[e]?.duotoneSelector),l=function(e,t){if(!e||!t)return;const n={};return Object.entries(t).forEach((([t,o])=>{"string"==typeof o&&(n[t]=ns(e,o)),"object"==typeof o&&(n[t]={},Object.entries(o).forEach((([o,r])=>{n[t][o]=ns(e,r)})))})),n}(s,t[e]?.featureSelectors),a=bb(o);o?.css&&(a.css=o.css),n.push({selector:r,duotoneSelector:i,featureSelectors:l,fallbackGapValue:t[e]?.fallbackGapValue,hasLayoutSupport:t[e]?.hasLayoutSupport,styles:a}),Object.entries(o.elements??{}).forEach((([e,t])=>{t&&p.__EXPERIMENTAL_ELEMENTS[e]&&n.push({styles:t,selector:ns(r,p.__EXPERIMENTAL_ELEMENTS[e])})}))}))})),r.variations=i}t?.[e]?.selector&&n.push({duotoneSelector:t[e].duotoneSelector,fallbackGapValue:t[e].fallbackGapValue,hasLayoutSupport:t[e].hasLayoutSupport,selector:t[e].selector,styles:r,featureSelectors:t[e].featureSelectors,styleVariationSelectors:t[e].styleVariationSelectors}),Object.entries(o?.elements??{}).forEach((([o,r])=>{r&&t?.[e]&&p.__EXPERIMENTAL_ELEMENTS[o]&&n.push({styles:r,selector:t[e]?.selector.split(",").map((e=>p.__EXPERIMENTAL_ELEMENTS[o].split(",").map((t=>e+" "+t)))).join(",")})}))})),n},vb=(e,t)=>{const n=[];if(!e?.settings)return n;const o=e=>{let t={};return Xi.forEach((({path:n})=>{const o=fe(e,n,!1);!1!==o&&(t=me(t,n,o))})),t},r=o(e.settings),i=e.settings?.custom;return(Object.keys(r).length>0||i)&&n.push({presets:r,custom:i,selector:Yi}),Object.entries(e.settings?.blocks??{}).forEach((([e,r])=>{const i=o(r),s=r.custom;(Object.keys(i).length>0||s)&&n.push({presets:i,custom:s,selector:t[e]?.selector})})),n},_b=(e,t)=>{const n=vb(e,t);let o="";return n.forEach((({presets:t,custom:n,selector:r})=>{const i=function(e={},t){return Xi.reduce(((n,{path:o,valueKey:r,valueFunc:i,cssVarInfix:s})=>{const l=fe(e,o,[]);return["default","theme","custom"].forEach((e=>{l[e]&&l[e].forEach((e=>{r&&!i?n.push(`--wp--preset--${s}--${db(e.slug)}: ${e[r]}`):i&&"function"==typeof i&&n.push(`--wp--preset--${s}--${db(e.slug)}: ${i(e,t)}`)}))})),n}),[])}(t,e?.settings),s=pb(n,"--wp--custom--","--");s.length>0&&i.push(...s),i.length>0&&(o+=`${r}{${i.join(";")};}`)})),o},yb=(e,t,n,o,r=!1,i=!1,s=void 0)=>{const l={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},a=kb(e,t),c=vb(e,t),u=e?.settings?.useRootPaddingAwareAlignments,{contentSize:d,wideSize:p}=e?.settings?.layout||{},h=l.marginReset||l.rootPadding||l.layoutStyles;let g="";if(l.presets&&(d||p)&&(g+=`${Yi} {`,g=d?g+` --wp--style--global--content-size: ${d};`:g,g=p?g+` --wp--style--global--wide-size: ${p};`:g,g+="}"),h&&(g+=":where(body) {margin: 0;",l.rootPadding&&u&&(g+="padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;\n\t\t\t\t"),g+="}"),l.blockStyles&&a.forEach((({selector:t,duotoneSelector:s,styles:a,fallbackGapValue:c,hasLayoutSupport:d,featureSelectors:p,styleVariationSelectors:h,skipSelectorWrapper:m})=>{if(p){const e=hb(p,a);Object.entries(e).forEach((([e,t])=>{if(t.length){const n=t.join(";");g+=`:root :where(${e}){${n};}`}}))}if(s){const e={};a?.filter&&(e.filter=a.filter,delete a.filter);const t=gb(e);t.length&&(g+=`${s}{${t.join(";")};}`)}r||qi!==t&&!d||(g+=mb({style:a,selector:t,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:c}));const f=gb(a,t,u,e,i);if(f?.length){g+=`${m?t:`:root :where(${t})`}{${f.join(";")};}`}a?.css&&(g+=wb(a.css,`:root :where(${t})`)),l.variationStyles&&h&&Object.entries(h).forEach((([t,n])=>{const o=a?.variations?.[t];if(o){if(p){const e=hb(p,o);Object.entries(e).forEach((([e,t])=>{if(t.length){const o=function(e,t){const n=e.split(","),o=[];return n.forEach((e=>{o.push(`${t.trim()}${e.trim()}`)})),o.join(", ")}(e,n),r=t.join(";");g+=`:root :where(${o}){${r};}`}}))}const t=gb(o,n,u,e);t.length&&(g+=`:root :where(${n}){${t.join(";")};}`),o?.css&&(g+=wb(o.css,`:root :where(${n})`))}}));const b=Object.entries(a).filter((([e])=>e.startsWith(":")));b?.length&&b.forEach((([e,n])=>{const o=gb(n);if(!o?.length)return;const r=`:root :where(${t.split(",").map((t=>t+e)).join(",")}){${o.join(";")};}`;g+=r}))})),l.layoutStyles&&(g+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",g+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",g+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),l.blockGap&&n){const t=ul(e?.styles?.spacing?.blockGap)||"0.5em";g+=`:root :where(.wp-site-blocks) > * { margin-block-start: ${t}; margin-block-end: 0; }`,g+=":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",g+=":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&c.forEach((({selector:e,presets:t})=>{qi!==e&&Yi!==e||(e="");const n=function(e="*",t={}){return Xi.reduce(((n,{path:o,cssVarInfix:r,classes:i})=>{if(!i)return n;const s=fe(t,o,[]);return["default","theme","custom"].forEach((t=>{s[t]&&s[t].forEach((({slug:t})=>{i.forEach((({classSuffix:o,propertyName:i})=>{const s=`.has-${db(t)}-${o}`,l=e.split(",").map((e=>`${e}${s}`)).join(","),a=`var(--wp--preset--${r}--${db(t)})`;n+=`${l}{${i}: ${a} !important;}`}))}))})),n}),"")}(e,t);n.length>0&&(g+=n)})),g};function xb(e,t){return vb(e,t).flatMap((({presets:e})=>function(e={}){return Xi.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=fe(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>Pf(`wp-duotone-${e.slug}`,e.colors))))).join("")}))}(e)))}const Sb=(e,t,n)=>{const o={};return e.forEach((e=>{const r=e.name,i=Rf(e);let s=Rf(e,"filter.duotone");if(!s){const t=Rf(e),n=(0,p.getBlockSupport)(e,"color.__experimentalDuotone",!1);s=n&&ns(t,n)}const l=!!e?.supports?.layout||!!e?.supports?.__experimentalLayout,a=e?.supports?.spacing?.blockGap?.__experimentalDefault,c=t(r),u={};c?.forEach((e=>{const t=n?`-${n}`:"",o=`${e.name}${t}`,r=function(e,t){const n=`.is-style-${e}`;if(!t)return n;const o=/((?::\([^)]+\))?\s*)([^\s:]+)/,r=(e,t,o)=>t+o+n;return t.split(",").map((e=>e.replace(o,r))).join(",")}(o,i);u[o]=r}));const d=((e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;const n={root:t};return Object.entries(ub).forEach((([t,o])=>{const r=Rf(e,t);r&&(n[o]=r)})),n})(e,i);o[r]={duotoneSelector:s,fallbackGapValue:a,featureSelectors:Object.keys(d).length?d:void 0,hasLayoutSupport:l,name:r,selector:i,styleVariationSelectors:c?.length?u:void 0}})),o};function wb(e,t){let n="";if(!e||""===e.trim())return n;return e.split("&").forEach((e=>{if(!e||""===e.trim())return;if(!e.includes("{"))n+=`:root :where(${t}){${e.trim()}}`;else{const o=e.replace("}","").split("{");if(2!==o.length)return;const[r,i]=o,s=r.match(/([>+~\s]*::[a-zA-Z-]+)/),l=s?s[1]:"",a=s?r.replace(l,"").trim():r.trim();let c;c=""===a?t:r.startsWith(" ")?ns(t,a):function(e,t){return e.includes(",")?e.split(",").map((e=>e+t)).join(","):e+t}(t,a),n+=`:root :where(${c})${l}{${i.trim()}}`}})),n}function Cb(e={},t){const[n]=cs("spacing.blockGap"),o=null!==n,r=!o,i=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return!!t().disableLayoutStyles})),{getBlockStyles:s}=(0,g.useSelect)(p.store);return(0,h.useMemo)((()=>{if(!e?.styles||!e?.settings)return[];const n=(l=e,l.styles?.blocks?.["core/separator"]&&l.styles?.blocks?.["core/separator"].color?.background&&!l.styles?.blocks?.["core/separator"].color?.text&&!l.styles?.blocks?.["core/separator"].border?.color?{...l,styles:{...l.styles,blocks:{...l.styles.blocks,"core/separator":{...l.styles.blocks["core/separator"],color:{...l.styles.blocks["core/separator"].color,text:l.styles?.blocks["core/separator"].color.background}}}}}:l);var l;const a=Sb((0,p.getBlockTypes)(),s),c=_b(n,a),u=yb(n,a,o,r,i,t),d=xb(n,a),h=[{css:c,isGlobalStyles:!0},{css:u,isGlobalStyles:!0},{css:n.styles.css??"",isGlobalStyles:!0},{assets:d,__unstableType:"svg",isGlobalStyles:!0}];return(0,p.getBlockTypes)().forEach((e=>{if(n.styles.blocks[e.name]?.css){const t=a[e.name].selector;h.push({css:wb(n.styles.blocks[e.name]?.css,t),isGlobalStyles:!0})}})),[h,n.settings]}),[o,r,e,i,t,s])}function Bb(e=!1){const{merged:t}=(0,h.useContext)(is);return Cb(t,e)}const Ib="is-style-";function jb(e){return e?e.split(/\s+/).reduce(((e,t)=>{if(t.startsWith(Ib)){const n=t.slice(9);"default"!==n&&e.push(n)}return e}),[]):[]}function Eb({override:e}){ys(e)}function Tb(e,t,n){if(!e?.styles?.blocks?.[t]?.variations?.[n])return;const o=t=>{Object.keys(t).forEach((n=>{const r=t[n];if("object"==typeof r&&null!==r)if(void 0!==r.ref)if("string"!=typeof r.ref||""===r.ref.trim())delete t[n];else{const o=fe(e,r.ref);o?t[n]=o:delete t[n]}else o(r),0===Object.keys(r).length&&delete t[n]}))},r=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[n]));return o(r),r}var Mb={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>jb(e).length>0,useBlockProps:function({name:e,className:t,clientId:n}){const{getBlockStyles:o}=(0,g.useSelect)(p.store),r=function(e,t=[]){const n=jb(e);if(!n)return null;for(const e of n)if(t.some((t=>t.name===e)))return e;return null}(t,o(e)),i=`${Ib}${r}-${n}`,{settings:s,styles:l}=function(e,t,n){const{merged:o}=(0,h.useContext)(is),{globalSettings:r,globalStyles:i}=(0,g.useSelect)((e=>{const t=e(ji).getSettings();return{globalSettings:t.__experimentalFeatures,globalStyles:t[N]}}),[]);return(0,h.useMemo)((()=>{const s=Tb({settings:o?.settings??r,styles:o?.styles??i},e,t);return{settings:o?.settings??r,styles:{blocks:{[e]:{variations:{[`${t}-${n}`]:s}}}}}}),[o,r,i,t,n,e])}(e,r,n),a=(0,h.useMemo)((()=>{if(!r)return;const e={settings:s,styles:l},t=Sb((0,p.getBlockTypes)(),o,n);return yb(e,t,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})}),[r,s,l,o,n]);return ys({id:`variation-${n}`,css:a,__unstableType:"variation",variation:r,clientId:n}),r?{className:i}:{}}};const Pb="layout",{kebabCase:Rb}=G(ws.privateApis);function Ab(e){return(0,p.hasBlockSupport)(e,"layout")||(0,p.hasBlockSupport)(e,"__experimentalLayout")}function Nb(e={},t=""){const{layout:n}=e,{default:o}=(0,p.getBlockSupport)(t,Pb)||{},r=n?.inherit||n?.contentSize||n?.wideSize?{...n,type:"constrained"}:n||o||{},i=[];if(Fs[r?.type||"default"]?.className){const e=Fs[r?.type||"default"]?.className,n=t.split("/"),o=`wp-block-${"core"===n[0]?n.pop():n.join("-")}-${e}`;i.push(e,o)}return(0,g.useSelect)((e=>(r?.inherit||r?.contentSize||"constrained"===r?.type)&&e(ji).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments),[r?.contentSize,r?.inherit,r?.type])&&i.push("has-global-padding"),r?.orientation&&i.push(`is-${Rb(r.orientation)}`),r?.justifyContent&&i.push(`is-content-justification-${Rb(r.justifyContent)}`),r?.flexWrap&&"nowrap"===r.flexWrap&&i.push("is-nowrap"),i}var Lb={shareWithChildBlocks:!0,edit:function({layout:e,setAttributes:t,name:n,clientId:o}){const r=xs(n),{layout:i}=r,{themeSupportsLayout:s}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return{themeSupportsLayout:t().supportsLayout}}),[]);if("default"!==ga())return null;const l=(0,p.getBlockSupport)(n,Pb,{}),a={...i,...l},{allowSwitching:c,allowEditing:u=!0,allowInheriting:h=!0,default:m}=a;if(!u)return null;const f={...l,...e},{type:b,default:{type:k="default"}={}}=f,v=b||k,_=!(!h||v&&"default"!==v&&"constrained"!==v&&!f.inherit),y=e||m||{},{inherit:x=!1,contentSize:S=null}=y;if(("default"===v||"constrained"===v)&&!s)return null;const w=Xl(v),C=Xl("constrained"),B=!y.type&&(S||x),I=!!x||!!S,j=e=>t({layout:e});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Fa,{children:(0,d.jsxs)(ws.PanelBody,{title:(0,T.__)("Layout"),children:[_&&(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Inner blocks use content width"),checked:"constrained"===w?.name||I,onChange:()=>t({layout:{type:"constrained"===w?.name||I?"default":"constrained"}}),help:"constrained"===w?.name||I?(0,T.__)("Nested blocks use content width with options for full and wide widths."):(0,T.__)("Nested blocks will fill the width of this container.")})}),!x&&c&&(0,d.jsx)(Db,{type:v,onChange:e=>t({layout:{type:e}})}),w&&"default"!==w.name&&(0,d.jsx)(w.inspectorControls,{layout:y,onChange:j,layoutBlockSupport:a,name:n,clientId:o}),C&&B&&(0,d.jsx)(C.inspectorControls,{layout:y,onChange:j,layoutBlockSupport:a,name:n,clientId:o})]})}),!x&&w&&(0,d.jsx)(w.toolBarControls,{layout:y,onChange:j,layoutBlockSupport:l,name:n,clientId:o})]})},attributeKeys:["layout"],hasSupport:e=>Ab(e)};function Db({type:e,onChange:t}){return(0,d.jsx)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,T.__)("Layout type"),__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:Yl.map((({name:e,label:t})=>(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:e,label:t},e)))})}function Ob({block:e,props:t,blockGapSupport:n,layoutClasses:o}){const{name:r,attributes:i}=t,s=(0,m.useInstanceId)(e),{layout:l}=i,{default:a}=(0,p.getBlockSupport)(r,Pb)||{},c=l?.inherit||l?.contentSize||l?.wideSize?{...l,type:"constrained"}:l||a||{},u=`wp-container-${Rb(r)}-is-layout-`,h=`.${u}${s}`,g=null!==n,f=Xl(c?.type||"default"),b=f?.getLayoutStyle?.({blockName:r,selector:h,layout:c,style:i?.style,hasBlockGapSupport:g}),k=ms({[`${u}${s}`]:!!b},o);return _s({css:b}),(0,d.jsx)(e,{...t,__unstableLayoutClassNames:k})}const zb=(0,m.createHigherOrderComponent)((e=>t=>{const{clientId:n,name:o,attributes:r}=t,i=Ab(o),s=Nb(r,o),l=(0,g.useSelect)((e=>{if(!i)return;const{getSettings:t,getBlockSettings:o}=G(e(ji)),{disableLayoutStyles:r}=t();if(r)return;const[s]=o(n,"spacing.blockGap");return{blockGapSupport:s}}),[i,n]);return l?(0,d.jsx)(Ob,{block:e,props:t,layoutClasses:s,...l}):(0,d.jsx)(e,{...t,__unstableLayoutClassNames:i?s:void 0})}),"withLayoutStyles");function Vb(e,t){return Array.from({length:t},((t,n)=>e+n))}(0,f.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return"type"in(e.attributes?.layout??{})||Ab(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,f.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",zb);class Fb{constructor({columnStart:e,rowStart:t,columnEnd:n,rowEnd:o,columnSpan:r,rowSpan:i}={}){this.columnStart=e??1,this.rowStart=t??1,this.columnEnd=void 0!==r?this.columnStart+r-1:n??this.columnStart,this.rowEnd=void 0!==i?this.rowStart+i-1:o??this.rowStart}get columnSpan(){return this.columnEnd-this.columnStart+1}get rowSpan(){return this.rowEnd-this.rowStart+1}contains(e,t){return e>=this.columnStart&&e<=this.columnEnd&&t>=this.rowStart&&t<=this.rowEnd}containsRect(e){return this.contains(e.columnStart,e.rowStart)&&this.contains(e.columnEnd,e.rowEnd)}intersectsRect(e){return this.columnStart<=e.columnEnd&&this.columnEnd>=e.columnStart&&this.rowStart<=e.rowEnd&&this.rowEnd>=e.rowStart}}function Hb(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Ub(e,t){const n=[];for(const o of e.split(" ")){const e=n[n.length-1],r=e?e.end+t:0,i=r+parseFloat(o);n.push({start:r,end:i})}return n}function Gb(e,t,n="start"){return e.reduce(((o,r,i)=>Math.abs(r[n]-t)/ to quickly insert new blocks."),{kbd:(0,d.jsx)("kbd",{})}),(0,h.createInterpolateElement)((0,T.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,d.jsx)("kbd",{})}),(0,h.createInterpolateElement)((0,T.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,d.jsx)("kbd",{})}),(0,T.__)("Drag files into the editor to automatically insert media blocks."),(0,T.__)("Change a block's type by pressing the block icon on the toolbar.")];var Kb=function(){const[e]=(0,h.useState)(Math.floor(Math.random()*Wb.length));return(0,d.jsx)(ws.Tip,{children:Wb[e]})},Zb=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),qb=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});const{Badge:Yb}=G(ws.privateApis);var Xb=function({title:e,icon:t,description:n,blockType:o,className:r,name:i,allowParentNavigation:s,children:l}){o&&(I()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o));const a=(0,g.useSelect)((e=>{if(!s)return;const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(ji);return n(t(),"core/navigation",!0)[0]}),[s]),{selectBlock:c}=(0,g.useDispatch)(ji);return(0,d.jsxs)("div",{className:ms("block-editor-block-card",r),children:[s&&a&&(0,d.jsx)(ws.Button,{onClick:()=>c(a),label:(0,T.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,T.isRTL)()?Zb:qb,size:"small"}),(0,d.jsx)(Vu,{icon:t,showColors:!0}),(0,d.jsxs)(ws.__experimentalVStack,{spacing:1,children:[(0,d.jsxs)("h2",{className:"block-editor-block-card__title",children:[(0,d.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!!i?.length&&(0,d.jsx)(Yb,{children:e})]}),n&&(0,d.jsx)(ws.__experimentalText,{className:"block-editor-block-card__description",children:n}),l]})]})},Qb=(e=>(e.Unknown="REDUX_UNKNOWN",e.Add="ADD_ITEM",e.Prepare="PREPARE_ITEM",e.Cancel="CANCEL_ITEM",e.Remove="REMOVE_ITEM",e.PauseItem="PAUSE_ITEM",e.ResumeItem="RESUME_ITEM",e.PauseQueue="PAUSE_QUEUE",e.ResumeQueue="RESUME_QUEUE",e.OperationStart="OPERATION_START",e.OperationFinish="OPERATION_FINISH",e.AddOperations="ADD_OPERATIONS",e.CacheBlobUrl="CACHE_BLOB_URL",e.RevokeBlobUrls="REVOKE_BLOB_URLS",e.UpdateSettings="UPDATE_SETTINGS",e))(Qb||{}),Jb=(e=>(e.Processing="PROCESSING",e.Paused="PAUSED",e))(Jb||{}),ek=(e=>(e.Prepare="PREPARE",e.Upload="UPLOAD",e))(ek||{});const tk={queue:[],queueStatus:"active",blobUrls:{},settings:{mediaUpload:()=>{}}};var nk=function(e=tk,t={type:Qb.Unknown}){switch(t.type){case Qb.PauseQueue:return{...e,queueStatus:"paused"};case Qb.ResumeQueue:return{...e,queueStatus:"active"};case Qb.Add:return{...e,queue:[...e.queue,t.item]};case Qb.Cancel:return{...e,queue:e.queue.map((e=>e.id===t.id?{...e,error:t.error}:e))};case Qb.Remove:return{...e,queue:e.queue.filter((e=>e.id!==t.id))};case Qb.OperationStart:return{...e,queue:e.queue.map((e=>e.id===t.id?{...e,currentOperation:t.operation}:e))};case Qb.AddOperations:return{...e,queue:e.queue.map((e=>e.id!==t.id?e:{...e,operations:[...e.operations||[],...t.operations]}))};case Qb.OperationFinish:return{...e,queue:e.queue.map((e=>{if(e.id!==t.id)return e;const n=e.operations?e.operations.slice(1):[],o=e.attachment||t.item.attachment?{...e.attachment,...t.item.attachment}:void 0;return{...e,currentOperation:void 0,operations:n,...t.item,attachment:o,additionalData:{...e.additionalData,...t.item.additionalData}}}))};case Qb.CacheBlobUrl:{const n=e.blobUrls[t.id]||[];return{...e,blobUrls:{...e.blobUrls,[t.id]:[...n,t.blobUrl]}}}case Qb.RevokeBlobUrls:{const n={...e.blobUrls};return delete n[t.id],{...e,blobUrls:n}}case Qb.UpdateSettings:return{...e,settings:{...e.settings,...t.settings}}}return e};function ok(e){return e.queue}function rk(e){return e.queue.length>=1}function ik(e,t){return e.queue.some((e=>e.attachment?.url===t||e.sourceUrl===t))}function sk(e,t){return e.queue.some((e=>e.attachment?.id===t||e.sourceAttachmentId===t))}function lk(e){return e.settings}function ak(e){return e.queue}function ck(e,t){return e.queue.find((e=>e.id===t))}function uk(e,t){return 0===e.queue.filter((e=>t===e.batchId)).length}function dk(e,t){return e.queue.some((e=>e.currentOperation===ek.Upload&&e.additionalData.post===t))}function pk(e,t){return e.queue.find((e=>e.status===Jb.Paused&&e.additionalData.post===t))}function hk(e){return"paused"===e.queueStatus}function gk(e,t){return e.blobUrls[t]||[]}const mk={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let fk;const bk=new Uint8Array(16);function kk(){if(!fk&&(fk="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!fk))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fk(bk)}const vk=[];for(let e=0;e<256;++e)vk.push((e+256).toString(16).slice(1));function _k(e,t=0){return vk[e[t+0]]+vk[e[t+1]]+vk[e[t+2]]+vk[e[t+3]]+"-"+vk[e[t+4]]+vk[e[t+5]]+"-"+vk[e[t+6]]+vk[e[t+7]]+"-"+vk[e[t+8]]+vk[e[t+9]]+"-"+vk[e[t+10]]+vk[e[t+11]]+vk[e[t+12]]+vk[e[t+13]]+vk[e[t+14]]+vk[e[t+15]]}const yk=function(e,t,n){if(mk.randomUUID&&!t&&!e)return mk.randomUUID();const o=(e=e||{}).random||(e.rng||kk)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return _k(o)};class xk extends Error{code;file;constructor({code:e,message:t,file:n,cause:o}){super(t,{cause:o}),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.file=n}}function Sk(e,t){if(!t)return;const n=t.some((t=>t.includes("/")?t===e.type:e.type.startsWith(`${t}/`)));if(e.type&&!n)throw new xk({code:"MIME_TYPE_NOT_SUPPORTED",message:(0,T.sprintf)((0,T.__)("%s: Sorry, this file type is not supported here."),e.name),file:e})}function wk(e,t){const n=(o=t)?Object.entries(o).flatMap((([e,t])=>{const[n]=t.split("/");return[t,...e.split("|").map((e=>`${n}/${e}`))]})):null;var o;if(!n)return;const r=n.includes(e.type);if(e.type&&!r)throw new xk({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:(0,T.sprintf)((0,T.__)("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e})}function Ck(e,t){if(e.size<=0)throw new xk({code:"EMPTY_FILE",message:(0,T.sprintf)((0,T.__)("%s: This file is empty."),e.name),file:e});if(t&&e.size>t)throw new xk({code:"SIZE_ABOVE_LIMIT",message:(0,T.sprintf)((0,T.__)("%s: This file exceeds the maximum upload size for this site."),e.name),file:e})}function Bk({files:e,onChange:t,onSuccess:n,onError:o,onBatchSuccess:r,additionalData:i,allowedTypes:s}){return async({select:l,dispatch:a})=>{const c=yk();for(const u of e){try{Sk(u,s),wk(u,l.getSettings().allowedMimeTypes)}catch(e){o?.(e);continue}try{Ck(u,l.getSettings().maxUploadFileSize)}catch(e){o?.(e);continue}a.addItem({file:u,batchId:c,onChange:t,onSuccess:n,onBatchSuccess:r,onError:o,additionalData:i})}}}function Ik(e,t,n=!1){return async({select:o,dispatch:r})=>{const i=o.getItem(e);if(i){if(i.abortController?.abort(),!n){const{onError:e}=i;e?.(t??new Error("Upload cancelled")),!e&&t&&console.error("Upload cancelled",t)}r({type:Qb.Cancel,id:e,error:t}),r.removeItem(e),r.revokeBlobUrls(e),i.batchId&&o.isBatchUploaded(i.batchId)&&i.onBatchSuccess?.()}}}function jk(e){return function(e,t){return new File([e],t,{type:e.type,lastModified:e.lastModified})}(e,e.name)}class Ek extends File{constructor(e="stub-file"){super([],e)}}function Tk({file:e,batchId:t,onChange:n,onSuccess:o,onBatchSuccess:r,onError:i,additionalData:s={},sourceUrl:l,sourceAttachmentId:a,abortController:c,operations:u}){return async({dispatch:d})=>{const p=yk(),h=function(e){if(e instanceof File)return e;const t=e.type.split("/")[1],n="application/pdf"===e.type?"document":e.type.split("/")[0];return new File([e],`${n}.${t}`,{type:e.type})}(e);let g;h instanceof Ek||(g=(0,$a.createBlobURL)(h),d({type:Qb.CacheBlobUrl,id:p,blobUrl:g})),d({type:Qb.Add,item:{id:p,batchId:t,status:Jb.Processing,sourceFile:jk(h),file:h,attachment:{url:g},additionalData:{convert_format:!1,...s},onChange:n,onSuccess:o,onBatchSuccess:r,onError:i,sourceUrl:l,sourceAttachmentId:a,abortController:c||new AbortController,operations:Array.isArray(u)?u:[ek.Prepare]}}),d.processItem(p)}}function Mk(e){return async({select:t,dispatch:n})=>{if(t.isPaused())return;const o=t.getItem(e),{attachment:r,onChange:i,onSuccess:s,onBatchSuccess:l,batchId:a}=o,c=Array.isArray(o.operations?.[0])?o.operations[0][0]:o.operations?.[0];if(r&&i?.([r]),!c)return r&&s?.([r]),n.revokeBlobUrls(e),void(a&&t.isBatchUploaded(a)&&l?.());if(c)switch(n({type:Qb.OperationStart,id:e,operation:c}),c){case ek.Prepare:n.prepareItem(o.id);break;case ek.Upload:n.uploadItem(e)}}}function Pk(){return{type:Qb.PauseQueue}}function Rk(){return async({select:e,dispatch:t})=>{t({type:Qb.ResumeQueue});for(const n of e.getAllItems())t.processItem(n.id)}}function Ak(e){return async({select:t,dispatch:n})=>{t.getItem(e)&&n({type:Qb.Remove,id:e})}}function Nk(e,t){return async({dispatch:n})=>{n({type:Qb.OperationFinish,id:e,item:t}),n.processItem(e)}}function Lk(e){return async({dispatch:t})=>{const n=[ek.Upload];t({type:Qb.AddOperations,id:e,operations:n}),t.finishOperation(e,{})}}function Dk(e){return async({select:t,dispatch:n})=>{const o=t.getItem(e);t.getSettings().mediaUpload({filesList:[o.file],additionalData:o.additionalData,signal:o.abortController?.signal,onFileChange:([t])=>{(0,$a.isBlobURL)(t.url)||n.finishOperation(e,{attachment:t})},onSuccess:([t])=>{n.finishOperation(e,{attachment:t})},onError:t=>{n.cancelItem(e,t)}})}}function Ok(e){return async({select:t,dispatch:n})=>{const o=t.getBlobUrls(e);for(const e of o)(0,$a.revokeBlobURL)(e);n({type:Qb.RevokeBlobUrls,id:e})}}function zk(e){return{type:Qb.UpdateSettings,settings:e}}const{lock:Vk,unlock:Fk}=(0,H.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/upload-media"),Hk="core/upload-media",Uk={reducer:nk,selectors:s,actions:a},Gk=(0,g.createReduxStore)(Hk,{reducer:nk,selectors:s,actions:a});(0,g.register)(Gk),Fk(Gk).registerPrivateActions(c),Fk(Gk).registerPrivateSelectors(l);const $k=(0,m.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...n})=>{const o=(0,g.useRegistry)(),[r]=(0,h.useState)((()=>new WeakMap)),i=function(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=(0,g.createRegistry)({},t),o.registerStore(Hk,Uk),e.set(t,o)),o}(r,o,t);return i===o?(0,d.jsx)(e,{registry:o,...n}):(0,d.jsx)(g.RegistryProvider,{value:i,children:(0,d.jsx)(e,{registry:i,...n})})}),"withRegistryProvider")((e=>{const{children:t,settings:n}=e,{updateSettings:o}=Fk((0,g.useDispatch)(Gk));return(0,h.useEffect)((()=>{o(n)}),[n,o]),(0,d.jsx)(d.Fragment,{children:t})}));var Wk=$k;var Kk=(0,m.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...n})=>{const o=(0,g.useRegistry)(),[r]=(0,h.useState)((()=>new WeakMap)),i=function(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=(0,g.createRegistry)({},t),o.registerStore(ge,Ii),e.set(t,o)),o}(r,o,t);return i===o?(0,d.jsx)(e,{registry:o,...n}):(0,d.jsx)(g.RegistryProvider,{value:i,children:(0,d.jsx)(e,{registry:i,...n})})}),"withRegistryProvider");const Zk=()=>{};function qk({clientId:e=null,value:t,selection:n,onChange:o=Zk,onInput:r=Zk}){const i=(0,g.useRegistry)(),{resetBlocks:s,resetSelection:l,replaceInnerBlocks:a,setHasControlledInnerBlocks:c,__unstableMarkNextChangeAsNotPersistent:u}=i.dispatch(ji),{getBlockName:d,getBlocks:m,getSelectionStart:f,getSelectionEnd:b}=i.select(ji),k=(0,g.useSelect)((t=>!e||t(ji).areInnerBlocksControlled(e)),[e]),v=(0,h.useRef)({incoming:null,outgoing:[]}),_=(0,h.useRef)(!1),y=()=>{t&&(u(),e?i.batch((()=>{c(e,!0);const n=t.map((e=>(0,p.cloneBlock)(e)));_.current&&(v.current.incoming=n),u(),a(e,n)})):(_.current&&(v.current.incoming=t),s(t)))},x=(0,h.useRef)(r),S=(0,h.useRef)(o);(0,h.useEffect)((()=>{x.current=r,S.current=o}),[r,o]),(0,h.useEffect)((()=>{v.current.outgoing.includes(t)?v.current.outgoing[v.current.outgoing.length-1]===t&&(v.current.outgoing=[]):m(e)!==t&&(v.current.outgoing=[],y(),n&&l(n.selectionStart,n.selectionEnd,n.initialPosition))}),[t,e]);const w=(0,h.useRef)(!1);(0,h.useEffect)((()=>{w.current?k||(v.current.outgoing=[],y()):w.current=!0}),[k]),(0,h.useEffect)((()=>{const{getSelectedBlocksInitialCaretPosition:t,isLastBlockChangePersistent:n,__unstableIsLastBlockChangeIgnored:o,areInnerBlocksControlled:r}=i.select(ji);let s=m(e),l=n(),a=!1;_.current=!0;const c=i.subscribe((()=>{if(null!==e&&null===d(e))return;if(!(!e||r(e)))return;const i=n(),c=m(e),u=c!==s;if(s=c,u&&(v.current.incoming||o()))return v.current.incoming=null,void(l=i);if(u||a&&!u&&i&&!l){l=i,v.current.outgoing.push(s);(l?S.current:x.current)(s,{selection:{selectionStart:f(),selectionEnd:b(),initialPosition:t()}})}a=u}),ji);return()=>{_.current=!1,c()}}),[i,e]),(0,h.useEffect)((()=>()=>{u(),e?(c(e,!1),u(),a(e,[])):s([])}),[])}const Yk=window.wp.keyboardShortcuts;function Xk(){return null}Xk.Register=function(){const{registerShortcut:e}=(0,g.useDispatch)(Yk.store);return(0,h.useEffect)((()=>{e({name:"core/block-editor/copy",category:"block",description:(0,T.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,T.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,T.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,T.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,T.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,T.__)("Paste the copied style to the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"v"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,T.__)("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,T.__)("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,T.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,T.__)("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,T.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,T.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,T.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,T.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,T.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,T.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,T.__)("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}}),e({name:"core/block-editor/toggle-block-visibility",category:"block",description:(0,T.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}})}),[e]),null};var Qk=Xk;var Jk=function(e={}){return(0,h.useMemo)((()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes})),[e])};const ev=()=>{};function tv(e,{allowedTypes:t,additionalData:n={},filesList:o,onError:r=ev,onFileChange:i,onSuccess:s,onBatchSuccess:l}){e.dispatch(Gk).addItems({files:o,onChange:i,onSuccess:s,onBatchSuccess:l,onError:({message:e})=>r(e),additionalData:n,allowedTypes:t})}const nv=Kk((e=>{const{settings:t,registry:n,stripExperimentalSettings:o=!1}=e,r=Jk(t);let i=t;window.__experimentalMediaProcessing&&t.mediaUpload&&(i=(0,h.useMemo)((()=>({...t,mediaUpload:tv.bind(null,n)})),[t,n]));const{__experimentalUpdateSettings:s}=G((0,g.useDispatch)(ji));(0,h.useEffect)((()=>{s({...i,__internalIsInitialized:!0},{stripExperimentalSettings:o,reset:!0})}),[i,o,s]),qk(e);const l=(0,d.jsxs)(ws.SlotFillProvider,{passthrough:!0,children:[!i?.isPreviewMode&&(0,d.jsx)(Qk.Register,{}),(0,d.jsx)(hh,{children:e.children})]});return window.__experimentalMediaProcessing?(0,d.jsx)(Wk,{settings:r,useSubRegistry:!1,children:l}):l}));var ov=e=>(0,d.jsx)(nv,{...e,stripExperimentalSettings:!0,children:e.children});const rv=(0,h.createContext)({});function iv({value:e,children:t}){const n=(0,h.useContext)(rv),o=(0,h.useMemo)((()=>({...n,...e})),[n,e]);return(0,d.jsx)(rv.Provider,{value:o,children:t})}rv.displayName="BlockContext";var sv=rv;const lv="core/pattern-overrides";function av(e){return!e||0===Object.keys(e).length}function cv(e){return e?.__default?.source===lv}function uv(e,t){if(cv(e)){const n={};for(const o of t){const t=e[o]?e[o]:{source:lv};n[o]=t}return n}return e}function dv(e){const{clientId:t}=C(),n=e||t,{updateBlockAttributes:o}=(0,g.useDispatch)(ji),{getBlockAttributes:r}=(0,g.useRegistry)().select(ji);return{updateBlockBindings:e=>{const{metadata:{bindings:t,...i}={}}=r(n),s={...t};Object.entries(e).forEach((([e,t])=>{t||!s[e]?s[e]=t:delete s[e]}));const l={...i,bindings:s};av(l.bindings)&&delete l.bindings,o(n,{metadata:av(l)?void 0:l})},removeAllBlockBindings:()=>{const{metadata:{bindings:e,...t}={}}=r(n);o(n,{metadata:av(t)?void 0:t})}}}const pv=(0,h.createContext)({});pv.displayName="PrivateBlockContext";const hv={},gv=(0,ws.withFilters)("editor.BlockEdit")((e=>{const{name:t}=e,n=(0,p.getBlockType)(t);if(!n)return null;const o=n.edit||n.save;return(0,d.jsx)(o,{...e})}));var mv=e=>{const{name:t,clientId:n,attributes:o,setAttributes:r}=e,i=(0,g.useRegistry)(),s=(0,p.getBlockType)(t),l=(0,h.useContext)(sv),a=(0,g.useSelect)((e=>G(e(p.store)).getAllBlockBindingsSources()),[]),{bindableAttributes:c}=(0,h.useContext)(pv),{blockBindings:u,context:m,hasPatternOverrides:f}=(0,h.useMemo)((()=>{const e=s?.usesContext?Object.fromEntries(Object.entries(l).filter((([e])=>s.usesContext.includes(e)))):hv;return o?.metadata?.bindings&&Object.values(o?.metadata?.bindings||{}).forEach((t=>{a[t?.source]?.usesContext?.forEach((t=>{e[t]=l[t]}))})),{blockBindings:uv(o?.metadata?.bindings,c),context:e,hasPatternOverrides:cv(o?.metadata?.bindings)}}),[t,s?.usesContext,l,o?.metadata?.bindings,a]),b=(0,g.useSelect)((e=>{if(!u)return o;const t={},r=new Map;for(const[e,t]of Object.entries(u)){const{source:n,args:o}=t,i=a[n];i&&c?.includes(e)&&r.set(i,{...r.get(i),[e]:{args:o}})}if(r.size)for(const[o,i]of r){let r={};o.getValues?r=o.getValues({select:e,context:m,clientId:n,bindings:i}):Object.keys(i).forEach((e=>{r[e]=o.label}));for(const[e,n]of Object.entries(r))"url"!==e||n&&Lc(n)?t[e]=n:t[e]=null}return{...o,...t}}),[o,c,u,n,m,t,a]),k=(0,h.useCallback)((e=>{u?i.batch((()=>{const t={...e},o=new Map;for(const[e,n]of Object.entries(t)){if(!u[e]||!c?.includes(e))continue;const r=u[e],i=a[r?.source];i?.setValues&&(o.set(i,{...o.get(i),[e]:{args:r.args,newValue:n}}),delete t[e])}if(o.size)for(const[e,t]of o)e.setValues({select:i.select,dispatch:i.dispatch,context:m,clientId:n,bindings:t});const s=!!m["pattern/overrides"];f&&s||!Object.keys(t).length||(f&&(delete t.caption,delete t.href),r(t))})):r(e)}),[c,u,n,m,f,r,a,t,i]);if(!s)return null;if(s.apiVersion>1)return(0,d.jsx)(gv,{...e,attributes:b,context:m,setAttributes:k});const v=(0,p.hasBlockSupport)(s,"className",!0)?(0,p.getBlockDefaultClassName)(t):null,_=ms(v,o?.className,e.className);return(0,d.jsx)(gv,{...e,attributes:b,className:_,context:m,setAttributes:k})},fv=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var bv=function({className:e,actions:t,children:n,secondaryActions:o}){return(0,d.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,d.jsx)("div",{className:ms(e,"block-editor-warning"),children:(0,d.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,d.jsx)("p",{className:"block-editor-warning__message",children:n}),(t?.length>0||o)&&(0,d.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map(((e,t)=>(0,d.jsx)("span",{className:"block-editor-warning__action",children:e},t))),o&&(0,d.jsx)(ws.DropdownMenu,{className:"block-editor-warning__secondary",icon:fv,label:(0,T.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,d.jsx)(ws.MenuGroup,{children:o.map(((e,t)=>(0,d.jsx)(ws.MenuItem,{onClick:e.onClick,children:e.title},t)))})})]})]})})})};function kv({originalBlockClientId:e,name:t,onReplace:n}){const{selectBlock:o}=(0,g.useDispatch)(ji),r=(0,p.getBlockType)(t);return(0,d.jsxs)(bv,{actions:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o(e),children:(0,T.__)("Find original")},"find-original"),(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>n([]),children:(0,T.__)("Remove")},"remove")],children:[(0,d.jsxs)("strong",{children:[r?.title,": "]}),(0,T.__)("This block can only be used once.")]})}function vv({mayDisplayControls:e,mayDisplayParentControls:t,blockEditingMode:n,isPreviewMode:o,...r}){const{name:i,isSelected:s,clientId:l,attributes:a={},__unstableLayoutClassNames:c}=r,{layout:u=null,metadata:g={}}=a,{bindings:m}=g,f=(0,p.hasBlockSupport)(i,"layout",!1)||(0,p.hasBlockSupport)(i,"__experimentalLayout",!1),{originalBlockClientId:x}=(0,h.useContext)(pv);return(0,d.jsxs)(w,{value:(0,h.useMemo)((()=>({name:i,isSelected:s,clientId:l,layout:f?u:null,__unstableLayoutClassNames:c,[b]:e,[k]:t,[v]:n,[_]:m,[y]:o})),[i,s,l,f,u,c,e,t,n,m,o]),children:[(0,d.jsx)(mv,{...r}),x&&(0,d.jsx)(kv,{originalBlockClientId:x,name:i,onReplace:r.onReplace})]})}var _v=n(8021);function yv({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:i}){return(0,d.jsxs)("div",{className:i,children:[(0,d.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,d.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,d.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,d.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,d.jsx)(h.RawHTML,{children:(0,Ga.safeHTML)(n)})})]}),(0,d.jsx)("div",{className:"block-editor-block-compare__action",children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:o,children:r})})]})}var xv=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const i=(s=o(e),(Array.isArray(s)?s:[s]).map((e=>(0,p.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var s;const l=(a=e.originalContent,c=i,(0,_v.JJ)(a,c).map(((e,t)=>{const n=ms({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,d.jsx)("span",{className:n,children:e.value},t)})));var a,c;return(0,d.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,d.jsx)(yv,{title:(0,T.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,T.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,d.jsx)(yv,{title:(0,T.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:l,renderedContent:i})]})};const Sv=e=>(0,p.rawHandler)({HTML:e.originalContent});function wv({clientId:e}){const{block:t,canInsertHTMLBlock:n,canInsertClassicBlock:o}=(0,g.useSelect)((t=>{const{canInsertBlockType:n,getBlock:o,getBlockRootClientId:r}=t(ji),i=r(e);return{block:o(e),canInsertHTMLBlock:n("core/html",i),canInsertClassicBlock:n("core/freeform",i)}}),[e]),{replaceBlock:r}=(0,g.useDispatch)(ji),[i,s]=(0,h.useState)(!1),l=(0,h.useCallback)((()=>s(!1)),[]),a=(0,h.useMemo)((()=>({toClassic(){const e=(0,p.createBlock)("core/freeform",{content:t.originalContent});return r(t.clientId,e)},toHTML(){const e=(0,p.createBlock)("core/html",{content:t.originalContent});return r(t.clientId,e)},toBlocks(){const e=Sv(t);return r(t.clientId,e)},toRecoveredBlock(){const e=(0,p.createBlock)(t.name,t.attributes,t.innerBlocks);return r(t.clientId,e)}})),[t,r]),c=(0,h.useMemo)((()=>[{title:(0,T._x)("Resolve","imperative verb"),onClick:()=>s(!0)},n&&{title:(0,T.__)("Convert to HTML"),onClick:a.toHTML},o&&{title:(0,T.__)("Convert to Classic Block"),onClick:a.toClassic}].filter(Boolean)),[n,o,a]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(bv,{actions:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,onClick:a.toRecoveredBlock,variant:"primary",children:(0,T.__)("Attempt recovery")},"recover")],secondaryActions:c,children:(0,T.__)("Block contains unexpected or invalid content.")}),i&&(0,d.jsx)(ws.Modal,{title:(0,T.__)("Resolve Block"),onRequestClose:l,className:"block-editor-block-compare",children:(0,d.jsx)(xv,{block:t,onKeep:a.toHTML,onConvert:a.toBlocks,convertor:Sv,convertButtonText:(0,T.__)("Convert to Blocks")})})]})}const Cv=(0,d.jsx)(bv,{className:"block-editor-block-list__block-crash-warning",children:(0,T.__)("This block has encountered an error and cannot be previewed.")});var Bv=()=>Cv;class Iv extends h.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var jv=Iv,Ev=n(4132);var Tv=function({clientId:e}){const[t,n]=(0,h.useState)(""),o=(0,g.useSelect)((t=>t(ji).getBlock(e)),[e]),{updateBlock:r}=(0,g.useDispatch)(ji);return(0,h.useEffect)((()=>{n((0,p.getBlockContent)(o))}),[o]),(0,d.jsx)(Ev.A,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const i=(0,p.getBlockType)(o.name);if(!i)return;const s=(0,p.getBlockAttributes)(i,t,o.attributes),l=t||(0,p.getSaveContent)(i,s),[a]=t?(0,p.validateBlock)({...o,attributes:s,originalContent:l}):[!0];r(e,{attributes:s,originalContent:l,isValid:a}),t||n(l)},onChange:e=>n(e.target.value)})},Mv=Kv(),Pv=e=>Uv(e,Mv),Rv=Kv();Pv.write=e=>Uv(e,Rv);var Av=Kv();Pv.onStart=e=>Uv(e,Av);var Nv=Kv();Pv.onFrame=e=>Uv(e,Nv);var Lv=Kv();Pv.onFinish=e=>Uv(e,Lv);var Dv=[];Pv.setTimeout=(e,t)=>{let n=Pv.now()+t,o=()=>{let e=Dv.findIndex((e=>e.cancel==o));~e&&Dv.splice(e,1),Fv-=~e?1:0},r={time:n,handler:e,cancel:o};return Dv.splice(Ov(n),0,r),Fv+=1,Gv(),r};var Ov=e=>~(~Dv.findIndex((t=>t.time>e))||~Dv.length);Pv.cancel=e=>{Av.delete(e),Nv.delete(e),Lv.delete(e),Mv.delete(e),Rv.delete(e)},Pv.sync=e=>{Hv=!0,Pv.batchedUpdates(e),Hv=!1},Pv.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,Pv.onStart(n)}return o.handler=e,o.cancel=()=>{Av.delete(n),t=null},o};var zv=typeof window<"u"?window.requestAnimationFrame:()=>{};Pv.use=e=>zv=e,Pv.now=typeof performance<"u"?()=>performance.now():Date.now,Pv.batchedUpdates=e=>e(),Pv.catch=console.error,Pv.frameLoop="always",Pv.advance=()=>{"demand"!==Pv.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Wv()};var Vv=-1,Fv=0,Hv=!1;function Uv(e,t){Hv?(t.delete(e),e(0)):(t.add(e),Gv())}function Gv(){Vv<0&&(Vv=0,"demand"!==Pv.frameLoop&&zv($v))}function $v(){~Vv&&(zv($v),Pv.batchedUpdates(Wv))}function Wv(){let e=Vv;Vv=Pv.now();let t=Ov(Vv);t&&(Zv(Dv.splice(0,t),(e=>e.handler())),Fv-=t),Fv?(Av.flush(),Mv.flush(e?Math.min(64,Vv-e):16.667),Nv.flush(),Rv.flush(),Lv.flush()):Vv=-1}function Kv(){let e=new Set,t=e;return{add(n){Fv+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Fv-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Fv-=t.size,Zv(t,(t=>t(n)&&e.add(t))),Fv+=e.size,t=e)}}}function Zv(e,t){e.forEach((e=>{try{t(e)}catch(e){Pv.catch(e)}}))}var qv=Object.defineProperty,Yv={};function Xv(){}((e,t)=>{for(var n in t)qv(e,n,{get:t[n],enumerable:!0})})(Yv,{assign:()=>d_,colors:()=>a_,createStringInterpolator:()=>r_,skipAnimation:()=>c_,to:()=>i_,willAdvance:()=>u_});var Qv={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 Jv(e,t){if(Qv.arr(e)){if(!Qv.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function t_(e,t,n){if(Qv.arr(e))for(let o=0;oQv.und(e)?[]:Qv.arr(e)?e:[e];function o_(e,t){if(e.size){let n=Array.from(e);e.clear(),e_(n,t)}}var r_,i_,s_=(e,...t)=>o_(e,(e=>e(...t))),l_=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),a_=null,c_=!1,u_=Xv,d_=e=>{e.to&&(i_=e.to),e.now&&(Pv.now=e.now),void 0!==e.colors&&(a_=e.colors),null!=e.skipAnimation&&(c_=e.skipAnimation),e.createStringInterpolator&&(r_=e.createStringInterpolator),e.requestAnimationFrame&&Pv.use(e.requestAnimationFrame),e.batchedUpdates&&(Pv.batchedUpdates=e.batchedUpdates),e.willAdvance&&(u_=e.willAdvance),e.frameLoop&&(Pv.frameLoop=e.frameLoop)},p_=new Set,h_=[],g_=[],m_=0,f_={get idle(){return!p_.size&&!h_.length},start(e){m_>e.priority?(p_.add(e),Pv.onStart(b_)):(k_(e),Pv(__))},advance:__,sort(e){if(m_)Pv.onFrame((()=>f_.sort(e)));else{let t=h_.indexOf(e);~t&&(h_.splice(t,1),v_(e))}},clear(){h_=[],p_.clear()}};function b_(){p_.forEach(k_),p_.clear(),Pv(__)}function k_(e){h_.includes(e)||v_(e)}function v_(e){h_.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(h_,(t=>t.priority>e.priority)),0,e)}function __(e){let t=g_;for(let n=0;n0}var y_="[-+]?\\d*\\.?\\d+",x_=y_+"%";function S_(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var w_=new RegExp("rgb"+S_(y_,y_,y_)),C_=new RegExp("rgba"+S_(y_,y_,y_,y_)),B_=new RegExp("hsl"+S_(y_,x_,x_)),I_=new RegExp("hsla"+S_(y_,x_,x_,y_)),j_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,E_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,T_=/^#([0-9a-fA-F]{6})$/,M_=/^#([0-9a-fA-F]{8})$/;function P_(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 R_(e,t,n){let o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,i=P_(r,o,e+1/3),s=P_(r,o,e),l=P_(r,o,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*l)<<8}function A_(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function N_(e){return(parseFloat(e)%360+360)%360/360}function L_(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function D_(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function O_(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=T_.exec(e))?parseInt(t[1]+"ff",16)>>>0:a_&&void 0!==a_[e]?a_[e]:(t=w_.exec(e))?(A_(t[1])<<24|A_(t[2])<<16|A_(t[3])<<8|255)>>>0:(t=C_.exec(e))?(A_(t[1])<<24|A_(t[2])<<16|A_(t[3])<<8|L_(t[4]))>>>0:(t=j_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=M_.exec(e))?parseInt(t[1],16)>>>0:(t=E_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=B_.exec(e))?(255|R_(N_(t[1]),D_(t[2]),D_(t[3])))>>>0:(t=I_.exec(e))?(R_(N_(t[1]),D_(t[2]),D_(t[3]))|L_(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 z_=(e,t,n)=>{if(Qv.fun(e))return e;if(Qv.arr(e))return z_({range:e,output:t,extrapolate:n});if(Qv.str(e.output[0]))return r_(e);let o=e,r=o.output,i=o.range||[0,1],s=o.extrapolateLeft||o.extrapolate||"extend",l=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,i);return function(e,t,n,o,r,i,s,l,a){let c=a?a(e):e;if(cn){if("identity"===l)return c;"clamp"===l&&(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=i(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,i[t],i[t+1],r[t],r[t+1],a,s,l,o.map)}};var V_=1.70158,F_=1.525*V_,H_=V_+1,U_=2*Math.PI/3,G_=2*Math.PI/4.5,$_=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,W_={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=>H_*e*e*e-V_*e*e,easeOutBack:e=>1+H_*Math.pow(e-1,3)+V_*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(F_+1)*e-F_)/2:(Math.pow(2*e-2,2)*((F_+1)*(2*e-2)+F_)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*U_),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*U_)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*G_)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*G_)/2+1,easeInBounce:e=>1-$_(1-e),easeOutBounce:$_,easeInOutBounce:e=>e<.5?(1-$_(1-2*e))/2:(1+$_(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)}},K_=Symbol.for("FluidValue.get"),Z_=Symbol.for("FluidValue.observers"),q_=e=>Boolean(e&&e[K_]),Y_=e=>e&&e[K_]?e[K_]():e,X_=e=>e[Z_]||null;function Q_(e,t){let n=e[Z_];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var J_=class{[K_];[Z_];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");ey(this,e)}},ey=(e,t)=>ry(e,K_,t);function ty(e,t){if(e[K_]){let n=e[Z_];n||ry(e,Z_,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function ny(e,t){let n=e[Z_];if(n&&n.has(t)){let o=n.size-1;o?n.delete(t):e[Z_]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var oy,ry=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),iy=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,sy=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ly=new RegExp(`(${iy.source})(%|[a-z]+)`,"i"),ay=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,cy=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,uy=e=>{let[t,n]=dy(e);if(!t||l_())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&&cy.test(n)?uy(n):n||e},dy=e=>{let t=cy.exec(e);if(!t)return[,];let[,n,o]=t;return[n,o]},py=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,hy=e=>{oy||(oy=a_?new RegExp(`(${Object.keys(a_).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>Y_(e).replace(cy,uy).replace(sy,O_).replace(oy,O_))),n=t.map((e=>e.match(iy).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=>z_({...e,output:t})));return e=>{let n=!ly.test(t[0])&&t.find((e=>ly.test(e)))?.replace(iy,""),r=0;return t[0].replace(iy,(()=>`${o[r++](e)}${n||""}`)).replace(ay,py)}},gy="react-spring: ",my=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${gy}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},fy=my(console.warn);my(console.warn);function by(e){return Qv.str(e)&&("#"==e[0]||/\d/.test(e)||!l_()&&cy.test(e)||e in(a_||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var ky=l_()?ic.useEffect:ic.useLayoutEffect;function vy(){let e=(0,ic.useState)()[1],t=(()=>{let e=(0,ic.useRef)(!1);return ky((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var _y=[];var yy=Symbol.for("Animated:node"),xy=e=>e&&e[yy],Sy=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,yy,t),wy=e=>e&&e[yy]&&e[yy].getPayload(),Cy=class{payload;constructor(){Sy(this,this)}getPayload(){return this.payload||[]}},By=class extends Cy{constructor(e){super(),this._value=e,Qv.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new By(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Qv.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,Qv.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Iy=class extends By{_string=null;_toString;constructor(e){super(0),this._toString=z_({output:[e,e]})}static create(e){return new Iy(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(Qv.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=z_({output:[this.getValue(),e]})),this._value=0,super.reset()}},jy={dependencies:null},Ey=class extends Cy{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return t_(this.source,((n,o)=>{(e=>!!e&&e[yy]===e)(n)?t[o]=n.getValue(e):q_(n)?t[o]=Y_(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&e_(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return t_(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){jy.dependencies&&q_(e)&&jy.dependencies.add(e);let t=wy(e);t&&e_(t,(e=>this.add(e)))}},Ty=class extends Ey{constructor(e){super(e)}static create(e){return new Ty(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(My)),!0)}};function My(e){return(by(e)?Iy:By).create(e)}function Py(e){let t=xy(e);return t?t.constructor:Qv.arr(e)?Ty:by(e)?Iy:By}var Ry=(e,t)=>{let n=!Qv.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,ic.forwardRef)(((o,r)=>{let i=(0,ic.useRef)(null),s=n&&(0,ic.useCallback)((e=>{i.current=function(e,t){return e&&(Qv.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[l,a]=function(e,t){let n=new Set;return jy.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Ey(e),jy.dependencies=null,[e,n]}(o,t),c=vy(),u=()=>{let e=i.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&c()},d=new Ay(u,a),p=(0,ic.useRef)();ky((()=>(p.current=d,e_(a,(e=>ty(e,d))),()=>{p.current&&(e_(p.current.deps,(e=>ny(e,p.current))),Pv.cancel(p.current.update))}))),(0,ic.useEffect)(u,[]),(e=>{(0,ic.useEffect)(e,_y)})((()=>()=>{let e=p.current;e_(e.deps,(t=>ny(t,e)))}));let h=t.getComponentProps(l.getValue());return ic.createElement(e,{...h,ref:s})}))},Ay=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&Pv.write(this.update)}};var Ny=Symbol.for("AnimatedComponent"),Ly=e=>Qv.str(e)?e:e&&Qv.str(e.displayName)?e.displayName:Qv.fun(e)&&e.name||null;function Dy(e,...t){return Qv.fun(e)?e(...t):e}var Oy=(e,t)=>!0===e||!!(t&&e&&(Qv.fun(e)?e(t):n_(e).includes(t))),zy=(e,t)=>Qv.obj(e)?t&&e[t]:e,Vy=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Fy=e=>e,Hy=(e,t=Fy)=>{let n=Uy;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);Qv.und(n)||(o[r]=n)}return o},Uy=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Gy={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 $y(e){let t=function(e){let t={},n=0;if(t_(e,((e,o)=>{Gy[o]||(t[o]=e,n++)})),n)return t}(e);if(t){let n={to:t};return t_(e,((e,o)=>o in t||(n[o]=e))),n}return{...e}}function Wy(e){return e=Y_(e),Qv.arr(e)?e.map(Wy):by(e)?Yv.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ky(e){return Qv.fun(e)||Qv.arr(e)&&Qv.obj(e[0])}var Zy={tension:170,friction:26,mass:1,damping:1,easing:W_.linear,clamp:!1},qy=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,Zy)}};function Yy(e,t){if(Qv.und(t.decay)){let n=!Qv.und(t.tension)||!Qv.und(t.friction);(n||!Qv.und(t.frequency)||!Qv.und(t.damping)||!Qv.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Xy=[],Qy=class{changed=!1;values=Xy;toValues=null;fromValues=Xy;to;from;config=new qy;immediate=!1};function Jy(e,{key:t,props:n,defaultProps:o,state:r,actions:i}){return new Promise(((s,l)=>{let a,c,u=Oy(n.cancel??o?.cancel,t);if(u)h();else{Qv.und(n.pause)||(r.paused=Oy(n.pause,t));let e=o?.pause;!0!==e&&(e=r.paused||Oy(e,t)),a=Dy(n.delay||0,t),e?(r.resumeQueue.add(p),i.pause()):(i.resume(),p())}function d(){r.resumeQueue.add(p),r.timeouts.delete(c),c.cancel(),a=c.time-Pv.now()}function p(){a>0&&!Yv.skipAnimation?(r.delayed=!0,c=Pv.setTimeout(h,a),r.pauseQueue.add(d),r.timeouts.add(c)):h()}function h(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(d),r.timeouts.delete(c),e<=(r.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},s)}catch(e){l(e)}}}))}var ex=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?ox(e.get()):t.every((e=>e.noop))?tx(e.get()):nx(e.get(),t.every((e=>e.finished))),tx=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),nx=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),ox=e=>({value:e,cancelled:!0,finished:!1});function rx(e,t,n,o){let{callId:r,parentId:i,onRest:s}=t,{asyncTo:l,promise:a}=n;return i||e!==l||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;let c,u,d,p=Hy(t,((e,t)=>"onRest"===t?void 0:e)),h=new Promise(((e,t)=>(c=e,u=t))),g=e=>{let t=r<=(n.cancelId||0)&&ox(o)||r!==n.asyncId&&nx(o,!1);if(t)throw e.result=t,u(e),e},m=(e,t)=>{let i=new sx,s=new lx;return(async()=>{if(Yv.skipAnimation)throw ix(n),s.result=nx(o,!1),u(s),s;g(i);let l=Qv.obj(e)?{...e}:{...t,to:e};l.parentId=r,t_(p,((e,t)=>{Qv.und(l[t])&&(l[t]=e)}));let a=await o.start(l);return g(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};if(Yv.skipAnimation)return ix(n),nx(o,!1);try{let t;t=Qv.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,o.stop.bind(o))),await Promise.all([t.then(c),h]),d=nx(o.get(),!0,!1)}catch(e){if(e instanceof sx)d=e.result;else{if(!(e instanceof lx))throw e;d=e.result}}finally{r==n.asyncId&&(n.asyncId=i,n.asyncTo=i?l:void 0,n.promise=i?a:void 0)}return Qv.fun(s)&&Pv.batchedUpdates((()=>{s(d,o,o.item)})),d})():a}function ix(e,t){o_(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var sx=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.")}},lx=class extends Error{result;constructor(){super("SkipAnimationSignal")}},ax=e=>e instanceof ux,cx=1,ux=class extends J_{id=cx++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=xy(this);return e&&e.getValue()}to(...e){return Yv.to(this,e)}interpolate(...e){return fy(`${gy}The "interpolate" function is deprecated in v9 (use "to" instead)`),Yv.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){Q_(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||f_.sort(this),Q_(this,{type:"priority",parent:this,priority:e})}},dx=Symbol.for("SpringPhase"),px=e=>(1&e[dx])>0,hx=e=>(2&e[dx])>0,gx=e=>(4&e[dx])>0,mx=(e,t)=>t?e[dx]|=3:e[dx]&=-3,fx=(e,t)=>t?e[dx]|=4:e[dx]&=-5,bx=class extends ux{key;animation=new Qy;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(),!Qv.und(e)||!Qv.und(t)){let n=Qv.obj(e)?{...e}:{...t,from:e};Qv.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(hx(this)||this._state.asyncTo)||gx(this)}get goal(){return Y_(this.animation.to)}get velocity(){let e=xy(this);return e instanceof By?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return px(this)}get isAnimating(){return hx(this)}get isPaused(){return gx(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,o=this.animation,{config:r,toValues:i}=o,s=wy(o.to);!s&&q_(o.to)&&(i=n_(Y_(o.to))),o.values.forEach(((l,a)=>{if(l.done)return;let c=l.constructor==Iy?1:s?s[a].lastPosition:i[a],u=o.immediate,d=c;if(!u){if(d=l.lastPosition,r.tension<=0)return void(l.done=!0);let t,n=l.elapsedTime+=e,i=o.fromValues[a],s=null!=l.v0?l.v0:l.v0=Qv.arr(r.velocity)?r.velocity[a]:r.velocity,p=r.precision||(i==c?.005:Math.min(1,.001*Math.abs(c-i)));if(Qv.und(r.duration))if(r.decay){let e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*n);d=i+s/(1-e)*(1-o),u=Math.abs(l.lastPosition-d)<=p,t=s*o}else{t=null==l.lastVelocity?s:l.lastVelocity;let n,o=r.restVelocity||p/10,a=r.clamp?0:r.bounce,h=!Qv.und(a),g=i==c?l.v0>0:io,n||(u=Math.abs(c-d)<=p,!u));++e){h&&(m=d==c||d>c==g,m&&(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,l.durationProgress>0&&(l.elapsedTime=r.duration*l.durationProgress,n=l.elapsedTime+=e)),o=(r.progress||0)+n/this._memoizedDuration,o=o>1?1:o<0?0:o,l.durationProgress=o),d=i+r.easing(o)*(c-i),t=(d-l.lastPosition)/e,u=1==o}l.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}s&&!s[a].done&&(u=!1),u?l.done=!0:t=!1,l.setValue(d,r.round)&&(n=!0)}));let l=xy(this),a=l.getValue();if(t){let e=Y_(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(l.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return Pv.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(hx(this)){let{to:e,config:t}=this.animation;Pv.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 Qv.und(e)?(n=this.queue||[],this.queue=[]):n=[Qv.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>ex(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),ix(this._state,e&&this._lastCallId),Pv.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=Qv.obj(n)?n[t]:n,(null==n||Ky(n))&&(n=void 0),o=Qv.obj(o)?o[t]:o,null==o&&(o=void 0);let r={to:n,from:o};return px(this)||(e.reverse&&([n,o]=[o,n]),o=Y_(o),Qv.und(o)?xy(this)||this._set(n):this._set(o)),r}_update({...e},t){let{key:n,defaultProps:o}=this;e.default&&Object.assign(o,Hy(e,((e,t)=>/^on/.test(t)?zy(e,n):e))),Sx(this,e,"onProps"),wx(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 i=this._state;return Jy(++this._lastCallId,{key:n,props:e,defaultProps:o,state:i,actions:{pause:()=>{gx(this)||(fx(this,!0),s_(i.pauseQueue),wx(this,"onPause",nx(this,kx(this,this.animation.to)),this))},resume:()=>{gx(this)&&(fx(this,!1),hx(this)&&this._resume(),s_(i.resumeQueue),wx(this,"onResume",nx(this,kx(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=vx(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(ox(this));let o=!Qv.und(e.to),r=!Qv.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(ox(this));this._lastToId=t.callId}let{key:i,defaultProps:s,animation:l}=this,{to:a,from:c}=l,{to:u=a,from:d=c}=e;r&&!o&&(!t.default||Qv.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let p=!Jv(d,c);p&&(l.from=d),d=Y_(d);let h=!Jv(u,a);h&&this._focus(u);let g=Ky(t.to),{config:m}=l,{decay:f,velocity:b}=m;(o||r)&&(m.velocity=0),t.config&&!g&&function(e,t,n){n&&(Yy(n={...n},t),t={...n,...t}),Yy(e,t),Object.assign(e,t);for(let t in Zy)null==e[t]&&(e[t]=Zy[t]);let{mass:o,frequency:r,damping:i}=e;Qv.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*i*o/r)}(m,Dy(t.config,i),t.config!==s.config?Dy(s.config,i):void 0);let k=xy(this);if(!k||Qv.und(u))return n(nx(this,!0));let v=Qv.und(t.reset)?r&&!t.default:!Qv.und(d)&&Oy(t.reset,i),_=v?d:this.get(),y=Wy(u),x=Qv.num(y)||Qv.arr(y)||by(y),S=!g&&(!x||Oy(s.immediate||t.immediate,i));if(h){let e=Py(u);if(e!==k.constructor){if(!S)throw Error(`Cannot animate between ${k.constructor.name} and ${e.name}, as the "to" prop suggests`);k=this._set(y)}}let w=k.constructor,C=q_(u),B=!1;if(!C){let e=v||!px(this)&&p;(h||e)&&(B=Jv(Wy(_),y),C=!B),(!Jv(l.immediate,S)&&!S||!Jv(m.decay,f)||!Jv(m.velocity,b))&&(C=!0)}if(B&&hx(this)&&(l.changed&&!v?C=!0:C||this._stop(a)),!g&&((C||q_(a))&&(l.values=k.getPayload(),l.toValues=q_(u)?null:w==Iy?[1]:n_(y)),l.immediate!=S&&(l.immediate=S,!S&&!v&&this._set(a)),C)){let{onRest:e}=l;e_(xx,(e=>Sx(this,t,e)));let o=nx(this,kx(this,a));s_(this._pendingCalls,o),this._pendingCalls.add(n),l.changed&&Pv.batchedUpdates((()=>{l.changed=!v,e?.(o,this),v?Dy(s.onRest,o):l.onStart?.(o,this)}))}v&&this._set(_),g?n(rx(t.to,t,this._state,this)):C?this._start():hx(this)&&!h?this._pendingCalls.add(n):n(tx(_))}_focus(e){let t=this.animation;e!==t.to&&(X_(this)&&this._detach(),t.to=e,X_(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;q_(t)&&(ty(t,this),ax(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;q_(e)&&ny(e,this)}_set(e,t=!0){let n=Y_(e);if(!Qv.und(n)){let e=xy(this);if(!e||!Jv(n,e.getValue())){let o=Py(n);e&&e.constructor==o?e.setValue(n):Sy(this,o.create(n)),e&&Pv.batchedUpdates((()=>{this._onChange(n,t)}))}}return xy(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,wx(this,"onStart",nx(this,kx(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Dy(this.animation.onChange,e,this)),Dy(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;xy(this).reset(Y_(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),hx(this)||(mx(this,!0),gx(this)||this._resume())}_resume(){Yv.skipAnimation?this.finish():f_.start(this)}_stop(e,t){if(hx(this)){mx(this,!1);let n=this.animation;e_(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Q_(this,{type:"idle",parent:this});let o=t?ox(this.get()):nx(this.get(),kx(this,e??n.to));s_(this._pendingCalls,o),n.changed&&(n.changed=!1,wx(this,"onRest",o,this))}}};function kx(e,t){let n=Wy(t);return Jv(Wy(e.get()),n)}function vx(e,t=e.loop,n=e.to){let o=Dy(t);if(o){let r=!0!==o&&$y(o),i=(r||e).reverse,s=!r||r.reset;return _x({...e,loop:t,default:!1,pause:void 0,to:!i||Ky(n)?n:void 0,from:s?e.from:void 0,reset:s,...r})}}function _x(e){let{to:t,from:n}=e=$y(e),o=new Set;return Qv.obj(t)&&yx(t,o),Qv.obj(n)&&yx(n,o),e.keys=o.size?Array.from(o):null,e}function yx(e,t){t_(e,((e,n)=>null!=e&&t.add(n)))}var xx=["onStart","onRest","onChange","onPause","onResume"];function Sx(e,t,n){e.animation[n]=t[n]!==Vy(t,n)?zy(t[n],e.key):void 0}function wx(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Cx=["onStart","onChange","onRest"],Bx=1,Ix=class{id=Bx++;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];Qv.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(_x(e)),this}start(e){let{queue:t}=this;return e?t=n_(e).map(_x):this.queue=[],this._flush?this._flush(this,t):(Px(this,t),jx(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;e_(n_(t),(t=>n[t].stop(!!e)))}else ix(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Qv.und(e))this.start({pause:!0});else{let t=this.springs;e_(n_(e),(e=>t[e].pause()))}return this}resume(e){if(Qv.und(e))this.start({pause:!1});else{let t=this.springs;e_(n_(e),(e=>t[e].resume()))}return this}each(e){t_(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,o_(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let i=!o&&this._started,s=r||i&&n.size?this.get():null;r&&t.size&&o_(t,(([e,t])=>{t.value=s,e(t,this,this._item)})),i&&(this._started=!1,o_(n,(([e,t])=>{t.value=s,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)}Pv.onFrame(this._onFrame)}};function jx(e,t){return Promise.all(t.map((t=>Ex(e,t)))).then((t=>ex(e,t)))}async function Ex(e,t,n){let{keys:o,to:r,from:i,loop:s,onRest:l,onResolve:a}=t,c=Qv.obj(t.default)&&t.default;s&&(t.loop=!1),!1===r&&(t.to=null),!1===i&&(t.from=null);let u=Qv.arr(r)||Qv.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):e_(Cx,(n=>{let o=t[n];if(Qv.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,s_(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))),h=!0===t.cancel||!0===Vy(t,"cancel");(u||h&&d.asyncId)&&p.push(Jy(++e._lastAsyncId,{props:t,state:d,actions:{pause:Xv,resume:Xv,start(t,n){h?(ix(d,e._lastAsyncId),n(ox(e))):(t.onRest=l,n(rx(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let g=ex(e,await Promise.all(p));if(s&&g.finished&&(!n||!g.noop)){let n=vx(t,s,r);if(n)return Px(e,[n]),Ex(e,n,!0)}return a&&Pv.batchedUpdates((()=>a(g,e,e.item))),g}function Tx(e,t){let n=new bx;return n.key=e,t&&ty(n,t),n}function Mx(e,t,n){t.keys&&e_(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function Px(e,t){e_(t,(t=>{Mx(e.springs,t,(t=>Tx(t,e)))}))}var Rx=({children:e,...t})=>{let n=(0,ic.useContext)(Ax),o=t.pause||!!n.pause,r=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,ic.useState)((()=>({inputs:t,result:e()}))),o=(0,ic.useRef)(),r=o.current,i=r;return i?Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{o.current=i,r==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:o,immediate:r})),[o,r]);let{Provider:i}=Ax;return ic.createElement(i,{value:t},e)},Ax=function(e,t){return Object.assign(e,ic.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(Rx,{});Rx.Provider=Ax.Provider,Rx.Consumer=Ax.Consumer;var Nx=class extends ux{constructor(e,t){super(),this.source=e,this.calc=z_(...t);let n=this._get(),o=Py(n);Sy(this,o.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Jv(t,this.get())||(xy(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Dx(this._active)&&Ox(this)}_get(){let e=Qv.arr(this.source)?this.source.map(Y_):n_(Y_(this.source));return this.calc(...e)}_start(){this.idle&&!Dx(this._active)&&(this.idle=!1,e_(wy(this),(e=>{e.done=!1})),Yv.skipAnimation?(Pv.batchedUpdates((()=>this.advance())),Ox(this)):f_.start(this))}_attach(){let e=1;e_(n_(this.source),(t=>{q_(t)&&ty(t,this),ax(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){e_(n_(this.source),(e=>{q_(e)&&ny(e,this)})),this._active.clear(),Ox(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=n_(this.source).reduce(((e,t)=>Math.max(e,(ax(t)?t.priority:0)+1)),0))}};function Lx(e){return!1!==e.idle}function Dx(e){return!e.size||Array.from(e).every(Lx)}function Ox(e){e.idle||(e.idle=!0,e_(wy(e),(e=>{e.done=!0})),Q_(e,{type:"idle",parent:e}))}Yv.assign({createStringInterpolator:hy,to:(e,t)=>new Nx(e,t)});f_.advance;const zx=window.ReactDOM;var Vx=/^--/;function Fx(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Vx.test(e)||Ux.hasOwnProperty(e)&&Ux[e]?(""+t).trim():t+"px"}var Hx={};var Ux={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},Gx=["Webkit","Ms","Moz","O"];Ux=Object.keys(Ux).reduce(((e,t)=>(Gx.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Ux);var $x=/^(matrix|translate|scale|rotate|skew)/,Wx=/^(translate)/,Kx=/^(rotate|skew)/,Zx=(e,t)=>Qv.num(e)&&0!==e?e+t:e,qx=(e,t)=>Qv.arr(e)?e.every((e=>qx(e,t))):Qv.num(e)?e===t:parseFloat(e)===t,Yx=class extends Ey{constructor({x:e,y:t,z:n,...o}){let r=[],i=[];(e||t||n)&&(r.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>Zx(e,"px"))).join(",")})`,qx(e,0)]))),t_(o,((e,t)=>{if("transform"===t)r.push([e||""]),i.push((e=>[e,""===e]));else if($x.test(t)){if(delete o[t],Qv.und(e))return;let n=Wx.test(t)?"px":Kx.test(t)?"deg":"";r.push(n_(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Zx(r,n)})`,qx(r,0)]:e=>[`${t}(${e.map((e=>Zx(e,n))).join(",")})`,qx(e,t.startsWith("scale")?1:0)])}})),r.length&&(o.transform=new Xx(r,i)),super(o)}},Xx=class extends J_{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 e_(this.inputs,((n,o)=>{let r=Y_(n[0]),[i,s]=this.transforms[o](Qv.arr(r)?r:n.map(Y_));e+=" "+i,t=t&&s})),t?"none":e}observerAdded(e){1==e&&e_(this.inputs,(e=>e_(e,(e=>q_(e)&&ty(e,this)))))}observerRemoved(e){0==e&&e_(this.inputs,(e=>e_(e,(e=>q_(e)&&ny(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Q_(this,e)}};Yv.assign({batchedUpdates:zx.unstable_batchedUpdates,createStringInterpolator:hy,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 Qx=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new Ey(e),getComponentProps:o=e=>e}={})=>{let r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},i=e=>{let t=Ly(e)||"Anonymous";return(e=Qv.str(e)?i[e]||(i[e]=Ry(e,r)):e[Ny]||(e[Ny]=Ry(e,r))).displayName=`Animated(${t})`,e};return t_(e,((t,n)=>{Qv.arr(e)&&(n=Ly(t)),i[n]=i(t)})),{animated:i}})(["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:i,scrollLeft:s,viewBox:l,...a}=t,c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:Hx[t]||(Hx[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=Fx(t,o[t]);Vx.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==s&&(e.scrollLeft=s),void 0!==l&&e.setAttribute("viewBox",l)},createAnimatedStyle:e=>new Yx(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Jx=Qx.animated;function eS(e){return{top:e.offsetTop,left:e.offsetLeft}}var tS=function({triggerAnimationOnChange:e,clientId:t}){const n=(0,h.useRef)(),{isTyping:o,getGlobalBlockCount:r,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:l,isAncestorMultiSelected:a,isDraggingBlocks:c}=(0,g.useSelect)(ji),{previous:u,prevRect:d}=(0,h.useMemo)((()=>({previous:n.current&&eS(n.current),prevRect:n.current&&n.current.getBoundingClientRect()})),[e]);return(0,h.useLayoutEffect)((()=>{if(!u||!n.current)return;const e=(0,Ga.getScrollContainer)(n.current),p=i(t),h=p||s(t),g=c();function m(){if(!g&&h&&d){const t=n.current.getBoundingClientRect().top-d.top;t&&(e.scrollTop+=t)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||o()||r()>200)return void m();const f=p||l(t)||a(t);if(f&&g)return;const b=f?"1":"",k=new Ix({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=b,m()}});n.current.style.transform=void 0;const v=eS(n.current),_=Math.round(u.left-v.left),y=Math.round(u.top-v.top);return k.start({x:0,y:0,from:{x:_,y}}),()=>{k.stop(),k.set({x:0,y:0})}}),[u,d,t,o,r,i,s,l,a,c]),n};function nS({clientId:e,initialPosition:t}){const n=(0,h.useRef)(),{isBlockSelected:o,isMultiSelecting:r,isZoomOut:i}=G((0,g.useSelect)(ji));return(0,h.useEffect)((()=>{if(!o(e)||r()||i())return;if(null==t)return;if(!n.current)return;const{ownerDocument:s}=n.current;if(Wm(n.current,s.activeElement))return;const l=Ga.focus.tabbable.find(n.current).filter((e=>(0,Ga.isTextField)(e))),a=-1===t,c=l[a?l.length-1:0]||n.current;if(Wm(n.current,c)){if(!n.current.getAttribute("contenteditable")){const e=Ga.focus.tabbable.findNext(n.current);if(e&&Wm(n.current,e)&&(0,Ga.isFormElement)(e))return void e.focus()}(0,Ga.placeCaretAtHorizontalEdge)(c,a)}else n.current.focus()}),[t,e]),n}function oS(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered","mouseover"===e.type))}function rS(e){const{isBlockSelected:t}=(0,g.useSelect)(ji),{selectBlock:n,selectionChange:o}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((r=>{function i(i){r.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||o(e):Wm(r,i.target)&&n(e))}return r.addEventListener("focusin",i),()=>{r.removeEventListener("focusin",i)}}),[t,n])}function iS(e){return!e||"transparent"===e||"rgba(0, 0, 0, 0)"===e}function sS({clientId:e,isSelected:t}){const{getBlockRootClientId:n,isZoomOut:o,hasMultiSelection:r}=G((0,g.useSelect)(ji)),{insertAfterBlock:i,removeBlock:s,resetZoomLevel:l,startDraggingBlocks:a,stopDraggingBlocks:c}=G((0,g.useDispatch)(ji));return(0,m.useRefEffect)((u=>{if(t)return u.addEventListener("keydown",d),u.addEventListener("dragstart",p),()=>{u.removeEventListener("keydown",d),u.removeEventListener("dragstart",p)};function d(t){const{keyCode:n,target:r}=t;n!==Wa.ENTER&&n!==Wa.BACKSPACE&&n!==Wa.DELETE||r!==u||(0,Ga.isTextField)(r)||(t.preventDefault(),n===Wa.ENTER&&o()?l():n===Wa.ENTER?i(e):s(e))}function p(t){if(u!==t.target||u.isContentEditable||u.ownerDocument.activeElement!==u||r())return void t.preventDefault();const o=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:n(e)});t.dataTransfer.effectAllowed="move",t.dataTransfer.clearData(),t.dataTransfer.setData("wp-blocks",o);const{ownerDocument:i}=u,{defaultView:s}=i;s.getSelection().removeAllRanges();const l=i.createElement("div");l.style.width="1px",l.style.height="1px",l.style.position="fixed",l.style.visibility="hidden",i.body.appendChild(l),t.dataTransfer.setDragImage(l,0,0);const d=u.getBoundingClientRect(),p=u.cloneNode(!0);p.style.visibility="hidden",p.style.display="none";const h=u.id;u.id=null;let g=1;{let e=u;for(;e=e.parentElement;){const{scale:t}=s.getComputedStyle(e);if(t&&"none"!==t){g=parseFloat(t);break}}}const m=1/g;u.after(p);const f={};for(const e of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])f[e]=u.style[e];const b=s.scrollY,k=s.scrollX,v=t.clientX,_=t.clientY;u.style.position="relative",u.style.top="0px",u.style.left="0px";const y=t.clientX-d.left,x=t.clientY-d.top,S=d.height>200?200/d.height:1;if(u.style.zIndex="1000",u.style.transformOrigin=`${y*m}px ${x*m}px`,u.style.transition="transform 0.2s ease-out",u.style.transform=`scale(${S})`,u.style.opacity="0.9",iS(s.getComputedStyle(u).backgroundColor)){let e="transparent",t=u;for(;t=t.parentElement;){const{backgroundColor:n}=s.getComputedStyle(t);if(!iS(n)){e=n;break}}u.style.backgroundColor=e}let w=!1;function C(e){w||(w=!0,u.style.pointerEvents="none");const t=s.scrollY,n=s.scrollX;u.style.top=(e.clientY-_+t-b)*m+"px",u.style.left=(e.clientX-v+n-k)*m+"px"}function B(){i.removeEventListener("dragover",C),i.removeEventListener("dragend",B),i.removeEventListener("drop",B),i.removeEventListener("scroll",C);for(const[e,t]of Object.entries(f))u.style[e]=t;p.remove(),u.id=h,l.remove(),c(),document.body.classList.remove("is-dragging-components-draggable"),i.documentElement.classList.remove("is-dragging")}i.addEventListener("dragover",C),i.addEventListener("dragend",B),i.addEventListener("drop",B),i.addEventListener("scroll",C),a([e]),document.body.classList.add("is-dragging-components-draggable"),i.documentElement.classList.add("is-dragging")}}),[e,t,n,i,s,o,l,r,a,c])}function lS(){const e=(0,h.useContext)(sw);return(0,m.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function aS({isSelected:e}){const t=(0,m.useReducedMotion)();return(0,m.useRefEffect)((n=>{if(e){const{ownerDocument:e}=n,{defaultView:o}=e;if(!o.IntersectionObserver)return;const r=new o.IntersectionObserver((e=>{e[0].isIntersecting||n.scrollIntoView({behavior:t?"instant":"smooth"}),r.disconnect()}));return r.observe(n),()=>{r.disconnect()}}}),[e])}function cS({clientId:e="",isEnabled:t=!0}={}){const{getEnabledClientIdsTree:n}=G((0,g.useSelect)(ji));return(0,m.useRefEffect)((o=>{if(!t)return;const r=t=>{(t.target===o||t.target.classList.contains("is-root-container"))&&(t.defaultPrevented||(t.preventDefault(),n(e).forEach((({clientId:e})=>{const t=o.querySelector(`[data-block="${e}"]`);t&&(t.classList.remove("has-editable-outline"),t.offsetWidth,t.classList.add("has-editable-outline"))}))))};return o.addEventListener("click",r),()=>o.removeEventListener("click",r)}),[t])}const uS=new Map;function dS(e){const t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),"true"!==t||e.getAttribute("draggable")||e.setAttribute("draggable","true"))}function pS(e){const{target:t}=e,{ownerDocument:n,isContentEditable:o,tagName:r}=t,i=["INPUT","TEXTAREA"].includes(r),s=uS.get(n);if(o||i)for(const e of s)"true"===e.getAttribute("draggable")&&e.contains(t)&&(e.removeAttribute("draggable"),e.setAttribute("data-draggable","true"));else for(const e of s)dS(e)}function hS(){return(0,m.useRefEffect)((e=>(function(e,t){let n=uS.get(e);n||(n=new Set,uS.set(e,n),e.addEventListener("pointerdown",pS)),n.add(t)}(e.ownerDocument,e),()=>{!function(e,t){const n=uS.get(e);n&&(n.delete(t),dS(t),0===n.size&&(uS.delete(e),e.removeEventListener("pointerdown",pS)))}(e.ownerDocument,e)})),[])}function gS(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:i,index:s,mode:l,name:a,blockApiVersion:c,blockTitle:u,isSelected:d,isSubtreeDisabled:p,hasOverlay:g,initialPosition:f,blockEditingMode:b,isHighlighted:k,isMultiSelected:v,isPartiallySelected:y,isReusable:x,isDragging:S,hasChildSelected:w,isEditingDisabled:B,hasEditableOutline:I,isTemporarilyEditingAsBlocks:j,defaultClassName:E,isSectionBlock:M,canMove:P,isBlockHidden:R}=(0,h.useContext)(pv),A=(0,T.sprintf)((0,T.__)("Block: %s"),u),N="html"!==l||t?"":"-visual",L=hS(),D=(0,m.useMergeRefs)([e.ref,nS({clientId:n,initialPosition:f}),gh(n),rS(n),sS({clientId:n,isSelected:d}),(0,m.useRefEffect)((e=>(e.addEventListener("mouseout",oS),e.addEventListener("mouseover",oS),()=>{e.removeEventListener("mouseout",oS),e.removeEventListener("mouseover",oS),e.classList.remove("is-hovered")})),[]),lS(),tS({triggerAnimationOnChange:s,clientId:n}),(0,m.useDisabled)({isDisabled:!g}),cS({clientId:n,isEnabled:M}),aS({isSelected:d}),P?L:void 0]),O=C(),z=!!O[_]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{};c<2&&n===O.clientId&&js()(`Block type "${a}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let V=!1;return"-"!==r?.style?.marginTop?.charAt(0)&&"-"!==r?.style?.marginBottom?.charAt(0)&&"-"!==r?.style?.marginLeft?.charAt(0)&&"-"!==r?.style?.marginRight?.charAt(0)||(V=!0),{tabIndex:"disabled"===b?-1:0,draggable:!(!P||w)||void 0,...r,...e,ref:D,id:`block-${n}${N}`,role:"document","aria-label":A,"data-block":n,"data-type":a,"data-title":u,inert:p?"true":void 0,className:ms("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":g,"is-selected":d,"is-highlighted":k,"is-multi-selected":v,"is-partially-selected":y,"is-reusable":x,"is-dragging":S,"has-child-selected":w,"is-editing-disabled":B,"has-editable-outline":I,"has-negative-margin":V,"is-content-locked-temporarily-editing-as-blocks":j,"is-block-hidden":R},o,e.className,r.className,E),style:{...r.style,...e.style,...z}}}function mS({children:e,isHtml:t,...n}){return(0,d.jsx)("div",{...gS(n,{__unstableIsHtml:t}),children:e})}function fS({block:{__unstableBlockSource:e},mode:t,isLocked:n,canRemove:o,clientId:r,isSelected:i,isSelectionEnabled:s,className:l,__unstableLayoutClassNames:a,name:c,isValid:u,attributes:g,wrapperProps:m,setAttributes:f,onReplace:b,onRemove:k,onInsertBlocksAfter:v,onMerge:_,toggleSelection:y}){const{mayDisplayControls:x,mayDisplayParentControls:S,themeSupportsLayout:w,...C}=(0,h.useContext)(pv),B=ta()||{};let I=(0,d.jsx)(vv,{name:c,isSelected:i,attributes:g,setAttributes:f,insertBlocksAfter:n?void 0:v,onReplace:o?b:void 0,onRemove:o?k:void 0,mergeBlocks:o?_:void 0,clientId:r,isSelectionEnabled:s,toggleSelection:y,__unstableLayoutClassNames:a,__unstableParentLayout:Object.keys(B).length?B:void 0,mayDisplayControls:x,mayDisplayParentControls:S,blockEditingMode:C.blockEditingMode,isPreviewMode:C.isPreviewMode});const j=(0,p.getBlockType)(c);j?.getEditWrapperProps&&(m=function(e,t){const n={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(n.className=ms(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(n.style={...e.style,...t.style}),n}(m,j.getEditWrapperProps(g)));const E=m&&!!m["data-align"]&&!w,T=l?.includes("is-position-sticky");let M;if(E&&(I=(0,d.jsx)("div",{className:ms("wp-block",T&&l),"data-align":m["data-align"],children:I})),u)M="html"===t?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{style:{display:"none"},children:I}),(0,d.jsx)(mS,{isHtml:!0,children:(0,d.jsx)(Tv,{clientId:r})})]}):j?.apiVersion>1?I:(0,d.jsx)(mS,{children:I});else{const t=e?(0,p.serializeRawBlock)(e):(0,p.getSaveContent)(j,g);M=(0,d.jsxs)(mS,{className:"has-warning",children:[(0,d.jsx)(wv,{clientId:r}),(0,d.jsx)(h.RawHTML,{children:(0,Ga.safeHTML)(t)})]})}const{"data-align":P,...R}=m??{},A={...R,className:ms(R.className,P&&w&&`align${P}`,!(P&&T)&&l)};return(0,d.jsx)(pv.Provider,{value:{wrapperProps:A,isAligned:E,...C},children:(0,d.jsx)(jv,{fallback:(0,d.jsx)(mS,{className:"has-warning",children:(0,d.jsx)(Bv,{})}),children:M})})}gS.save=p.__unstableGetBlockProps;const bS=(0,g.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:i,replaceBlocks:s,toggleSelection:l,__unstableMarkLastChangeAsPersistent:a,moveBlocksToPosition:c,removeBlock:u,selectBlock:d}=e(ji);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n.select(ji),i=r(),{clientId:s,attributes:l}=t,a=i.length?i:[s],c="function"==typeof e?e(l):e;o(a,c)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:i}=t,{getBlockIndex:s}=n.select(ji),l=s(o);r(e,l+1,i)},onMerge(e){const{clientId:o,rootClientId:l}=t,{getPreviousBlockClientId:a,getNextBlockClientId:h,getBlock:g,getBlockAttributes:m,getBlockName:f,getBlockOrder:b,getBlockIndex:k,getBlockRootClientId:v,canInsertBlockType:_}=n.select(ji);function y(){const e=g(o),t=(0,p.getDefaultBlockName)(),r=(0,p.getBlockType)(t);if(f(o)!==t){const n=(0,p.switchToBlockType)(e,t);n&&n.length&&s(o,n)}else if((0,p.isUnmodifiedDefaultBlock)(e)){const e=h(o);e&&n.batch((()=>{u(o),d(e)}))}else if(r.merge){const n=r.merge({},e.attributes);s([o],[(0,p.createBlock)(t,n)])}}function x(e,t=!0){const o=f(e),i="text"===(0,p.getBlockType)(o).category,s=v(e),l=b(e),[a]=l;1===l.length&&(0,p.isUnmodifiedBlock)(g(a))?u(e):i?n.batch((()=>{if(_(f(a),s))c([a],e,s,k(e));else{const n=(0,p.switchToBlockType)(g(a),(0,p.getDefaultBlockName)());n&&n.length&&n.every((e=>_(e.name,s)))?(r(n,k(e),s,t),u(a,!1)):y()}!b(e).length&&(0,p.isUnmodifiedBlock)(g(e))&&u(e,!1)})):y()}if(e){if(l){const e=h(l);if(e){if(f(l)!==f(e))return void i(l,e);{const t=m(l),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{c(b(e),e,l),u(e,!1)}))}}}const e=h(o);if(!e)return;b(e).length?x(e,!1):i(o,e)}else{const e=a(o);if(e)i(e,o);else if(l){const e=a(l);if(e&&f(l)===f(e)){const t=m(l),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{c(b(l),l,e),u(l,!1)}))}x(l)}else y()}},onReplace(e,n,o){e.length&&!(0,p.isUnmodifiedDefaultBlock)(e[e.length-1])&&a();const r=1===e?.length&&Array.isArray(e[0])?e[0]:e;s([t.clientId],r,n,o)},onRemove(){u(t.clientId)},toggleSelection(e){l(e)}}}));fS=(0,m.compose)(bS,(0,ws.withFilters)("editor.BlockListBlock"))(fS);var kS=(0,h.memo)((function(e){const{clientId:t,rootClientId:n}=e,o=(0,g.useSelect)((e=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:i,getTemplateLock:s,isSectionBlock:l,getBlockWithoutAttributes:a,getBlockAttributes:c,canRemoveBlock:u,canMoveBlock:d,getSettings:h,getTemporarilyEditingAsBlocks:g,getBlockEditingMode:m,getBlockName:f,isFirstMultiSelectedBlock:b,getMultiSelectedBlockClientIds:k,hasSelectedInnerBlock:v,getBlocksByName:_,getBlockIndex:y,isBlockMultiSelected:x,isBlockSubtreeDisabled:S,isBlockHighlighted:w,__unstableIsFullySelected:C,__unstableSelectionHasUnmergeableBlock:B,isBlockBeingDragged:I,isDragging:j,__unstableHasActiveBlockOverlayActive:E,getSelectedBlocksInitialCaretPosition:T}=G(e(ji)),M=a(t);if(!M)return;const{hasBlockSupport:P,getActiveBlockVariation:R}=e(p.store),A=c(t),{name:N,isValid:L}=M,D=(0,p.getBlockType)(N),{supportsLayout:O,isPreviewMode:z,__experimentalBlockBindingsSupportedAttributes:V}=h(),F=V?.[N],H=D?.apiVersion>1,U={isPreviewMode:z,blockWithoutAttributes:M,name:N,attributes:A,isValid:L,themeSupportsLayout:O,index:y(t),isReusable:(0,p.isReusableBlock)(D),className:H?A.className:void 0,defaultClassName:H?(0,p.getBlockDefaultClassName)(N):void 0,blockTitle:D?.title,isBlockHidden:!1===A?.metadata?.blockVisibility,bindableAttributes:F};if(z)return U;const{isBlockHidden:$}=G(e(ji)),W=o(t),K=u(t),Z=d(t),q=R(N,A),Y=x(t),X=v(t,!0),Q=m(t),J=(0,p.hasBlockSupport)(N,"multiple",!0)?[]:_(N),ee=J.length&&J[0]!==t;return{...U,mode:r(t),isSelectionEnabled:i(),isLocked:!!s(n),isSectionBlock:l(t),canRemove:K,canMove:Z,isSelected:W,isTemporarilyEditingAsBlocks:g()===t,blockEditingMode:Q,mayDisplayControls:W||b(t)&&k().every((e=>f(e)===N)),mayDisplayParentControls:P(f(t),"__experimentalExposeControlsToChildren",!1)&&v(t),blockApiVersion:D?.apiVersion||1,blockTitle:q?.title||D?.title,isSubtreeDisabled:"disabled"===Q&&S(t),hasOverlay:E(t)&&!j(),initialPosition:W?T():void 0,isHighlighted:w(t),isMultiSelected:Y,isPartiallySelected:Y&&!C()&&!B(),isDragging:I(t),hasChildSelected:X,isEditingDisabled:"disabled"===Q,hasEditableOutline:"disabled"!==Q&&"disabled"===m(n),originalBlockClientId:!!ee&&J[0],isBlockHidden:$(t)}}),[t,n]),{isPreviewMode:r,mode:i="visual",isSelectionEnabled:s=!1,isLocked:l=!1,canRemove:a=!1,canMove:c=!1,blockWithoutAttributes:u,name:m,attributes:f,isValid:b,isSelected:k=!1,themeSupportsLayout:v,isTemporarilyEditingAsBlocks:_,blockEditingMode:y,mayDisplayControls:x,mayDisplayParentControls:S,index:w,blockApiVersion:C,blockTitle:B,isSubtreeDisabled:I,hasOverlay:j,initialPosition:E,isHighlighted:T,isMultiSelected:M,isPartiallySelected:P,isReusable:R,isDragging:A,hasChildSelected:N,isSectionBlock:L,isEditingDisabled:D,hasEditableOutline:O,className:z,defaultClassName:V,originalBlockClientId:F,isBlockHidden:H,bindableAttributes:U}=o,$=(0,h.useMemo)((()=>({...u,attributes:f})),[u,f]);if(!o)return null;const W={isPreviewMode:r,clientId:t,className:z,index:w,mode:i,name:m,blockApiVersion:C,blockTitle:B,isSelected:k,isSubtreeDisabled:I,hasOverlay:j,initialPosition:E,blockEditingMode:y,isHighlighted:T,isMultiSelected:M,isPartiallySelected:P,isReusable:R,isDragging:A,hasChildSelected:N,isSectionBlock:L,isEditingDisabled:D,hasEditableOutline:O,isTemporarilyEditingAsBlocks:_,defaultClassName:V,mayDisplayControls:x,mayDisplayParentControls:S,originalBlockClientId:F,themeSupportsLayout:v,canMove:c,isBlockHidden:H,bindableAttributes:U};return!H||k||M||N?(0,d.jsx)(pv.Provider,{value:W,children:(0,d.jsx)(fS,{...e,mode:i,isSelectionEnabled:s,isLocked:l,canRemove:a,canMove:c,block:$,name:m,attributes:f,isValid:b,isSelected:k})}):null}));const vS=window.wp.htmlEntities,_S="\ufeff";function yS({rootClientId:e}){const{showPrompt:t,isLocked:n,placeholder:o,isManualGrid:r}=(0,g.useSelect)((t=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r,getBlockAttributes:i}=t(ji),s=!n(e),{bodyPlaceholder:l}=o();return{showPrompt:s,isLocked:!!r(e),placeholder:l,isManualGrid:i(e)?.layout?.isManualPlacement}}),[e]),{insertDefaultBlock:i,startTyping:s}=(0,g.useDispatch)(ji);if(n||r)return null;const l=(0,vS.decodeEntities)(o)||(0,T.__)("Type / to choose a block"),a=()=>{i(void 0,e),s()};return(0,d.jsxs)("div",{"data-root-client-id":e||"",className:ms("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,d.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,T.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{Wa.ENTER!==e.keyCode&&Wa.SPACE!==e.keyCode||a()},onClick:()=>a(),onFocus:()=>{t&&a()},children:t?l:_S}),(0,d.jsx)(lI,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}function xS({rootClientId:e}){return(0,g.useSelect)((t=>t(ji).canInsertBlockType((0,p.getDefaultBlockName)(),e)))?(0,d.jsx)(yS,{rootClientId:e}):(0,d.jsx)(uI,{rootClientId:e,className:"block-list-appender__toggle"})}function SS({rootClientId:e,CustomAppender:t,className:n,tagName:o="div"}){const r=(0,g.useSelect)((t=>{const{getBlockInsertionPoint:n,isBlockInsertionPointVisible:o,getBlockCount:r}=t(ji),i=n();return o()&&e===i?.rootClientId&&0===r(e)}),[e]);return(0,d.jsx)(o,{tabIndex:-1,className:ms("block-list-appender wp-block",n,{"is-drag-over":r}),contentEditable:!1,"data-block":!0,children:t?(0,d.jsx)(t,{}):(0,d.jsx)(xS,{rootClientId:e})})}const wS=Number.MAX_SAFE_INTEGER;var CS=function({previousClientId:e,nextClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,operation:i="insert",nearestSide:s="right",...l}){const[a,c]=(0,h.useReducer)((e=>(e+1)%wS),0),{orientation:u,rootClientId:p,isVisible:m}=(0,g.useSelect)((n=>{const{getBlockListSettings:o,getBlockRootClientId:r,isBlockVisible:i}=n(ji),s=r(e??t);return{orientation:o(s)?.orientation||"vertical",rootClientId:s,isVisible:i(e)&&i(t)}}),[e,t]),f=bh(e),b=bh(t),k="vertical"===u,v=(0,h.useMemo)((()=>{if(a<0||!f&&!b||!m)return;return{contextElement:"group"===i?b||f:f||b,getBoundingClientRect(){const e=f?f.getBoundingClientRect():null,t=b?b.getBoundingClientRect():null;let n=0,o=0,r=0,l=0;if("group"===i){const i=t||e;o=i.top,r=0,l=i.bottom-i.top,n="left"===s?i.left-2:i.right-2}else k?(o=e?e.bottom:t.top,r=e?e.width:t.width,l=t&&e?t.top-e.bottom:0,n=e?e.left:t.left):(o=e?e.top:t.top,l=e?e.height:t.height,(0,T.isRTL)()?(n=t?t.right:e.left,r=e&&t?e.left-t.right:0):(n=e?e.right:t.left,r=e&&t?t.left-e.right:0),r=Math.max(r,0));return new window.DOMRect(n,o,r,l)}}}),[f,b,a,k,m,i,s]),_=Fm(r);return(0,h.useLayoutEffect)((()=>{if(!f)return;const e=new window.MutationObserver(c);return e.observe(f,{attributes:!0}),()=>{e.disconnect()}}),[f]),(0,h.useLayoutEffect)((()=>{if(!b)return;const e=new window.MutationObserver(c);return e.observe(b,{attributes:!0}),()=>{e.disconnect()}}),[b]),(0,h.useLayoutEffect)((()=>{if(f)return f.ownerDocument.defaultView.addEventListener("resize",c),()=>{f.ownerDocument.defaultView?.removeEventListener("resize",c)}}),[f]),(f||b)&&m?(0,d.jsx)(ws.Popover,{ref:_,animate:!1,anchor:v,focusOnMount:!1,__unstableSlotName:o,inline:!o,...l,className:ms("block-editor-block-popover","block-editor-block-popover__inbetween",l.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,d.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:n})},t+"--"+p):null};const BS={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};var IS=function({__unstablePopoverSlot:e,__unstableContentRef:t}){const{clientId:n}=(0,g.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(ji),o=n(),r=t(o.rootClientId);return r.length?{clientId:r[o.index]}:{}}),[]),o=(0,m.useReducedMotion)();return(0,d.jsx)(of,{clientId:n,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,d.jsx)(ws.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:o?BS.show:BS.hide,animate:BS.show,exit:o?BS.show:BS.exit,className:"block-editor-block-popover__drop-zone-foreground"})})};const jS=(0,h.createContext)();function ES({__unstablePopoverSlot:e,__unstableContentRef:t,operation:n="insert",nearestSide:o="right"}){const{selectBlock:r,hideInsertionPoint:i}=(0,g.useDispatch)(ji),s=(0,h.useContext)(jS),l=(0,h.useRef)(),{orientation:a,previousClientId:c,nextClientId:u,rootClientId:p,isInserterShown:f,isDistractionFree:b,isZoomOutMode:k}=(0,g.useSelect)((e=>{const{getBlockOrder:t,getBlockListSettings:n,getBlockInsertionPoint:o,isBlockBeingDragged:r,getPreviousBlockClientId:i,getNextBlockClientId:s,getSettings:l,isZoomOut:a}=G(e(ji)),c=o(),u=t(c.rootClientId);if(!u.length)return{};let d=u[c.index-1],p=u[c.index];for(;r(d);)d=i(d);for(;r(p);)p=s(p);const h=l();return{previousClientId:d,nextClientId:p,orientation:n(c.rootClientId)?.orientation||"vertical",rootClientId:c.rootClientId,isDistractionFree:h.isDistractionFree,isInserterShown:c?.__unstableWithInserter,isZoomOutMode:a()}}),[]),{getBlockEditingMode:v}=(0,g.useSelect)(ji),_=(0,m.useReducedMotion)();const y=(0,h.useCallback)((e=>{!e&&s.current&&(s.current=!1)}),[s]),x={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:f?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},S={start:{scale:_?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(b)return null;if(k&&"insert"!==n)return null;const w=ms("block-editor-block-list__insertion-point","horizontal"===a||"group"===n?"is-horizontal":"is-vertical");return(0,d.jsx)(CS,{previousClientId:c,nextClientId:u,__unstablePopoverSlot:e,__unstableContentRef:t,operation:n,nearestSide:o,children:(0,d.jsxs)(ws.__unstableMotion.div,{layout:!_,initial:_?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&u&&"disabled"!==v(u)&&r(u,-1)},onFocus:function(e){e.target!==l.current&&(s.current=!0)},className:ms(w,{"is-with-inserter":f}),onHoverEnd:function(e){e.target!==l.current||s.current||i()},children:[(0,d.jsx)(ws.__unstableMotion.div,{variants:x,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),f&&(0,d.jsx)(ws.__unstableMotion.div,{variants:S,className:ms("block-editor-block-list__insertion-point-inserter"),children:(0,d.jsx)(lI,{ref:y,position:"bottom center",clientId:u,rootClientId:p,__experimentalIsQuick:!0,onToggle:e=>{s.current=e},onSelectOrClose:()=>{s.current=!1}})})]})})}function TS(e){const{insertionPoint:t,isVisible:n,isBlockListEmpty:o}=(0,g.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n,getBlockCount:o}=e(ji),r=t();return{insertionPoint:r,isVisible:n(),isBlockListEmpty:0===o(r?.rootClientId)}}),[]);return!n||o?null:"replace"===t.operation?(0,d.jsx)(IS,{...e},`${t.rootClientId}-${t.index}`):(0,d.jsx)(ES,{operation:t.operation,nearestSide:t.nearestSide,...e})}function MS(){const e=(0,h.useContext)(jS),t=(0,g.useSelect)((e=>e(ji).getSettings().isDistractionFree||G(e(ji)).isZoomOut()),[]),{getBlockListSettings:n,getBlockIndex:o,isMultiSelecting:r,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:l,__unstableIsWithinBlockOverlay:a,getBlockEditingMode:c,getBlockName:u,getBlockAttributes:d,getParentSectionBlock:p}=G((0,g.useSelect)(ji)),{showInsertionPoint:f,hideInsertionPoint:b}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((h=>{if(!t)return h.addEventListener("mousemove",g),()=>{h.removeEventListener("mousemove",g)};function g(t){if(void 0===e||e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(r())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void b();let h;if(!t.target.classList.contains("is-root-container")){h=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(l(h)||"disabled"===c(h)||"core/block"===u(h)||h&&d(h).layout?.isManualPlacement)return;const g=n(h),m=g?.orientation||"vertical",k=!!g?.__experimentalCaptureToolbars,v=t.clientY,_=t.clientX;let y=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===m&&t.top>v||e.classList.contains("wp-block")&&"horizontal"===m&&((0,T.isRTL)()?t.right<_:t.left>_)}));if(!y)return void b();if(!y.id&&(y=y.firstElementChild,!y))return void b();const x=y.id.slice(6);if(!x||a(x)||p(x))return;if(i().includes(x)&&"vertical"===m&&!k&&!s().hasFixedToolbar)return;const S=y.getBoundingClientRect();if("horizontal"===m&&(t.clientY>S.bottom||t.clientYS.right||t.clientX{if(r)return e.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",i)};function i(r){(t()||n())&&r.target===e&&o()}}),[t,n,o,r])}function RS(e){return(0,d.jsx)("div",{ref:PS(),...e})}jS.displayName="InsertionPointOpenRefContext";const AS=new WeakMap;function NS(){let e;return t=>(void 0!==e&&Ja()(e,t)||(e=t),e)}function LS(e){const[t]=(0,h.useState)(NS);return t(e)}function DS(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}function OS(e,t,n={}){const{operation:o="insert",nearestSide:r="right"}=n,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:l,getBlockOrder:a,getBlocksByClientId:c,getSettings:u,getBlock:d}=(0,g.useSelect)(ji),{getGroupingBlockName:m}=(0,g.useSelect)(p.store),{insertBlocks:f,moveBlocksToPosition:b,updateBlockAttributes:k,clearSelectedBlock:v,replaceBlocks:_,removeBlocks:y}=(0,g.useDispatch)(ji),x=(0,g.useRegistry)(),S=(0,h.useCallback)(((n,s=!0,l=0,c=[])=>{Array.isArray(n)||(n=[n]);const u=a(e)[t];if("replace"===o)_(u,n,void 0,l);else if("group"===o){const t=d(u);"left"===r?n.push(t):n.unshift(t);const o=n.map((e=>(0,p.createBlock)(e.name,e.attributes,e.innerBlocks))),s=n.every((e=>"core/image"===e.name)),a=i("core/gallery",e),h=(0,p.createBlock)(s&&a?"core/gallery":m(),{layout:{type:"flex",flexWrap:s&&a?null:"nowrap"}},o);_([u,...c],h,void 0,l)}else f(n,t,e,s,l)}),[a,e,t,o,_,d,r,i,m,f]),w=(0,h.useCallback)(((n,r,i)=>{if("replace"===o){const o=c(n),r=a(e)[t];x.batch((()=>{y(n,!1),_(r,o,void 0,0)}))}else b(n,r,e,i)}),[o,a,c,b,x,y,_,t,e]),C=function(e,t,n,o,r,i,s,l,a){return c=>{const{srcRootClientId:u,srcClientIds:d,type:h,blocks:g}=DS(c);if("inserter"===h){s();const e=g.map((e=>(0,p.cloneBlock)(e)));i(e,!0,null)}if("block"===h){const s=n(d[0]);if(u===e&&s===t)return;if(d.includes(e)||o(d).some((t=>t===e)))return;if("group"===l){const e=d.map((e=>a(e)));return void i(e,!0,null,d)}const c=u===e,p=d.length;r(d,u,c&&s{if(!t().mediaUpload)return;const s=(0,p.findTransform)((0,p.getBlockTransforms)("from"),(t=>"files"===t.type&&o(t.blockName,e)&&t.isMatch(i)));if(s){const e=s.transform(i,n);r(e)}}}(e,u,k,i,S),I=function(e){return t=>{const n=(0,p.pasteHandler)({HTML:t,mode:"BLOCKS"});n.length&&e(n)}}(S);return e=>{const t=(0,Ga.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?I(n):t.length?B(t):C(e)}}function zS(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach((n=>{const i=function(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:i}=e,s=o?r:i,l=o?i:r,a=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=s>=a&&s<=c?s:s=e.x&&t.top<=e.y&&t.bottom>=e.y}const FS=30,HS=120,US=120;function GS(e,t,n,o){let r=!0;if(t){const e=t?.map((({name:e})=>e));r=n.every((t=>e?.includes(t)))}const i=n.map((t=>e(t))).every((e=>{const[t]=e?.parent||[];return!t||t===o}));return r&&i}function $S(e,t){const{defaultView:n}=t;return!!(n&&e instanceof n.HTMLElement&&e.closest("[data-is-insertion-point]"))}function WS({dropZoneElement:e,rootClientId:t="",parentClientId:n="",isDisabled:o=!1}={}){const r=(0,g.useRegistry)(),[i,s]=(0,h.useState)({index:null,operation:"insert"}),{getBlockType:l,getBlockVariations:a,getGroupingBlockName:c}=(0,g.useSelect)(p.store),{canInsertBlockType:u,getBlockListSettings:d,getBlocks:f,getBlockIndex:b,getDraggedBlockClientIds:k,getBlockNamesByClientId:v,getAllowedBlocks:_,isDragging:y,isGroupable:x,isZoomOut:S,getSectionRootClientId:w,getBlockParents:C}=G((0,g.useSelect)(ji)),{showInsertionPoint:B,hideInsertionPoint:I,startDragging:j,stopDragging:E}=G((0,g.useDispatch)(ji)),M=OS("before"===i.operation||"after"===i.operation?n:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),P=(0,m.useThrottle)((0,h.useCallback)(((o,i)=>{y()||j();const h=k(),g=[t,...C(t,!0)];if(h.some((e=>g.includes(e))))return;const m=_(t),I=v([t])[0],E=v(h);if(!GS(l,m,E,I))return;const M=w();if(S()&&M!==t)return;const P=f(t).filter((e=>!((0,p.hasBlockSupport)(e.name,"visibility",!0)&&!1===e.attributes?.metadata?.blockVisibility)));if(0===P.length)return void r.batch((()=>{s({index:0,operation:"insert"}),B(t,0,{operation:"insert"})}));const R=P.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,p.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>{const e=i.getElementById(`block-${t}`);return e?e.getBoundingClientRect():null},blockIndex:b(t),blockOrientation:d(t)?.orientation}})),A=function(e,t,n="vertical",o={}){const r="horizontal"===n?["left","right"]:["top","bottom"];let i=0,s="before",l=1/0,a=null,c="right";const{dropZoneElement:u,parentBlockOrientation:d,rootBlockIndex:p=0}=o;if(u&&"horizontal"!==d){const e=u.getBoundingClientRect(),[n,o]=zS(t,e,["top","bottom"]);if(e.height>HS&&nUS&&n{const p=o();if(!p)return;let[g,m]=zS(t,p,r);const[f,b]=zS(t,p,["left","right"]),k=VS(t,p);e&&k?g=0:"vertical"===n&&"horizontal"!==d&&(k&&f=e.y}(t,p))&&(a=u,c=b),g"core/image"===e)),o=u("core/gallery",t),r=x([e.clientId,k()]),i=a(c(),"block"),s=i&&i.find((({name:e})=>"group-row"===e));if(n&&!o&&(!r||!s))return;if(!(n||r&&s))return}r.batch((()=>{s({index:N,operation:L,nearestSide:D});const e=["before","after"].includes(L)?n:t;B(e,N,{operation:L,nearestSide:D})}))}}),[y,_,t,v,k,l,w,S,f,d,e,n,b,r,j,B,u,x,a,c]),200);return(0,m.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:o,onDrop:M,onDragOver(e){P(e,e.currentTarget.ownerDocument)},onDragLeave(e){const{ownerDocument:t}=e.currentTarget;$S(e.relatedTarget,t)||$S(e.target,t)||(P.cancel(),I())},onDragEnd(){P.cancel(),E(),I()}})}const KS={};function ZS({children:e,clientId:t}){const n=function(e){return(0,g.useSelect)((t=>{const n=t(ji).getBlock(e);if(!n)return;const o=t(p.store).getBlockType(n.name);return o&&0!==Object.keys(o.providesContext).length?Object.fromEntries(Object.entries(o.providesContext).map((([e,t])=>[e,n.attributes[t]]))):void 0}),[e])}(t);return(0,d.jsx)(iv,{value:n,children:e})}const qS=(0,h.memo)(mw);function YS(e){const{clientId:t,allowedBlocks:n,prioritizedInserterBlocks:o,defaultBlock:r,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:l,template:a,templateLock:c,wrapperRef:u,templateInsertUpdatesSelection:m,__experimentalCaptureToolbars:f,__experimentalAppenderTagName:b,renderAppender:k,orientation:v,placeholder:_,layout:y,name:x,blockType:S,parentLock:w,defaultLayout:C}=e;!function(e,t,n,o,r,i,s,l,a,c,u,d){const p=(0,g.useRegistry)(),m=LS(n),f=LS(o),b=void 0===a||"contentOnly"===t?t:a;(0,h.useLayoutEffect)((()=>{const t={allowedBlocks:m,prioritizedInserterBlocks:f,templateLock:b};if(void 0!==c&&(t.__experimentalCaptureToolbars=c),void 0!==u)t.orientation=u;else{const e=Xl(d?.type);t.orientation=e.getOrientation(d)}void 0!==s&&(I()("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),t.defaultBlock=s),void 0!==r&&(t.defaultBlock=r),void 0!==l&&(I()("__experimentalDirectInsert",{alternative:"directInsert",since:"6.3",version:"6.4"}),t.directInsert=l),void 0!==i&&(t.directInsert=i),void 0!==t.directInsert&&"boolean"!=typeof t.directInsert&&I()("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),AS.get(p)||AS.set(p,{}),AS.get(p)[e]=t,window.queueMicrotask((()=>{const e=AS.get(p);if(Object.keys(e).length){const{updateBlockListSettings:t}=p.dispatch(ji);t(e),AS.set(p,{})}}))}),[e,m,f,b,r,i,s,l,c,u,d,p])}(t,w,n,o,r,i,s,l,c,f,v,y),function(e,t,n,o){const r=(0,g.useRegistry)(),i=(0,h.useRef)(null);(0,h.useLayoutEffect)((()=>{let s=!1;const{getBlocks:l,getSelectedBlocksInitialCaretPosition:a,isBlockSelected:c}=r.select(ji),{replaceInnerBlocks:u,__unstableMarkNextChangeAsNotPersistent:d}=r.dispatch(ji);return window.queueMicrotask((()=>{if(s)return;const r=l(e),h=0===r.length||"all"===n||"contentOnly"===n,g=!E()(t,i.current);if(!h||!g)return;i.current=t;const m=(0,p.synchronizeBlocksWithTemplate)(r,t);E()(m,r)||(d(),u(e,m,0===r.length&&o&&0!==m.length&&c(e),a()))})),()=>{s=!0}}),[t,n,e,r,o])}(t,a,c,m);const B=(0,p.getBlockSupport)(x,"layout")||(0,p.getBlockSupport)(x,"__experimentalLayout")||KS,{allowSizingOnChildren:j=!1}=B,T=y||B,M=(0,h.useMemo)((()=>({...C,...T,...j&&{allowSizingOnChildren:!0}})),[C,T,j]),P=(0,d.jsx)(qS,{rootClientId:t,renderAppender:k,__experimentalAppenderTagName:b,layout:M,wrapperRef:u,placeholder:_});return S?.providesContext&&0!==Object.keys(S.providesContext).length?(0,d.jsx)(ZS,{clientId:t,children:P}):P}function XS(e){return qk(e),(0,d.jsx)(YS,{...e})}const QS=(0,h.forwardRef)(((e,t)=>{const n=JS({ref:t},e);return(0,d.jsx)("div",{className:"block-editor-inner-blocks",children:(0,d.jsx)("div",{...n})})}));function JS(e={},t={}){const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:o,dropZoneElement:r}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:l=""}=C(),a=(0,g.useSelect)((e=>{const{getBlockName:t,isZoomOut:n,getTemplateLock:o,getBlockRootClientId:r,getBlockEditingMode:s,getBlockSettings:l,getSectionRootClientId:a}=G(e(ji));if(!i){const e=a();return{isDropZoneDisabled:n()&&""!==e}}const{hasBlockSupport:c,getBlockType:u}=e(p.store),d=t(i),h=s(i),g=r(i),[m]=l(i,"layout");let f="disabled"===h;if(n()){const e=a();f=i!==e}return{__experimentalCaptureToolbars:c(d,"__experimentalExposeControlsToChildren",!1),name:d,blockType:u(d),parentLock:o(g),parentClientId:g,isDropZoneDisabled:f,defaultLayout:m}}),[i]),{__experimentalCaptureToolbars:c,name:u,blockType:h,parentLock:f,parentClientId:b,isDropZoneDisabled:k,defaultLayout:v}=a,_=WS({dropZoneElement:r,rootClientId:i,parentClientId:b}),y=(0,m.useMergeRefs)([e.ref,o||k||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:_]),x={__experimentalCaptureToolbars:c,layout:s,name:u,blockType:h,parentLock:f,defaultLayout:v,...t},S=x.value&&x.onChange?XS:YS;return{...e,ref:y,className:ms(e.className,"block-editor-block-list__layout",n?"":l),children:i?(0,d.jsx)(S,{...x,clientId:i}):(0,d.jsx)(mw,{...t})}}JS.save=p.__unstableGetInnerBlocksProps,QS.DefaultBlockAppender=function(){const{clientId:e}=C();return(0,d.jsx)(yS,{rootClientId:e})},QS.ButtonBlockAppender=function({showSeparator:e,isFloating:t,onAddBlock:n,isToggle:o}){const{clientId:r}=C();return(0,d.jsx)(uI,{className:ms({"block-list-appender__toggle":o}),rootClientId:r,showSeparator:e,isFloating:t,onAddBlock:n})},QS.Content=()=>JS.save().children;var ew=QS;const tw=new Set([Wa.UP,Wa.RIGHT,Wa.DOWN,Wa.LEFT,Wa.ENTER,Wa.BACKSPACE]);function nw(){const e=(0,g.useSelect)((e=>e(ji).isTyping()),[]),{stopTyping:t}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,i;function s(e){const{clientX:n,clientY:o}=e;r&&i&&(r!==n||i!==o)&&t(),r=n,i=o}return o.addEventListener("mousemove",s),()=>{o.removeEventListener("mousemove",s)}}),[e,t])}function ow(){const{isTyping:e}=(0,g.useSelect)((e=>{const{isTyping:t}=e(ji);return{isTyping:t()}}),[]),{startTyping:t,stopTyping:n}=(0,g.useDispatch)(ji),o=nw(),r=(0,m.useRefEffect)((o=>{const{ownerDocument:r}=o,{defaultView:i}=r,s=i.getSelection();if(e){let e=function(e){const{target:t}=e;a=i.setTimeout((()=>{(0,Ga.isTextField)(t)||n()}))},t=function(e){const{keyCode:t}=e;t!==Wa.ESCAPE&&t!==Wa.TAB||n()},l=function(){s.isCollapsed||n()};let a;return o.addEventListener("focus",e),o.addEventListener("keydown",t),r.addEventListener("selectionchange",l),()=>{i.clearTimeout(a),o.removeEventListener("focus",e),o.removeEventListener("keydown",t),r.removeEventListener("selectionchange",l)}}function l(e){const{type:n,target:r}=e;(0,Ga.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&tw.has(t)}(e))&&t()}return o.addEventListener("keypress",l),o.addEventListener("keydown",l),()=>{o.removeEventListener("keypress",l),o.removeEventListener("keydown",l)}}),[e,t,n]);return(0,m.useMergeRefs)([o,r])}var rw=function({children:e}){return(0,d.jsx)("div",{ref:ow(),children:e})};function iw({clientId:e,rootClientId:t="",position:n="top"}){const[o,r]=(0,h.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:l,blockInsertionPointVisible:a,blockInsertionPoint:c,blocksBeingDragged:u}=(0,g.useSelect)((e=>{const{getInsertionPoint:t,getBlockOrder:n,getSectionRootClientId:o,isBlockInsertionPointVisible:r,getBlockInsertionPoint:i,getDraggedBlockClientIds:s}=G(e(ji)),l=o();return{sectionRootClientId:l,sectionClientIds:n(l),insertionPoint:t(),blockInsertionPoint:i(),blockInsertionPointVisible:r(),blocksBeingDragged:s()}}),[]),p=(0,m.useReducedMotion)();if(!e)return;let f=!1;if(!(t===i&&s&&s.includes(e)))return null;const b=0===l?.index&&e===s[l.index],k=l&&l.hasOwnProperty("index")&&e===s[l.index-1];"top"===n&&(f=b||a&&0===c.index&&e===s[c.index]),"bottom"===n&&(f=k||a&&e===s[c.index-1]);const v=u[0],_=u.includes(e),y=s.indexOf(v),x=y>0?s[y-1]:null;return(_||x===e)&&(f=!1),(0,d.jsx)(ws.__unstableAnimatePresence,{children:f&&(0,d.jsx)(ws.__unstableMotion.div,{initial:{height:0},animate:{height:"calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"},exit:{height:0},transition:{type:"tween",duration:p?0:.2,ease:[.6,0,.4,1]},className:ms("block-editor-block-list__zoom-out-separator",{"is-dragged-over":o}),"data-is-insertion-point":"true",onDragOver:()=>r(!0),onDragLeave:()=>r(!1),children:(0,d.jsx)(ws.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,T.__)("Drop pattern.")})})})}const sw=(0,h.createContext)();sw.displayName="IntersectionObserverContext";const lw=new WeakMap,aw={trailing:!0};function cw({className:e,...t}){const{isOutlineMode:n,isFocusMode:o,temporarilyEditingAsBlocks:r}=(0,g.useSelect)((e=>{const{getSettings:t,getTemporarilyEditingAsBlocks:n,isTyping:o,hasBlockSpotlight:r}=G(e(ji)),{outlineMode:i,focusMode:s}=t();return{isOutlineMode:i&&!o(),isFocusMode:s||r(),temporarilyEditingAsBlocks:n()}}),[]),i=(0,g.useRegistry)(),{setBlockVisibility:s}=(0,g.useDispatch)(ji),l=(0,m.useDebounce)((0,h.useCallback)((()=>{const e={};lw.get(i).forEach((([t,n])=>{e[t]=n})),s(e)}),[i]),300,aw),a=(0,h.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{lw.get(i)||lw.set(i,[]);for(const t of e){const e=t.target.getAttribute("data-block");lw.get(i).push([e,t.isIntersecting])}l()}))}),[]),c=JS({ref:(0,m.useMergeRefs)([PS(),MS(),ow()]),className:ms("is-root-container",e,{"is-outline-mode":n,"is-focus-mode":o})},t);return(0,d.jsxs)(sw.Provider,{value:a,children:[(0,d.jsx)("div",{...c}),!!r&&(0,d.jsx)(uw,{clientId:r})]})}function uw({clientId:e}){const{stopEditingAsBlocks:t}=G((0,g.useDispatch)(ji)),n=(0,g.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=t(ji);return n(e)||o(e,!0)}),[e]);return(0,h.useEffect)((()=>{n||t(e)}),[n,e,t]),null}function dw(e){return(0,d.jsx)(w,{value:x,children:(0,d.jsx)(cw,{...e})})}const pw=[],hw=new Set;function gw({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,layout:r=Ql}){const i=!1!==n,s=!!n,{order:l,isZoomOut:a,selectedBlocks:c,visibleBlocks:u,shouldRenderAppender:h}=(0,g.useSelect)((e=>{const{getSettings:n,getBlockOrder:o,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:l,getTemplateLock:a,getBlockEditingMode:c,isSectionBlock:u,isContainerInsertableToInContentOnlyMode:d,getBlockName:h,isZoomOut:g,canInsertBlockType:m}=G(e(ji)),f=o(t);if(n().isPreviewMode)return{order:f,selectedBlocks:pw,visibleBlocks:hw};const b=r(),k=b[0],v=!(t||k||f.length&&m((0,p.getDefaultBlockName)(),t)),_=!(!t||!k||t!==k);return{order:f,selectedBlocks:b,visibleBlocks:l(),isZoomOut:g(),shouldRenderAppender:(!u(t)||d(h(k),t))&&"disabled"!==c(t)&&!a(t)&&i&&!g()&&(s||_||v)}}),[t,i,s]);return(0,d.jsxs)(ea,{value:r,children:[l.map((e=>(0,d.jsxs)(g.AsyncModeProvider,{value:!u.has(e)&&!c.includes(e),children:[a&&(0,d.jsx)(iw,{clientId:e,rootClientId:t,position:"top"}),(0,d.jsx)(kS,{rootClientId:t,clientId:e}),a&&(0,d.jsx)(iw,{clientId:e,rootClientId:t,position:"bottom"})]},e))),l.length<1&&e,h&&(0,d.jsx)(SS,{tagName:o,rootClientId:t,CustomAppender:n})]})}function mw(e){return(0,d.jsx)(g.AsyncModeProvider,{value:!1,children:(0,d.jsx)(gw,{...e})})}function fw(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(ji);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:i(),isFullSelection:s()}}function bw(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:i}=(0,g.useSelect)(fw,[]);return(0,m.useRefEffect)((r=>{const{ownerDocument:s}=r,{defaultView:l}=s;if(null==e)return;if(!o||t)return;const{length:a}=n;a<2||i&&(r.contentEditable=!0,r.focus(),l.getSelection().removeAllRanges())}),[o,t,n,r,e,i])}function kw(e,t,n,o){let r,i=Ga.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),i.find((function(e){if(!(e.closest("[inert]")||1===e.children.length&&$m(e,e.firstElementChild)&&"true"===e.firstElementChild.getAttribute("contenteditable"))){if(!Ga.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 vw(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,g.useSelect)(ji),{selectBlock:i}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((s=>{let l;function a(){l=null}function c(a){if(a.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:h,metaKey:g}=a,m=c===Wa.UP,f=c===Wa.DOWN,b=c===Wa.LEFT,k=c===Wa.RIGHT,v=m||b,_=b||k,y=m||f,x=_||y,S=d||p||h||g,w=y?Ga.isVerticalEdge:Ga.isHorizontalEdge,{ownerDocument:C}=s,{defaultView:B}=C;if(!x)return;if(o()){if(d)return;if(!r())return;return a.preventDefault(),void(v?i(e()):i(t(),-1))}if(!function(e,t,n){const o=t===Wa.UP||t===Wa.DOWN,{tagName:r}=e,i=e.getAttribute("type");if(o&&!n)return"INPUT"!==r||!["date","datetime-local","month","number","range","time","week"].includes(i);if("INPUT"===r)return["button","checkbox","number","color","file","image","radio","reset","submit"].includes(i);return"TEXTAREA"!==r}(u,c,S))return;y?l||(l=(0,Ga.computeCaretRect)(B)):l=null;const I=(0,Ga.isRTL)(u)?!v:v,{keepCaretInsideBlock:j}=n();if(d)(function(e,t){const n=kw(e,t,s);return n&&Km(n)})(u,v)&&w(u,v)&&(s.contentEditable=!0,s.focus());else if(!y||!(0,Ga.isVerticalEdge)(u,v)||h&&!(0,Ga.isHorizontalEdge)(u,I)||j){if(_&&B.getSelection().isCollapsed&&(0,Ga.isHorizontalEdge)(u,I)&&!j){const e=kw(u,I,s);(0,Ga.placeCaretAtHorizontalEdge)(e,v),a.preventDefault()}}else{const e=kw(u,v,s,!0);e&&((0,Ga.placeCaretAtVerticalEdge)(e,h?!v:v,h?void 0:l),a.preventDefault())}}return s.addEventListener("mousedown",a),s.addEventListener("keydown",c),()=>{s.removeEventListener("mousedown",a),s.removeEventListener("keydown",c)}}),[])}function _w(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,g.useSelect)(ji),{multiSelect:o,selectBlock:r}=(0,g.useDispatch)(ji),i=(0,Yk.__unstableUseShortcutEventMatch)();return(0,m.useRefEffect)((s=>{function l(l){if(!i("core/block-editor/select-all",l))return;const a=t();if(a.length<2&&!(0,Ga.isEntirelySelected)(l.target))return;l.preventDefault();const[c]=a,u=n(c),d=e(u);a.length!==d.length?o(d[0],d[d.length-1]):u&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return s.addEventListener("keydown",l),()=>{s.removeEventListener("keydown",l)}}),[])}function yw(e,t){e.contentEditable=t,t&&e.focus()}function xw(){const{startMultiSelect:e,stopMultiSelect:t}=(0,g.useDispatch)(ji),{isSelectionEnabled:n,hasSelectedBlock:o,isDraggingBlocks:r,isMultiSelecting:i}=(0,g.useSelect)(ji);return(0,m.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;let c,u,d;function p(){t(),a.removeEventListener("mouseup",p),u=a.requestAnimationFrame((()=>{if(!o())return;yw(s,!1);const e=a.getSelection();if(e.rangeCount){const t=e.getRangeAt(0),{commonAncestorContainer:n}=t,o=t.cloneRange();c.contains(n)&&(c.focus(),e.removeAllRanges(),e.addRange(o))}}))}function h({buttons:t,target:o,relatedTarget:l}){o.contains(d)&&(o.contains(l)||r()||1===t&&(i()||s!==o&&"true"===o.getAttribute("contenteditable")&&n()&&(c=o,e(),a.addEventListener("mouseup",p),yw(s,!0))))}return s.addEventListener("mouseout",h),s.addEventListener("mousedown",(function({target:e}){d=e})),()=>{s.removeEventListener("mouseout",h),a.removeEventListener("mouseup",p),a.cancelAnimationFrame(u)}}),[e,t,n,o])}function Sw(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function ww(e){const t=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;return t?.closest("[data-wp-block-attribute-key]")}function Cw(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,g.useDispatch)(ji),{getBlockParents:o,getBlockSelectionStart:r,isMultiSelecting:i}=(0,g.useSelect)(ji);return(0,m.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;function c(l){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:0===n&&(0,Ga.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[n]}(c);if(!s.contains(u)||!s.contains(d))return;const p=l.shiftKey&&"mouseup"===l.type;if(c.isCollapsed&&!p){if("true"===s.contentEditable&&!i()){Sw(s,!1);let e=u.nodeType===u.ELEMENT_NODE?u:u.parentElement;e=e?.closest("[contenteditable]"),e?.focus()}return}let h=Km(u),g=Km(d);if(p){const e=r(),t=Km(l.target),n=t!==g;(h===g&&c.isCollapsed||!g||n)&&(g=t),h!==e&&(h=e)}if(void 0===h&&void 0===g)return void Sw(s,!1);if(h===g)i()?e(h,h):t(h);else{const t=[...o(h),h],r=[...o(g),g],i=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,r);if(t[i]!==h||r[i]!==g)return void e(t[i],r[i]);const s=ww(u),l=ww(d);if(s&&l){const e=c.getRangeAt(0),t=(0,pe.create)({element:s,range:e,__unstableIsEditableTree:!0}),o=(0,pe.create)({element:l,range:e,__unstableIsEditableTree:!0}),r=t.start??t.end,i=o.start??o.end;n({start:{clientId:h,attributeKey:s.dataset.wpBlockAttributeKey,offset:r},end:{clientId:g,attributeKey:l.dataset.wpBlockAttributeKey,offset:i}})}else e(h,g)}}return l.addEventListener("selectionchange",c),a.addEventListener("mouseup",c),()=>{l.removeEventListener("selectionchange",c),a.removeEventListener("mouseup",c)}}),[e,t,n,o])}function Bw(){const{selectBlock:e}=(0,g.useDispatch)(ji),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,g.useSelect)(ji);return(0,m.useRefEffect)((r=>{function i(i){if(!t()||0!==i.button)return;const s=n(),l=Km(i.target);i.shiftKey?s&&s!==l&&(r.contentEditable=!0,r.focus()):o()&&e(l)}return r.addEventListener("mousedown",i),()=>{r.removeEventListener("mousedown",i)}}),[e,t,n,o])}function Iw(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:n,__unstableIsSelectionMergeable:o,hasMultiSelection:r,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:l,getSelectionStart:a,getSelectionEnd:c,getBlockAttributes:u}=(0,g.useSelect)(ji),{replaceBlocks:d,__unstableSplitSelection:h,removeBlocks:f,__unstableDeleteSelection:b,__unstableExpandSelection:k,__unstableMarkAutomaticChange:v}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((g=>{function m(e){"true"===g.contentEditable&&e.preventDefault()}function _(m){if(!m.defaultPrevented)if(r())m.keyCode===Wa.ENTER?(g.contentEditable=!1,m.preventDefault(),e()?d(t(),(0,p.createBlock)((0,p.getDefaultBlockName)())):h()):m.keyCode===Wa.BACKSPACE||m.keyCode===Wa.DELETE?(g.contentEditable=!1,m.preventDefault(),e()?f(t()):o()?b(m.keyCode===Wa.DELETE):k()):1!==m.key.length||m.metaKey||m.ctrlKey||(g.contentEditable=!1,o()?b(m.keyCode===Wa.DELETE):(m.preventDefault(),g.ownerDocument.defaultView.getSelection().removeAllRanges()));else if(m.keyCode===Wa.ENTER){if(m.shiftKey||e())return;const t=n(),o=i(t),r=a(),g=c();if(r.attributeKey===g.attributeKey){const e=u(t)[r.attributeKey],n=(0,p.getBlockTransforms)("from").filter((({type:e})=>"enter"===e)),o=(0,p.findTransform)(n,(t=>t.regExp.test(e)));if(o)return d(t,o.transform({content:e})),void v()}if(!(0,p.hasBlockSupport)(o,"splitting",!1)&&!m.__deprecatedOnSplit)return;s(o,l(t))&&(h(),m.preventDefault())}}function y(e){r()&&(g.contentEditable=!1,o()?b():(e.preventDefault(),g.ownerDocument.defaultView.getSelection().removeAllRanges()))}return g.addEventListener("beforeinput",m),g.addEventListener("keydown",_),g.addEventListener("compositionstart",y),()=>{g.removeEventListener("beforeinput",m),g.removeEventListener("keydown",_),g.removeEventListener("compositionstart",y)}}),[])}function jw(){const{getBlockName:e}=(0,g.useSelect)(ji),{getBlockType:t}=(0,g.useSelect)(p.store),{createSuccessNotice:n}=(0,g.useDispatch)(pr.store);return(0,h.useCallback)(((o,r)=>{let i="";if("copyStyles"===o)i=(0,T.__)("Styles copied to clipboard.");else if(1===r.length){const n=r[0],s=t(e(n))?.title;i="copy"===o?(0,T.sprintf)((0,T.__)('Copied "%s" to clipboard.'),s):(0,T.sprintf)((0,T.__)('Moved "%s" to clipboard.'),s)}else i="copy"===o?(0,T.sprintf)((0,T._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,T.sprintf)((0,T._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(i,{type:"snackbar"})}),[n,e,t])}function Ew({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}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,Ga.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:[]}}const Tw=Symbol("requiresWrapperOnCopy");function Mw(e,t,n){let o=t;const[r]=t;if(r){if(n.select(p.store).getBlockType(r.name)[Tw]){const{getBlockRootClientId:e,getBlockName:t,getBlockAttributes:i}=n.select(ji),s=e(r.clientId),l=t(s);l&&(o=(0,p.createBlock)(l,i(s),o))}}const i=(0,p.serialize)(o);e.clipboardData.setData("text/plain",function(e){e=e.replace(/
/g,"\n");return(0,Ga.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(i)),e.clipboardData.setData("text/html",i)}function Pw(){const e=(0,g.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:l,__unstableIsSelectionMergeable:a,__unstableGetSelectedBlocksWithPartialSelection:c,canInsertBlockType:u,getBlockRootClientId:d}=(0,g.useSelect)(ji),{flashBlock:h,removeBlocks:f,replaceBlocks:b,__unstableDeleteSelection:k,__unstableExpandSelection:v,__unstableSplitSelection:_}=(0,g.useDispatch)(ji),y=jw();return(0,m.useRefEffect)((g=>{function m(m){if(m.defaultPrevented)return;const x=n();if(0===x.length)return;if(!o()){const{target:e}=m,{ownerDocument:t}=e;if("copy"===m.type||"cut"===m.type?(0,Ga.documentHasUncollapsedSelection)(t):(0,Ga.documentHasSelection)(t)&&!t.activeElement.isContentEditable)return}const{activeElement:S}=m.target.ownerDocument;if(!g.contains(S))return;const w=a(),C=l()||s(),B=!C&&!w;if("copy"===m.type||"cut"===m.type)if(m.preventDefault(),1===x.length&&h(x[0]),B)v();else{let n;if(y(m.type,x),C)n=t(x);else{const[e,o]=c();n=[e,...t(x.slice(1,x.length-1)),o]}Mw(m,n,e)}if("cut"===m.type)C&&!B?f(x):(m.target.ownerDocument.activeElement.contentEditable=!1,k());else if("paste"===m.type){const{__experimentalCanUserUseUnfilteredHTML:e,mediaUpload:t}=r();if("true"===m.clipboardData.getData("rich-text"))return;const{plainText:n,html:l,files:a}=Ew(m),c=s();let h=[];if(a.length){if(!t)return void m.preventDefault();const e=(0,p.getBlockTransforms)("from");h=a.reduce(((t,n)=>{const o=(0,p.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else h=(0,p.pasteHandler)({HTML:l,plainText:n,mode:c?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:e});if("string"==typeof h)return;if(c)return b(x,h,h.length-1,-1),void m.preventDefault();if(!o()&&!(0,p.hasBlockSupport)(i(x[0]),"splitting",!1)&&!m.__deprecatedOnSplit)return;const[g]=x,f=d(g),k=[];for(const e of h)if(u(e.name,f))k.push(e);else{const t=i(f),n=e.name!==t?(0,p.switchToBlockType)(e,t):[e];if(!n)return;for(const e of n)for(const t of e.innerBlocks)k.push(t)}_(k),m.preventDefault()}}return g.ownerDocument.addEventListener("copy",m),g.ownerDocument.addEventListener("cut",m),g.ownerDocument.addEventListener("paste",m),()=>{g.ownerDocument.removeEventListener("copy",m),g.ownerDocument.removeEventListener("cut",m),g.ownerDocument.removeEventListener("paste",m)}}),[])}function Rw(){const[e,t,n]=function(){const e=(0,h.useRef)(),t=(0,h.useRef)(),n=(0,h.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:r,getBlockCount:i,getBlockOrder:s,getLastFocus:l,getSectionRootClientId:a,isZoomOut:c}=G((0,g.useSelect)(ji)),{setLastFocus:u}=G((0,g.useDispatch)(ji)),p=(0,h.useRef)();function f(t){const n=e.current.ownerDocument===t.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement;if(p.current)p.current=null;else if(o())e.current.focus();else if(r())l()?.current?l().current.focus():e.current.querySelector(`[data-block="${r()}"]`).focus();else if(c()){const t=a(),o=s(t);o.length?e.current.querySelector(`[data-block="${o[0]}"]`).focus():t?e.current.querySelector(`[data-block="${t}"]`).focus():n.focus()}else{const o=t.target.compareDocumentPosition(n)&t.target.DOCUMENT_POSITION_FOLLOWING,r=Ga.focus.tabbable.find(e.current);r.length&&(o?r[0]:r[r.length-1]).focus()}}const b=(0,d.jsx)("div",{ref:t,tabIndex:"0",onFocus:f}),k=(0,d.jsx)("div",{ref:n,tabIndex:"0",onFocus:f}),v=(0,m.useRefEffect)((o=>{function r(e){if(e.defaultPrevented)return;if(e.keyCode!==Wa.TAB)return;if(!n.current||!t.current)return;const{target:o,shiftKey:r}=e,i=r?"findPrevious":"findNext",s=Ga.focus.tabbable[i](o),l=o.closest("[data-block]"),a=l&&s&&($m(l,s)||Wm(l,s));if((0,Ga.isFormElement)(s)&&a)return;const c=r?t:n;p.current=!0,c.current.focus({preventScroll:!0})}function s(e){u({...l(),current:e.target});const{ownerDocument:t}=o;!e.relatedTarget&&e.target.hasAttribute("data-block")&&t.activeElement===t.body&&0===i()&&o.focus()}function a(o){if(o.keyCode!==Wa.TAB)return;if("region"===o.target?.getAttribute("role"))return;if(e.current===o.target)return;const r=o.shiftKey?"findPrevious":"findNext",i=Ga.focus.tabbable[r](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:c}=o,{defaultView:d}=c;return d.addEventListener("keydown",a),o.addEventListener("keydown",r),o.addEventListener("focusout",s),()=>{d.removeEventListener("keydown",a),o.removeEventListener("keydown",r),o.removeEventListener("focusout",s)}}),[]);return[b,(0,m.useMergeRefs)([e,v]),k]}(),o=(0,g.useSelect)((e=>e(ji).hasMultiSelection()),[]);return[e,(0,m.useMergeRefs)([t,Pw(),Iw(),xw(),Cw(),Bw(),bw(),_w(),vw(),(0,m.useRefEffect)((e=>(e.tabIndex=0,e.dataset.hasMultiSelection=o,o?(e.setAttribute("aria-label",(0,T.__)("Multiple selected blocks")),()=>{delete e.dataset.hasMultiSelection,e.removeAttribute("aria-label")}):()=>{delete e.dataset.hasMultiSelection})),[o])]),n]}var Aw=(0,h.forwardRef)((function({children:e,...t},n){const[o,r,i]=Rw();return(0,d.jsxs)(d.Fragment,{children:[o,(0,d.jsx)("div",{...t,ref:(0,m.useMergeRefs)([r,n]),className:ms(t.className,"block-editor-writing-flow"),children:e}),i]})}));let Nw=null;function Lw({frameSize:e,containerWidth:t,maxContainerWidth:n,scaleContainerWidth:o}){return(Math.min(t,n)-2*e)/o}function Dw({frameSize:e,iframeDocument:t,maxContainerWidth:n=750,scale:o}){const[r,{height:i}]=(0,m.useResizeObserver)(),[s,{width:l,height:a}]=(0,m.useResizeObserver)(),c=(0,h.useRef)(0),u=1!==o,d=(0,m.useReducedMotion)(),p="auto-scaled"===o,g=(0,h.useRef)(!1),f=(0,h.useRef)(null);(0,h.useEffect)((()=>{u||(c.current=l)}),[l,u]);const b=Math.max(c.current,l),k=p?Lw({frameSize:e,containerWidth:l,maxContainerWidth:n,scaleContainerWidth:b}):o,v=(0,h.useRef)({scaleValue:k,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),_=(0,h.useRef)({scaleValue:k,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,h.useCallback)((()=>{const{scrollTop:e}=v.current,{scrollTop:n}=_.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${e}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${n}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",v.current.scrollHeight===v.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(function(e,t){const{scaleValue:n,frameSize:o,scrollTop:r}=e,{scaleValue:i,frameSize:s,scrollTop:l}=t;return[{translate:"0 0",scale:n,paddingTop:o/n+"px",paddingBottom:o/n+"px"},{translate:`0 ${r-l}px`,scale:i,paddingTop:s/i+"px",paddingBottom:s/i+"px"}]}(v.current,_.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})}),[t]),x=(0,h.useCallback)((()=>{g.current=!1,f.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",_.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${_.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=_.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),v.current=_.current}),[t]),S=(0,h.useRef)(!1);return(0,h.useEffect)((()=>{const e=t&&S.current!==u;if(S.current=u,e&&(g.current=!0,u))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}}),[t,u]),(0,h.useEffect)((()=>{if(t&&(p&&1!==v.current.scaleValue&&(v.current.scaleValue=Lw({frameSize:v.current.frameSize,containerWidth:l,maxContainerWidth:n,scaleContainerWidth:l})),k<1&&(g.current||(t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",k),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${e}px`)),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`${i}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`${a}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`${l}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${b}px`)),g.current))if(g.current=!1,f.current){f.current.reverse();const e=v.current,t=_.current;v.current=t,_.current=e}else v.current.scrollTop=t.documentElement.scrollTop,v.current.scrollHeight=t.documentElement.scrollHeight,v.current.containerHeight=a,_.current={scaleValue:k,frameSize:e,containerHeight:t.documentElement.clientHeight},_.current.scrollHeight=function(e,t){const{scaleValue:n,scrollHeight:o}=e,{frameSize:r,scaleValue:i}=t;return o*(i/n)+2*r}(v.current,_.current),_.current.scrollTop=function(e,t){const{containerHeight:n,frameSize:o,scaleValue:r,scrollTop:i}=e,{containerHeight:s,frameSize:l,scaleValue:a,scrollHeight:c}=t;let u=i;u=(u+n/2-o)/r-n/2,u=(u+s/2)*a+l-s/2,u=i<=o?0:u;const d=c-s;return Math.round(Math.min(Math.max(0,u),Math.max(0,d)))}(v.current,_.current),f.current=y(),d?x():f.current.onfinish=x}),[y,x,d,p,k,e,t,i,l,a,n,b]),{isZoomedOut:u,scaleContainerWidth:b,contentResizeListener:r,containerResizeListener:s}}function Ow(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 zw(e){return(0,m.useRefEffect)((()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],i={};for(const e of r)i[e]=e=>{const t=Object.getPrototypeOf(e).constructor.name;Ow(e,window[t],n)},o.addEventListener(e,i[e]);return()=>{for(const e of r)o.removeEventListener(e,i[e])}}))}function Vw({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,readonly:i,forwardedRef:s,title:l=(0,T.__)("Editor canvas"),...a}){const{resolvedAssets:c,isPreviewMode:u}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji),n=t();return{resolvedAssets:n.__unstableResolvedAssets,isPreviewMode:n.isPreviewMode}}),[]),{styles:p="",scripts:f=""}=c,[b,k]=(0,h.useState)(),[v,_]=(0,h.useState)([]),y=PS(),[x,S,w]=Rw(),C=(0,m.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(e){"A"===e.target.tagName&&e.target.getAttribute("href")?.startsWith("#")&&(e.preventDefault(),t.defaultView.location.hash=e.target.getAttribute("href").slice(1))}e._load=()=>{k(e.contentDocument)};const{ownerDocument:r}=e;function i(){const{contentDocument:i}=e,{documentElement:s}=i;t=i,s.classList.add("block-editor-iframe__html"),y(s),i.dir=r.dir;for(const e of Nw||(Nw=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(n.id.startsWith("wp-"))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}),[]),Nw))i.getElementById(e.id)||(i.head.appendChild(e.cloneNode(!0)),u||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),t.addEventListener("click",o)}return _(Array.from(r.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),e.addEventListener("load",i),()=>{delete e._load,e.removeEventListener("load",i),t?.removeEventListener("dragover",n),t?.removeEventListener("drop",n),t?.removeEventListener("click",o)}}),[]),{contentResizeListener:B,containerResizeListener:I,isZoomedOut:j,scaleContainerWidth:E}=Dw({scale:o,frameSize:parseInt(r),iframeDocument:b}),M=(0,m.useDisabled)({isDisabled:!i}),P=(0,m.useMergeRefs)([zw(b),e,y,S,M]),R=`\n\n\t\n\t\t\n\t\t\n\t\t