From 0e498b058e5f5b816bcbba99c39c6d392eec1576 Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Tue, 24 Aug 2021 01:37:56 +0900 Subject: [PATCH] Bundle --- build-browser/isolated-block-editor.css | 2 +- build-browser/isolated-block-editor.js | 2 +- .../components/block-editor-contents/use-yjs/index.js | 11 +++++++---- .../block-editor-contents/use-yjs/index.js.map | 2 +- .../components/formats/collab-caret/style.scss | 7 +------ .../components/block-editor-contents/use-yjs/index.js | 9 ++++++--- .../block-editor-contents/use-yjs/index.js.map | 2 +- build/components/formats/collab-caret/style.scss | 7 +------ 8 files changed, 19 insertions(+), 23 deletions(-) diff --git a/build-browser/isolated-block-editor.css b/build-browser/isolated-block-editor.css index d6c0f03e1..d8c8439d1 100644 --- a/build-browser/isolated-block-editor.css +++ b/build-browser/isolated-block-editor.css @@ -1,7 +1,7 @@ .iso-editor{--wp-admin-theme-color: #0085ba;--wp-admin-theme-color-darker-10: #0073a1;--wp-admin-theme-color-darker-20: #006187;--wp-admin-border-width-focus: 2px} html{position:unset !important}.components-modal__frame,.components-modal__frame select,.iso-editor,.iso-editor select{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:1.4;color:#1e1e1e}.components-modal__frame input,.components-modal__frame select,.components-modal__frame textarea,.components-modal__frame button,.iso-editor input,.iso-editor select,.iso-editor textarea,.iso-editor button{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.components-modal__frame p:not(.components-form-token-field__help),.iso-editor p:not(.components-form-token-field__help){font-size:inherit;line-height:inherit}.components-modal__frame ul.block-editor-block-list__block,.components-modal__frame ol.block-editor-block-list__block,.iso-editor ul.block-editor-block-list__block,.iso-editor ol.block-editor-block-list__block{margin:0 0 1.2em}.components-modal__frame ul li,.components-modal__frame ol li,.iso-editor ul li,.iso-editor ol li{margin-bottom:initial}.components-modal__frame ul,.iso-editor ul{list-style-type:none}.components-modal__frame ol,.iso-editor ol{list-style-type:decimal}.components-modal__frame ul ul,.components-modal__frame ol ul,.iso-editor ul ul,.iso-editor ol ul{list-style-type:circle}.components-modal__frame .components-popover.components-animate__appear,.iso-editor .components-popover.components-animate__appear{animation:none}.iso-editor{width:100%;min-height:145px;background-color:#fff;position:relative;border:1px solid #e0e0e0}.components-modal__frame .components-modal__header h1{font-size:20px !important}.components-modal__frame button{box-shadow:none}.iso-editor__loading{min-height:125px;background-color:#e0e0e0;border:1px solid #e0e0e0;animation:loading-fade 1.6s ease-in-out infinite;margin-bottom:57px}.iso-editor__loading>textarea,.iso-editor__loading>div{display:none}@keyframes loading-fade{0%{opacity:.3}50%{opacity:1}100%{opacity:.3}}#media-search-input{box-sizing:border-box} .iso-editor .editor-error-boundary{margin-bottom:60px;box-shadow:none;border:none}.iso-editor .block-editor-writing-flow{padding:10px 0}.iso-editor .block-editor-writing-flow ul{list-style-type:disc}.iso-editor .block-editor-writing-flow [data-type="core/list"] li{margin-left:20px}.iso-editor .wp-block{max-width:none;margin-left:auto;margin-right:auto}.iso-editor .wp-block[data-align=wide]{max-width:1100px}.iso-editor .wp-block[data-align=full]{max-width:none}.iso-editor img{max-width:100%;height:auto}.iso-editor iframe{width:100%}.iso-editor .components-navigate-regions{height:100%}.iso-editor .block-editor-block-list__layout:first-of-type .block-editor-default-block-appender{margin-left:0}.iso-editor .block-editor-block-list__layout:first-of-type .block-editor-default-block-appender__content{margin-top:16px;margin-bottom:16px}.iso-editor .edit-post-text-editor{padding-top:0}.iso-editor .edit-post-text-editor__body{max-width:none;margin-top:32px;margin-bottom:32px;padding-top:0}.iso-editor .edit-post-text-editor__body textarea{padding:15px}.iso-editor .components-resizable-box__handle::before{box-sizing:border-box}.iso-editor .components-popover__content button:focus,.iso-editor .components-popover__content button:hover{text-decoration:none}.iso-editor .components-popover__content button{font-weight:normal;text-transform:none;font-family:Arial}.iso-editor .components-popover__content button:active,.iso-editor .components-popover__content button:focus,.iso-editor .components-popover__content button:hover{background-color:transparent;background-image:none}.iso-editor .block-editor-block-navigation__container .is-selected button:active,.iso-editor .block-editor-block-navigation__container .is-selected button:focus,.iso-editor .block-editor-block-navigation__container .is-selected button:hover{background-color:#1e1e1e}.iso-editor .components-popover__content h1:before,.iso-editor .components-popover__content h2:before{content:none;display:unset;height:unset;margin:unset;width:unset;background:unset}.iso-editor .components-popover__content .block-editor-inserter__menu .components-tab-panel__tab-content button{font-size:16px}.iso-editor .block-editor-default-block-appender textarea{border:none !important;border-radius:unset !important;box-shadow:none !important} -mark.iso-editor-collab-caret{position:relative;background:#eee;color:currentColor}mark.iso-editor-collab-caret.is-collapsed{background:none}mark.iso-editor-collab-caret::before{left:-1px;top:0;bottom:0;position:absolute;content:"";font-size:1em;width:2px;background:var(--iso-editor-collab-caret-color)}mark.iso-editor-collab-caret.is-shifted::before{left:auto;right:-1px}mark.iso-editor-collab-caret::after{position:absolute;top:-14px;left:-4px;overflow:hidden;min-width:8px;max-width:140px;text-overflow:ellipsis;min-height:8px;padding:2px 4px 3px;content:attr(title);color:#fff;vertical-align:top;font-size:10px;line-height:1;white-space:nowrap;background:var(--iso-editor-collab-caret-color);font-style:normal;font-weight:normal}mark.iso-editor-collab-caret.is-shifted::after{left:auto;right:-4px} +mark.iso-editor-collab-caret{position:relative;background:#eee;color:currentColor}mark.iso-editor-collab-caret.is-collapsed{background:none}mark.iso-editor-collab-caret::before{left:-1px;top:0;bottom:0;position:absolute;content:"";font-size:1em;width:2px;background:var(--iso-editor-collab-caret-color)}mark.iso-editor-collab-caret.is-shifted::before{left:auto;right:-1px}mark.iso-editor-collab-caret::after{position:absolute;top:-14px;right:-4px;overflow:hidden;min-width:8px;max-width:140px;text-overflow:ellipsis;min-height:8px;padding:2px 4px 3px;content:attr(title);color:#fff;vertical-align:top;font-size:10px;line-height:1;white-space:nowrap;background:var(--iso-editor-collab-caret-color);font-style:normal;font-weight:normal} .edit-post-header{height:60px;background:#fff;display:flex;flex-wrap:wrap;align-items:center;max-width:100vw;border-bottom:1px solid #e0e0e0}@media(min-width: 280px){.edit-post-header{flex-wrap:nowrap}}.edit-post-header>.edit-post-header__settings{order:1}@supports(position: sticky){.edit-post-header>.edit-post-header__settings{order:initial}}.edit-post-header__toolbar{display:flex;flex-grow:1}.edit-post-header__toolbar button:active,.edit-post-header__toolbar button:focus:not(.edit-post-header-toolbar__inserter-toggle),.edit-post-header__toolbar button:hover{background-color:transparent;background-image:none;border:none}.edit-post-header__toolbar.edit-post-header__toolbar{padding-left:14px}.edit-post-header .edit-post-header__settings{padding-right:14px}.edit-post-header__settings{display:inline-flex;align-items:center;flex-wrap:wrap}.edit-post-header__settings button.components-button.has-icon{margin-right:0} .edit-post-header-toolbar{display:inline-flex;align-items:center;border:none}.edit-post-header-toolbar .edit-post-header-toolbar__left>.components-button{display:none}@media(min-width: 600px){.edit-post-header-toolbar .edit-post-header-toolbar__left>.components-button{display:inline-flex}}.edit-post-header-toolbar .edit-post-header-toolbar__left>.edit-post-header-toolbar__inserter-toggle{display:inline-flex}.edit-post-header-toolbar .block-editor-block-navigation{display:none}@media(min-width: 600px){.edit-post-header-toolbar .block-editor-block-navigation{display:flex}}.edit-post-header-toolbar .edit-post-header-toolbar__left>.components-button.has-icon,.edit-post-header-toolbar .edit-post-header-toolbar__left>.components-dropdown>.components-button.has-icon{height:36px;min-width:36px;padding:6px}.edit-post-header-toolbar .edit-post-header-toolbar__left>.components-button.has-icon.is-pressed,.edit-post-header-toolbar .edit-post-header-toolbar__left>.components-dropdown>.components-button.has-icon.is-pressed{background:#1e1e1e}.edit-post-header-toolbar .edit-post-header-toolbar__left>.components-button.has-icon:focus:not(:disabled),.edit-post-header-toolbar .edit-post-header-toolbar__left>.components-dropdown>.components-button.has-icon:focus:not(:disabled){box-shadow:0 0 0 2px var(--wp-admin-theme-color),inset 0 0 0 1px #fff;outline:1px solid transparent}.edit-post-header-toolbar .edit-post-header-toolbar__left>.components-button.has-icon::before,.edit-post-header-toolbar .edit-post-header-toolbar__left>.components-dropdown>.components-button.has-icon::before{display:none}.edit-post-header-toolbar__left{display:inline-flex;align-items:center;padding-left:0}.edit-post-header-toolbar .edit-post-header-toolbar__left>.edit-post-header-toolbar__inserter-toggle.has-icon{margin-right:8px;min-width:32px;width:32px;height:32px;padding:0}.show-icon-labels .edit-post-header-toolbar .edit-post-header-toolbar__left>.edit-post-header-toolbar__inserter-toggle.has-icon{height:36px}.edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar{overflow-y:hidden}.block-editor-block-mover .block-editor-block-mover-button{height:24px;width:42px;padding-right:11px !important;padding-left:6px !important} .iso-editor .block-editor-inserter__menu,.iso-editor .popover-slot .iso-inspector{background-color:#fff;line-height:1.4;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px}.iso-editor .block-editor-inserter__menu{min-width:300px;max-height:55vh}.iso-editor .popover-slot .iso-inspector{overflow:visible}.iso-editor .popover-slot .iso-inspector fieldset{border:none}.iso-editor .popover-slot .iso-inspector .components-panel__body{width:100%;margin-bottom:0}.iso-editor .popover-slot .iso-inspector .components-panel__body{border-bottom:none}.iso-editor .popover-slot .iso-inspector h2,.iso-editor .popover-slot .iso-inspector h3,.iso-editor .popover-slot .iso-inspector label{font-size:13px}.iso-editor .popover-slot .iso-inspector .components-popover__content{min-height:650px;width:300px}.iso-editor .popover-slot .iso-inspector ul{margin:0}.iso-editor .popover-slot .iso-inspector .components-panel__header{margin-top:1px}.iso-editor .popover-slot .iso-inspector ul li{margin:0}.iso-editor .popover-slot .iso-inspector ul li .is-active{box-shadow:inset 0 0 0 2px transparent,inset 0 -4px 0 0 #007cba;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) transparent,inset 0 -4px 0 0 var(--wp-admin-theme-color);position:relative;z-index:1}.iso-editor .popover-slot .iso-inspector ul li .is-active:focus{box-shadow:inset 0 0 0 2px #007cba,inset 0 -4px 0 0 #007cba;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 -4px 0 0 var(--wp-admin-theme-color)} diff --git a/build-browser/isolated-block-editor.js b/build-browser/isolated-block-editor.js index 430eec493..96d3f0734 100644 --- a/build-browser/isolated-block-editor.js +++ b/build-browser/isolated-block-editor.js @@ -7,4 +7,4 @@ to { transform: rotate(360deg); } -`,sq=`calc( ( ${Lw.spinnerSize} - ${Lw.spinnerSize} * ( 2 / 3 ) ) / 2 )`,lq=yf("span",{target:"e1s472tg0"})("display:inline-block;background-color:",Gk.gray[600],";width:",Lw.spinnerSize,";height:",Lw.spinnerSize,";opacity:0.7;margin:5px 11px 0;border-radius:100%;position:relative;&::before{content:'';position:absolute;background-color:",Gk.white,";top:",sq,";left:",sq,";width:calc( ",Lw.spinnerSize," / 4.5 );height:calc( ",Lw.spinnerSize," / 4.5 );border-radius:100%;transform-origin:calc( ",Lw.spinnerSize," / 3 ) calc( ",Lw.spinnerSize," / 3 );animation:",iq," 1s infinite linear;}");function cq(){return(0,tt.createElement)(lq,{className:"components-spinner"})}const uq=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,tt.createElement)(uo,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),dq=({value:e,onChange:t=at.noop,settings:n})=>{if(!n||!n.length)return null;const r=n=>r=>{t({...e,[n.id]:r})},o=n.map((t=>(0,tt.createElement)(KN,{className:"block-editor-link-control__setting",key:t.id,label:t.title,onChange:r(t),checked:!!e&&!!e[t.id]})));return(0,tt.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,tt.createElement)(Mf,{as:"legend"},er("Currently selected link settings")),o)},pq=ni((e=>t=>(0,tt.createElement)(e,ot({},t,{speak:mv,debouncedSpeak:qp(mv,500)}))),"withSpokenMessages"),mq=ni((e=>class extends tt.Component{constructor(e){super(e),this.timeouts=[],this.setTimeout=this.setTimeout.bind(this),this.clearTimeout=this.clearTimeout.bind(this)}componentWillUnmount(){this.timeouts.forEach(clearTimeout)}setTimeout(e,t){const n=setTimeout((()=>{e(),this.clearTimeout(n)}),t);return this.timeouts.push(n),n}clearTimeout(e){clearTimeout(e),this.timeouts=(0,at.without)(this.timeouts,e)}render(){const t={...this.props,setTimeout:this.setTimeout,clearTimeout:this.clearTimeout};return(0,tt.createElement)(e,t)}}),"withSafeTimeout");function hq(e){try{return new URL(e),!0}catch{return!1}}class fq extends tt.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,tt.createRef)(),this.inputRef=(0,tt.createRef)(),this.updateSuggestions=(0,at.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:r}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,YR()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value!==r&&this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const r=!(e&&e.length);if(!r&&(e.length<2||!n&&hq(e)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const o=t(e,{isInitialSuggestions:r});o.then((e=>{this.suggestionsRequest===o&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak(pn(nr("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak(er("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===o&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=o}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n.trim())}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:r,loading:o}=this.state;if(!t||!r.length||o){switch(e.keyCode){case am:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case sm:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case nm:this.props.onSubmit&&this.props.onSubmit()}return}const a=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case am:{e.preventDefault();const t=n?n-1:r.length-1;this.setState({selectedSuggestion:t});break}case sm:{e.preventDefault();const t=null===n||n===r.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case 9:null!==this.state.selectedSuggestion&&(this.selectLink(a),this.props.speak(er("Link selected.")));break;case nm:null!==this.state.selectedSuggestion?(this.selectLink(a),this.props.onSubmit&&this.props.onSubmit(a)):this.props.onSubmit&&this.props.onSubmit()}}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:r=!1},{showSuggestions:o}){let a=o;const i=e&&e.length;return r||i||(a=!1),!0===n&&(a=!1),{showSuggestions:a,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,tt.createElement)(tt.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e,className:t,isFullWidth:n,instanceId:r,placeholder:o=er("Paste URL or type to search"),__experimentalRenderControl:a,value:i=""}=this.props,{loading:s,showSuggestions:l,selectedSuggestion:c,suggestionsListboxId:u,suggestionOptionIdPrefix:d}=this.state,p={id:`url-input-control-${r}`,label:e,className:so()("block-editor-url-input",t,{"is-full-width":n})},m={value:i,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:o,onKeyDown:this.onKeyDown,role:"combobox","aria-label":er("URL"),"aria-expanded":l,"aria-autocomplete":"list","aria-owns":u,"aria-activedescendant":null!==c?`${d}-${c}`:void 0,ref:this.inputRef};return a?a(p,m,s):(0,tt.createElement)(EA,p,(0,tt.createElement)("input",m),s&&(0,tt.createElement)(cq,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:r=!1}=this.props,{showSuggestions:o,suggestions:a,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:l,loading:c}=this.state,u={id:s,ref:this.autocompleteRef,role:"listbox"},d=(e,t)=>({role:"option",tabIndex:"-1",id:`${l}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===i});return(0,at.isFunction)(t)&&o&&a.length?t({suggestions:a,selectedSuggestion:i,suggestionsListProps:u,buildSuggestionItemProps:d,isLoading:c,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:r&&!(n&&n.length)}):!(0,at.isFunction)(t)&&o&&a.length?(0,tt.createElement)(yh,{position:"bottom",noArrow:!0,focusOnMount:!1},(0,tt.createElement)("div",ot({},u,{className:so()("block-editor-url-input__suggestions",`${e}__suggestions`)}),a.map(((e,t)=>(0,tt.createElement)(wf,ot({},d(0,t),{key:e.id,className:so()("block-editor-url-input__suggestion",{"is-selected":t===i}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}const gq=lS(mq,pq,cS,ZI(((e,t)=>{if((0,at.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(nk);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(fq),bq=({searchTerm:e,onClick:t,itemProps:n,isSelected:r,buttonText:o})=>{if(!e)return null;let a;return a=o?(0,at.isFunction)(o)?o(e):o:TP(pn(er("Create: %s"),e),{mark:(0,tt.createElement)("mark",null)}),(0,tt.createElement)(wf,ot({},n,{className:so()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":r}),onClick:t}),(0,tt.createElement)($L,{className:"block-editor-link-control__search-item-icon",icon:OS}),(0,tt.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,tt.createElement)("span",{className:"block-editor-link-control__search-item-title"},a)))};function yq(e,t=null){let n=e.replace(/^(?:https?:)\/\/(?:www\.)?/,"");n.match(/^[^\/]+\/$/)&&(n=n.replace("/",""));if(!t||n.length<=t||!n.match(/([\w|:])*\.(?:jpg|jpeg|gif|png|svg)/))return n;n=n.split("?")[0];const r=n.split("/"),o=r[r.length-1];if(o.length<=t)return"…"+n.slice(-t);const a=o.lastIndexOf("."),[i,s]=[o.slice(0,a),o.slice(a+1)],l=i.slice(-3)+"."+s;return o.slice(0,t-l.length-1)+"…"+l}function vq(e){try{return decodeURI(e)}catch(t){return e}}const _q=({text:e="",highlight:t=""})=>{const n=t.trim();if(!n)return e;const r=new RegExp(`(${(0,at.escapeRegExp)(n)})`,"gi");return TP(e.replace(r,"$&"),{mark:(0,tt.createElement)("mark",null)})},Mq=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,tt.createElement)(uo,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),kq=({itemProps:e,suggestion:t,isSelected:n=!1,onClick:r,isURL:o=!1,searchTerm:a="",shouldShowType:i=!1})=>(0,tt.createElement)(wf,ot({},e,{onClick:r,className:so()("block-editor-link-control__search-item",{"is-selected":n,"is-url":o,"is-entity":!o})}),o&&(0,tt.createElement)($L,{className:"block-editor-link-control__search-item-icon",icon:Mq}),(0,tt.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,tt.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,tt.createElement)(_q,{text:t.title,highlight:a})),(0,tt.createElement)("span",{"aria-hidden":!o,className:"block-editor-link-control__search-item-info"},!o&&(yq(vq(t.url))||""),o&&er("Press ENTER to add this link"))),i&&t.type&&(0,tt.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===t.type?"tag":t.type)),wq="__CREATE__",Eq=[{id:"opensInNewTab",title:er("Open in new tab")}];function Lq({instanceId:e,withCreateSuggestion:t,currentInputValue:n,handleSuggestionClick:r,suggestionsListProps:o,buildSuggestionItemProps:a,suggestions:i,selectedSuggestion:s,isLoading:l,isInitialSuggestions:c,createSuggestionButtonText:u,suggestionsQuery:d}){const p=so()("block-editor-link-control__search-results",{"is-loading":l}),m=["url","mailto","tel","internal"],h=1===i.length&&m.includes(i[0].type.toLowerCase()),f=t&&!h&&!c,g=!(null!=d&&d.type),b=`block-editor-link-control-search-results-label-${e}`,y=c?er("Recently updated"):pn(er('Search results for "%s"'),n),v=(0,tt.createElement)(c?tt.Fragment:Mf,{},(0,tt.createElement)("span",{className:"block-editor-link-control__search-results-label",id:b},y));return(0,tt.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},v,(0,tt.createElement)("div",ot({},o,{className:p,"aria-labelledby":b}),i.map(((e,t)=>f&&wq===e.type?(0,tt.createElement)(bq,{searchTerm:n,buttonText:u,onClick:()=>r(e),key:e.type,itemProps:a(e,t),isSelected:t===s}):wq===e.type?null:(0,tt.createElement)(kq,{key:`${e.id}-${e.type}`,itemProps:a(e,t),suggestion:e,index:t,onClick:()=>{r(e)},isSelected:t===s,isURL:m.includes(e.type.toLowerCase()),searchTerm:n,shouldShowType:g})))))}function Aq(e){const t=/^([^\s:]+:)/.exec(e);if(t)return t[1]}const Sq=/^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;function Cq(e){return Sq.test(e)}const Tq=/^(?:[a-z]+:|#|\?|\.|\/)/i;function xq(e){return e?(e=e.trim(),Tq.test(e)||Cq(e)?e:"http://"+e):e}function zq(e){const t=(0,at.startsWith)(e,"#");return hq(e)||e&&e.includes("www.")||t}const Oq=()=>Promise.resolve([]),Nq=e=>{let t="URL";const n=Aq(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),(0,at.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?xq(e):e,type:t}])};function Dq(e,t,n,r){const{fetchSearchSuggestions:o}=Cl((e=>{const{getSettings:t}=e(nk);return{fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),a=t?Nq:Oq;return(0,tt.useCallback)(((t,{isInitialSuggestions:i})=>zq(t)?a(t,{isInitialSuggestions:i}):(async(e,t,n,r,o,a)=>{const{isInitialSuggestions:i}=t;let s=await Promise.all([n(e,t),r(e)]);return s=e.includes(" ")||!a||i?s[0]:s[0].concat(s[1]),i||zq(e)||!o?s:s.concat({title:e,url:e,type:wq})})(t,{...e,isInitialSuggestions:i},o,a,n,r)),[a,o,n])}const Bq=()=>Promise.resolve([]),Iq=(0,tt.forwardRef)((({value:e,children:t,currentLink:n={},className:r=null,placeholder:o=null,withCreateSuggestion:a=!1,onCreateSuggestion:i=at.noop,onChange:s=at.noop,onSelect:l=at.noop,showSuggestions:c=!0,renderSuggestions:u=(e=>(0,tt.createElement)(Lq,e)),fetchSuggestions:d=null,allowDirectEntry:p=!0,showInitialSuggestions:m=!1,suggestionsQuery:h={},withURLSuggestion:f=!0,createSuggestionButtonText:g},b)=>{const y=Dq(h,p,a,f),v=c?d||y:Bq,_=Zk(Iq),[M,k]=(0,tt.useState)(),w=async e=>{let t=e;if(wq!==e.type)(p||t&&Object.keys(t).length>=1)&&l({...(0,at.omit)(n,"id","url"),...t},t);else try{var r;t=await i(e.title),null!==(r=t)&&void 0!==r&&r.url&&l(t)}catch(e){}};return(0,tt.createElement)("div",null,(0,tt.createElement)(gq,{className:r,value:e,onChange:(e,t)=>{s(e),k(t)},placeholder:null!=o?o:er("Search or type url"),__experimentalRenderSuggestions:c?t=>u({...t,instanceId:_,withCreateSuggestion:a,currentInputValue:e,createSuggestionButtonText:g,suggestionsQuery:h,handleSuggestionClick:e=>{t.handleSuggestionClick&&t.handleSuggestionClick(e),w(e)}}):null,__experimentalFetchLinkSuggestions:v,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:m,onSubmit:t=>{w(t||M||{url:e})},ref:b}),t)})),Pq=Iq,{Slot:Rq,Fill:Wq}=uh("BlockEditorLinkControlViewer");function Yq(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}const Hq=function(e){const[t,n]=(0,tt.useReducer)(Yq,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=Cl((e=>{const{getSettings:t}=e(nk);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,tt.useEffect)((()=>{if(null!=e&&e.length&&r&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,o=t.signal;return r(e,{signal:o}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{o.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function qq({value:e,onEditClick:t,hasRichPreviews:n=!1}){const r=n?null==e?void 0:e.url:null,{richData:o,isFetching:a}=Hq(r),i=o&&Object.keys(o).length,s=e&&yq(vq(e.url),16)||"";return(0,tt.createElement)("div",{"aria-label":er("Currently selected"),"aria-selected":"true",className:so()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":i,"is-fetching":!!a,"is-preview":!0})},(0,tt.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,tt.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,tt.createElement)("span",{className:so()("block-editor-link-control__search-item-icon",{"is-image":null==o?void 0:o.icon})},null!=o&&o.icon?(0,tt.createElement)("img",{src:null==o?void 0:o.icon,alt:""}):(0,tt.createElement)($L,{icon:Mq})),(0,tt.createElement)("span",{className:"block-editor-link-control__search-item-details"},(0,tt.createElement)(CA,{className:"block-editor-link-control__search-item-title",href:e.url},(null==o?void 0:o.title)||(null==e?void 0:e.title)||s),(null==e?void 0:e.url)&&(0,tt.createElement)("span",{className:"block-editor-link-control__search-item-info"},s))),(0,tt.createElement)(wf,{variant:"secondary",onClick:()=>t(),className:"block-editor-link-control__search-item-action"},er("Edit")),(0,tt.createElement)(Rq,{fillProps:e})),(i||a)&&(0,tt.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},(0,tt.createElement)("div",{"aria-hidden":!(null!=o&&o.image),className:so()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=o&&o.image)})},(null==o?void 0:o.image)&&(0,tt.createElement)("img",{src:null==o?void 0:o.image,alt:""})),(0,tt.createElement)("div",{"aria-hidden":!(null!=o&&o.description),className:so()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=o&&o.description)})},(null==o?void 0:o.description)&&(0,tt.createElement)(Rw,{truncate:!0,numberOfLines:"2"},o.description))))}const jq=e=>{let t=!1;return{promise:new Promise(((n,r)=>{e.then((e=>t?r({isCanceled:!0}):n(e)),(e=>r(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}};function Fq({searchInputPlaceholder:e,value:t,settings:n=Eq,onChange:r=at.noop,onRemove:o,noDirectEntry:a=!1,showSuggestions:i=!0,showInitialSuggestions:s,forceIsEditingLink:l,createSuggestion:c,withCreateSuggestion:u,inputValue:d="",suggestionsQuery:p={},noURLSuggestion:m=!1,createSuggestionButtonText:h,hasRichPreviews:f=!1}){void 0===u&&c&&(u=!0);const g=(0,tt.useRef)(!0),b=(0,tt.useRef)(),[y,v]=(0,tt.useState)(t&&t.url||""),_=d||y,[M,k]=(0,tt.useState)(void 0!==l?l:!t||!t.url),w=(0,tt.useRef)(!1);function E(){var e;w.current=!(null===(e=b.current)||void 0===e||!e.contains(b.current.ownerDocument.activeElement)),k(!1)}(0,tt.useEffect)((()=>{void 0!==l&&l!==M&&k(l)}),[l]),(0,tt.useEffect)((()=>{if(g.current)return void(g.current=!1);(zm.focusable.find(b.current)[0]||b.current).focus(),w.current=!1}),[M]);const{createPage:L,isCreatingPage:A,errorMessage:S}=function(e){const t=(0,tt.useRef)(),[n,r]=(0,tt.useState)(!1),[o,a]=(0,tt.useState)(null);return(0,tt.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){r(!0),a(null);try{return t.current=jq(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw a(e.message||er("An unknown error occurred during creation. Please try again.")),e}finally{r(!1)}},isCreatingPage:n,errorMessage:o}}(c),C=()=>{_!==(null==t?void 0:t.url)&&r({url:_}),E()},T=o&&t&&!M&&!A,x=!(null==n||!n.length);return(0,tt.createElement)("div",{tabIndex:-1,ref:b,className:"block-editor-link-control"},A&&(0,tt.createElement)("div",{className:"block-editor-link-control__loading"},(0,tt.createElement)(cq,null)," ",er("Creating"),"…"),(M||!t)&&!A&&(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},(0,tt.createElement)(Pq,{currentLink:t,className:"block-editor-link-control__search-input",placeholder:e,value:_,withCreateSuggestion:u,onCreateSuggestion:L,onChange:v,onSelect:e=>{r(e),E()},showInitialSuggestions:s,allowDirectEntry:!a,showSuggestions:i,suggestionsQuery:p,withURLSuggestion:!m,createSuggestionButtonText:h},(0,tt.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,tt.createElement)(wf,{onClick:()=>C(),onKeyDown:e=>{const{keyCode:t}=e;t===nm&&(e.preventDefault(),C())},label:er("Submit"),icon:uq,className:"block-editor-link-control__search-submit"})))),S&&(0,tt.createElement)(RT,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},S)),t&&!M&&!A&&(0,tt.createElement)(qq,{key:null==t?void 0:t.url,value:t,onEditClick:()=>k(!0),hasRichPreviews:f}),(x||T)&&(0,tt.createElement)("div",{className:"block-editor-link-control__tools"},(0,tt.createElement)(dq,{value:t,settings:n,onChange:r}),T&&(0,tt.createElement)(wf,{className:"block-editor-link-control__unlink",isDestructive:!0,variant:"link",onClick:o},er("Unlink"))))}Fq.ViewerFill=Wq;const Vq=Fq;const Xq=function({accept:e,children:t,multiple:n=!1,onChange:r,render:o,...a}){const i=(0,tt.useRef)(),s=()=>{i.current.click()},l=o?o({openFileDialog:s}):(0,tt.createElement)(wf,ot({onClick:s},a),t);return(0,tt.createElement)("div",{className:"components-form-file-upload"},l,(0,tt.createElement)("input",{type:"file",ref:i,multiple:n,style:{display:"none"},accept:e,onChange:r}))},Uq=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})),$q=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{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"})),Kq=FP("editor.MediaUpload")((()=>null));const Gq=function({fallback:e=null,children:t}){return Cl((e=>{const{getSettings:t}=e(nk);return!!t().mediaUpload}),[])?t:e},Jq=lS([eP((e=>{const{createNotice:t,removeNotice:n}=e(UI);return{createNotice:t,removeNotice:n}})),FP("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,allowedTypes:n,accept:r,onSelect:o,onSelectURL:a,onFilesUpload:i=at.noop,name:s=er("Replace"),createNotice:l,removeNotice:c})=>{const[u,d]=(0,tt.useState)(e),p=Cl((e=>e(nk).getSettings().mediaUpload),[]),m=(0,tt.createRef)(),h=(0,at.uniqueId)("block-editor/media-replace-flow/error-notice/"),f=e=>{const t=document.createElement("div");t.innerHTML=ei(e);const n=t.textContent||t.innerText||"";setTimeout((()=>{l("error",n,{speak:!0,id:h,isDismissible:!0})}),1e3)},g=e=>{o(e),d(e.url),mv(er("The media file has been replaced")),c(h)},b=e=>{e.keyCode===sm&&(e.preventDefault(),e.target.click())};return(0,tt.createElement)(Vg,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>(0,tt.createElement)(qg,{ref:m,"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:b},s),renderContent:({onClose:e})=>(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(Gg,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,tt.createElement)(Kq,{value:t,onSelect:e=>g(e),allowedTypes:n,render:({open:e})=>(0,tt.createElement)(zB,{icon:Uq,onClick:e},er("Open Media Library"))}),(0,tt.createElement)(Gq,null,(0,tt.createElement)(Xq,{onChange:e=>{(e=>{const t=e.target.files;i(t),p({allowedTypes:n,filesList:t,onFileChange:([e])=>{g(e)},onError:f})})(e)},accept:r,render:({openFileDialog:e})=>(0,tt.createElement)(zB,{icon:$q,onClick:()=>{e()}},er("Upload"))}))),a&&(0,tt.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,tt.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},er("Current media URL:")),(0,tt.createElement)(Vq,{value:{url:u},settings:[],showSuggestions:!1,onChange:({url:e})=>{d(e),a(e),m.current.focus()}})))})}));function Zq({className:e,label:t,onFilesDrop:n,onHTMLDrop:r,onDrop:o}){const[a,i]=(0,tt.useState)(),[s,l]=(0,tt.useState)(),[c,u]=(0,tt.useState)(),d=rW({onDrop(e){const t=$I(e.dataTransfer),a=e.dataTransfer.getData("text/html");t.length&&n?n(t):a&&r?r(a):o&&o(e)},onDragStart(e){i(!0);let t="default";(0,at.includes)(e.dataTransfer.types,"Files")||$I(e.dataTransfer).length>0?t="file":(0,at.includes)(e.dataTransfer.types,"text/html")&&(t="html"),u(t)},onDragEnd(){i(!1),u()},onDragEnter(){l(!0)},onDragLeave(){l(!1)}});let p;s&&(p=(0,tt.createElement)("div",{className:"components-drop-zone__content"},(0,tt.createElement)($L,{icon:$q,className:"components-drop-zone__content-icon"}),(0,tt.createElement)("span",{className:"components-drop-zone__content-text"},t||er("Drop files to upload"))));const m=so()("components-drop-zone",e,{"is-active":(a||s)&&("file"===c&&n||"html"===c&&r||"default"===c&&o),"is-dragging-over-document":a,"is-dragging-over-element":s,[`is-dragging-${c}`]:!!c});return(0,tt.createElement)("div",{ref:d,className:m},p)}const Qq=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));function ej({url:e,urlLabel:t,className:n}){const r=so()(n,"block-editor-url-popover__link-viewer-url");return e?(0,tt.createElement)(CA,{className:r,href:e},t||yq(vq(e))):(0,tt.createElement)("span",{className:r})}function tj({additionalControls:e,children:t,renderSettings:n,position:r="bottom center",focusOnMount:o="firstElement",...a}){const[i,s]=(0,tt.useState)(!1),l=!!n&&i;return(0,tt.createElement)(yh,ot({className:"block-editor-url-popover",focusOnMount:o,position:r},a),(0,tt.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,tt.createElement)("div",{className:"block-editor-url-popover__row"},t,!!n&&(0,tt.createElement)(wf,{className:"block-editor-url-popover__settings-toggle",icon:OA,label:er("Link settings"),onClick:()=>{s(!i)},"aria-expanded":i})),l&&(0,tt.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},n())),e&&!l&&(0,tt.createElement)("div",{className:"block-editor-url-popover__additional-controls"},e))}tj.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:r,...o}){return(0,tt.createElement)("form",ot({className:so()("block-editor-url-popover__link-editor",t)},o),(0,tt.createElement)(gq,{value:r,onChange:n,autocompleteRef:e}),(0,tt.createElement)(wf,{icon:uq,label:er("Apply"),type:"submit"}))},tj.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:r,urlLabel:o,...a}){return(0,tt.createElement)("div",ot({className:so()("block-editor-url-popover__link-viewer",e)},a),(0,tt.createElement)(ej,{url:r,urlLabel:o,className:t}),n&&(0,tt.createElement)(wf,{icon:Qq,label:er("Edit"),onClick:n}))};const nj=tj,rj=({src:e,onChange:t,onSubmit:n,onClose:r})=>(0,tt.createElement)(nj,{onClose:r},(0,tt.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n},(0,tt.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":er("URL"),placeholder:er("Paste or type URL"),onChange:t,value:e}),(0,tt.createElement)(wf,{className:"block-editor-media-placeholder__url-input-submit-button",icon:uq,label:er("Apply"),type:"submit"})));const oj=FP("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:r,labels:o={},mediaPreview:a,notices:i,isAppender:s,accept:l,addToGallery:c,multiple:u=!1,dropZoneUIOnly:d,disableDropZone:p,disableMediaButtons:m,onError:h,onSelect:f,onCancel:g,onSelectURL:b,onDoubleClick:y,onFilesPreUpload:v=at.noop,onHTMLDrop:_=at.noop,children:M}){const k=Cl((e=>{const{getSettings:t}=e(nk);return t().mediaUpload}),[]),[w,E]=(0,tt.useState)(""),[L,A]=(0,tt.useState)(!1);(0,tt.useEffect)((()=>{var t;E(null!==(t=null==e?void 0:e.src)&&void 0!==t?t:"")}),[null==e?void 0:e.src]);const S=e=>{E(e.target.value)},C=()=>{A(!0)},T=()=>{A(!1)},x=e=>{e.preventDefault(),w&&b&&(b(w),T())},z=n=>{let r;if(v(n),u)if(c){let t=[];r=n=>{const r=(null!=e?e:[]).filter((e=>e.id?!t.some((({id:t})=>Number(t)===Number(e.id))):!t.some((({urlSlug:t})=>e.url.includes(t)))));f(r.concat(n)),t=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else r=f;else r=([e])=>f(e);k({allowedTypes:t,filesList:n,onFileChange:r,onError:h})},O=e=>{z(e.target.files)},N=(e,l)=>{let{instructions:c,title:u}=o;if(k||b||(c=er("To edit this block, you need permission to upload media.")),void 0===c||void 0===u){const e=null!=t?t:[],[n]=e,r=1===e.length,o=r&&"audio"===n,a=r&&"image"===n,i=r&&"video"===n;void 0===c&&k&&(c=er("Upload a media file or pick one from your media library."),o?c=er("Upload an audio file, pick one from your media library, or add one with a URL."):a?c=er("Upload an image file, pick one from your media library, or add one with a URL."):i&&(c=er("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===u&&(u=er("Media"),o?u=er("Audio"):a?u=er("Image"):i&&(u=er("Video")))}const d=so()("block-editor-media-placeholder",n,{"is-appender":s});return(0,tt.createElement)(yH,{icon:r,label:u,instructions:c,className:d,notices:i,onClick:l,onDoubleClick:y,preview:a},e,M)},D=()=>p?null:(0,tt.createElement)(Zq,{onFilesDrop:z,onHTMLDrop:_}),B=()=>g&&(0,tt.createElement)(wf,{className:"block-editor-media-placeholder__cancel-button",title:er("Cancel"),variant:"link",onClick:g},er("Cancel")),I=()=>b&&(0,tt.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,tt.createElement)(wf,{className:"block-editor-media-placeholder__button",onClick:C,isPressed:L,variant:"tertiary"},er("Insert from URL")),L&&(0,tt.createElement)(rj,{src:w,onChange:S,onSubmit:x,onClose:T}));return d||m?(d&&Hp("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),(0,tt.createElement)(Gq,null,D())):(0,tt.createElement)(Gq,{fallback:N(I())},(()=>{const n=(0,tt.createElement)(Kq,{addToGallery:c,gallery:u&&!(!t||0===t.length)&&t.every((e=>"image"===e||e.startsWith("image/"))),multiple:u,onSelect:f,allowedTypes:t,value:Array.isArray(e)?e.map((({id:e})=>e)):e.id,render:({open:e})=>(0,tt.createElement)(wf,{variant:"tertiary",onClick:()=>{e()}},er("Media Library"))});if(k&&s)return(0,tt.createElement)(tt.Fragment,null,D(),(0,tt.createElement)(Xq,{onChange:O,accept:l,multiple:u,render:({openFileDialog:e})=>{const t=(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(wf,{variant:"primary",className:so()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},er("Upload")),n,I(),B());return N(t,e)}}));if(k){const e=(0,tt.createElement)(tt.Fragment,null,D(),(0,tt.createElement)(Xq,{variant:"primary",className:so()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:O,accept:l,multiple:u},er("Upload")),n,I(),B());return N(e)}return N(n)})())})),aj=({colorSettings:e,...t})=>{const n=e.map((({value:e,onChange:t,...n})=>({...n,colorValue:e,onColorChange:t})));return(0,tt.createElement)(IT,ot({settings:n,gradients:[],disableCustomGradients:!0},t))};function ij(e){return t=>{const[n,r]=(0,tt.useState)([]);return(0,tt.useLayoutEffect)((()=>{const{options:n,isDebounced:o}=e,a=(0,at.debounce)((()=>{const o=Promise.resolve("function"==typeof n?n(t):n).then((n=>{if(o.canceled)return;const a=n.map(((t,n)=>({key:`${e.name}-${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(t)}))),i=new RegExp("(?:\\b|\\s|^)"+(0,at.escapeRegExp)(t),"i");r(function(e,t=[],n=10){const r=[];for(let o=0;oe.test((0,at.deburr)(t))))&&(r.push(a),r.length===n))break}return r}(i,a))}));return o}),o?250:0),i=a();return()=>{a.cancel(),i&&(i.canceled=!0)}}),[t]),[n]}}function sj({record:e,onChange:t,onReplace:n,completers:r,contentRef:o}){const a=qp(mv,500),i=Zk(sj),[s,l]=(0,tt.useState)(0),[c,u]=(0,tt.useState)([]),[d,p]=(0,tt.useState)(""),[m,h]=(0,tt.useState)(null),[f,g]=(0,tt.useState)(null),[b,y]=(0,tt.useState)(!1);function v(r){const{getOptionCompletion:o}=m||{};if(!r.isDisabled){if(o){const a=o(r.value,d),{action:i,value:s}=void 0===a.action||void 0===a.value?{action:"insert-at-caret",value:a}:a;if("replace"===i)return void n([s]);"insert-at-caret"===i&&function(n){const r=e.start,o=r-m.triggerPrefix.length-d.length,a=Ov({html:ei(n)});t(e_(e,a,o,r))}(s)}_()}}function _(){l(0),u([]),p(""),h(null),g(null)}let M;Uv(e)&&(M=jv(r_(e,0))),(0,tt.useEffect)((()=>{if(!M)return void _();const t=(0,at.deburr)(M),n=jv(r_(e,void 0,jv(e).length)),o=(0,at.find)(r,(({triggerPrefix:e,allowContext:r})=>{const o=t.lastIndexOf(e);if(-1===o)return!1;const a=t.slice(o+e.length);if(a.length>50)return!1;const i=0===c.length,s=1===a.split(/\s/).length,l=b&&a.split(/\s/).length<=3;return!(i&&!l&&!s)&&(!(r&&!r(t.slice(0,o),n))&&(!/^\s/.test(a)&&!/\s\s+$/.test(a)&&/[\u0000-\uFFFF]*$/.test(a)))}));if(!o)return void _();const a=(0,at.escapeRegExp)(o.triggerPrefix),i=t.slice(t.lastIndexOf(o.triggerPrefix)).match(new RegExp(`${a}([\0-￿]*)$`)),s=i&&i[1];h(o),g((()=>o!==m?function(e){const t=e.useItems?e.useItems:ij(e);return function({filterValue:e,instanceId:n,listBoxId:r,className:o,selectedIndex:a,onChangeOptions:i,onSelect:s,onReset:l,value:c,contentRef:u}){const[d]=t(e),p=S_({ref:u,value:c});return(0,tt.useLayoutEffect)((()=>{i(d)}),[d]),!d.length>0?null:(0,tt.createElement)(yh,{focusOnMount:!1,onClose:l,position:"top right",className:"components-autocomplete__popover",anchorRef:p},(0,tt.createElement)("div",{id:r,role:"listbox",className:"components-autocomplete__results"},(0,at.map)(d,((e,t)=>(0,tt.createElement)(wf,{key:e.key,id:`components-autocomplete-item-${n}-${e.key}`,role:"option","aria-selected":t===a,disabled:e.isDisabled,className:so()("components-autocomplete__result",o,{"is-selected":t===a}),onClick:()=>s(e)},e.label)))))}}(o):f)),p(s)}),[M]);const{key:k=""}=c[s]||{},{className:w}=m||{},E=!!m&&c.length>0,L=E?`components-autocomplete-listbox-${i}`:null;return{listBoxId:L,activeId:E?`components-autocomplete-item-${i}-${k}`:null,onKeyDown:function(e){if(y(e.keyCode===tm),m&&0!==c.length&&!e.defaultPrevented){switch(e.keyCode){case am:l((0===s?c.length:s)-1);break;case sm:l((s+1)%c.length);break;case rm:h(null),g(null),e.preventDefault();break;case nm:v(c[s]);break;case om:case im:return void _();default:return}e.preventDefault()}},popover:void 0!==e.start&&f&&(0,tt.createElement)(f,{className:w,filterValue:d,instanceId:i,listBoxId:L,selectedIndex:s,onChangeOptions:function(e){l(e.length===c.length?s:0),u(e),function(e){a&&(e.length?a(pn(nr("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):a(er("No results."),"assertive"))}(e)},onSelect:v,value:e,contentRef:o,reset:_})}}const lj={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=Cl((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:r}=e(nk),o=t();return{selectedBlockName:o?n(o):null,rootClientId:r().rootClientId}}),[]),[r,o,a]=vY(t,at.noop),i=(0,tt.useMemo)((()=>(e.trim()?VY(r,o,a,e):(0,at.orderBy)(r,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,o,a]);return[(0,tt.useMemo)((()=>i.map((e=>{const{title:t,icon:n,isDisabled:r}=e;return{key:`block-${e.id}`,value:e,label:(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(MB,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))),[i])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:r}=e;return{action:"replace",value:Ho(t,n,qo(r))}}},cj=[];function uj({completers:e=cj}){const{name:t}=rb();return(0,tt.useMemo)((()=>{let n=e;return t===Do()&&(n=n.concat([lj])),Yn("editor.Autocomplete.completers")&&(n===e&&(n=n.map(at.clone)),n=Fn("editor.Autocomplete.completers",n,t)),n}),[e,t])}function dj(e){return function(e){const t=(0,tt.useRef)(),n=(0,tt.useRef)(),{popover:r,listBoxId:o,activeId:a,onKeyDown:i}=sj({...e,contentRef:t});return n.current=i,{ref:Rm([t,C_((e=>{function t(e){n.current(e)}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[])]),children:r,"aria-autocomplete":o?"list":void 0,"aria-owns":o,"aria-activedescendant":a}}({...e,completers:uj(e)})}const pj={position:"bottom right",isAlternate:!0},mj=()=>(0,tt.createElement)(tt.Fragment,null,["bold","italic","link","text-color"].map((e=>(0,tt.createElement)(lh,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,tt.createElement)(lh,{name:"RichText.ToolbarControls"},(e=>0!==e.length&&(0,tt.createElement)(Yg,null,(t=>(0,tt.createElement)(Zg,{icon:OA,label:er("More"),toggleProps:t,controls:(0,at.orderBy)(e.map((([{props:e}])=>e)),"title"),popoverProps:pj})))))),hj=({inline:e,anchorRef:t})=>e?(0,tt.createElement)(yh,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,tt.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,tt.createElement)(eb,null,(0,tt.createElement)(mj,null)))):(0,tt.createElement)(lk,{group:"inline"},(0,tt.createElement)(mj,null));function fj(){const{didAutomaticChange:e,getSettings:t}=Cl(nk);return C_((n=>{function r(n){const{keyCode:r}=n;n.defaultPrevented||r!==lm&&r!==tm&&r!==rm||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}}),[])}function gj(e){return e.filter((({type:e})=>/^image\/(?:jpe?g|png|gif)$/.test(e))).map((e=>``)).join("")}function bj(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function yj(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function vj({allowedFormats:e,formattingControls:t,disableFormats:n}){return n?vj.EMPTY_ARRAY:e||t?e||(Hp("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),t.map((e=>`core/${e}`))):void 0}vj.EMPTY_ARRAY=[];function _j({value:e,pastedBlocks:t=[],onReplace:n,onSplit:r,onSplitMiddle:o,multilineTag:a}){if(!n||!r)return;const i=[],[s,l]=o_(e),c=t.length>0;let u=-1;const d=$v(s)&&!$v(l);c&&$v(s)||(i.push(r(u_({value:s,multilineTag:a}),!d)),u+=1),c?(i.push(...t),u+=t.length):o&&i.push(o()),(c||o)&&$v(l)||i.push(r(u_({value:l,multilineTag:a}),d));n(i,c?u:1,c?-1:0)}function Mj(e){const t=(0,tt.useRef)(e);return t.current=e,C_((e=>{function n(e){const{isSelected:n,disableFormats:r,onChange:o,value:a,formatTypes:i,tagName:s,onReplace:l,onSplit:c,onSplitMiddle:u,__unstableEmbedURLOnPaste:d,multilineTag:p,preserveWhiteSpace:m,pastePlainText:h}=t.current;if(!n)return void e.preventDefault();const{clipboardData:f}=e;let g="",b="";try{g=f.getData("text/plain"),b=f.getData("text/html")}catch(e){try{b=f.getData("Text")}catch(e){return}}if(e.preventDefault(),window.console.log("Received HTML:\n\n",b),window.console.log("Received plain text:\n\n",g),r)return void o(e_(a,g));const y=i.reduce(((e,{__unstablePasteRule:t})=>(t&&e===a&&(e=t(a,{html:b,plainText:g})),e)),a);if(y!==a)return void o(y);const v=[...$I(f)];if("true"===f.getData("rich-text")){const e=Ov({html:b,multilineTag:p,multilineWrapperTags:"li"===p?["ul","ol"]:void 0,preserveWhiteSpace:m});return bj(e,a.activeFormats),void o(e_(a,e))}if(h)return void o(e_(a,Ov({text:g})));if(v&&v.length&&!b){const e=ul({HTML:gj(v),mode:"BLOCKS",tagName:s,preserveWhiteSpace:m});return window.console.log("Received items:\n\n",v),void(l&&$v(a)?l(e):_j({value:a,pastedBlocks:e,onReplace:l,onSplit:c,onSplitMiddle:u,multilineTag:p}))}let _=l&&c?"AUTO":"INLINE";var M;"AUTO"===_&&$v(a)&&(M=g,ws(".*").test(M))&&(_="BLOCKS"),d&&$v(a)&&hq(g.trim())&&(_="BLOCKS");const k=ul({HTML:b,plainText:g,mode:_,tagName:s,preserveWhiteSpace:m});if("string"==typeof k){let e=Ov({html:k});bj(e,a.activeFormats),p&&(e=n_(e,/\n+/g,Cv)),o(e_(a,e))}else k.length>0&&(l&&$v(a)?l(k,k.length-1,-1):_j({value:a,pastedBlocks:k,onReplace:l,onSplit:c,onSplitMiddle:u,multilineTag:p}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}function kj(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=sd(nk),r=(0,tt.useRef)(e);return r.current=e,C_((e=>{function o(){const{value:e,onReplace:t}=r.current;if(!t)return;const{start:o,text:a}=e;if(" "!==a.slice(o-1,o))return;const i=a.slice(0,o).trim(),s=Ko(Go("from").filter((({type:e})=>"prefix"===e)),(({prefix:e})=>i===e));if(!s)return;const l=u_({value:r_(e,o,a.length)});t([s.transform(l)]),n()}function a(e){const{inputType:a,type:i}=e,{value:s,onChange:l,__unstableAllowPrefixTransformations:c,formatTypes:u}=r.current;if("insertText"!==a&&"compositionend"!==i)return;c&&o&&o();const d=u.reduce(((e,{__unstableInputRule:t})=>(t&&(e=t(e)),e)),s);d!==s&&(t(),l({...d,activeFormats:s.activeFormats}),n())}return e.addEventListener("input",a),e.addEventListener("compositionend",a),()=>{e.removeEventListener("input",a),e.removeEventListener("compositionend",a)}}),[])}function wj(e){const{__unstableMarkAutomaticChange:t}=sd(nk),n=(0,tt.useRef)(e);return n.current=e,C_((e=>{function r(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:r,value:o,onReplace:a,onSplit:i,onSplitMiddle:s,multilineTag:l,onChange:c,disableLineBreaks:u,onSplitAtEnd:d}=n.current;if(e.keyCode!==nm)return;e.preventDefault();const p={...o};p.formats=r(o);const m=a&&i;if(a){const e=Ko(Go("from").filter((({type:e})=>"enter"===e)),(e=>e.regExp.test(p.text)));e&&(a([e.transform({content:p.text})]),t())}if(l)e.shiftKey?u||c(e_(p,"\n")):m&&Kv(p)?_j({value:p,onReplace:a,onSplit:i,onSplitMiddle:s,multilineTag:l}):c(function(e,t=e.start,n=e.end){const r=e.text.slice(0,t).lastIndexOf(Cv),o=e.replacements[r];let a=[,];return o&&(a=[o]),e_(e,{formats:[,],replacements:a,text:Cv},t,n)}(p));else{const{text:t,start:n,end:r}=p,o=d&&n===r&&r===t.length;e.shiftKey||!m&&!o?u||c(e_(p,"\n")):!m&&o?d():m&&_j({value:p,onReplace:a,onSplit:i,onSplitMiddle:s,multilineTag:l})}}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function Ej(e){return e(Mv).getFormatTypes()}const Lj=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function Aj({formatTypes:e,onChange:t,onFocus:n,value:r,forwardedRef:o}){return e.map((e=>{const{name:a,edit:i}=e;if(!i)return null;const s=qv(r,a),l=void 0!==s,c=function({start:e,end:t,replacements:n,text:r}){if(e+1===t&&r[e]===Tv)return n[e]}(r),u=void 0!==c&&c.type===a;return(0,tt.createElement)(i,{key:a,isActive:l,activeAttributes:l&&s.attributes||{},isObjectActive:u,activeObjectAttributes:u&&c.attributes||{},value:r,onChange:t,onFocus:n,contentRef:o})}))}const Sj=(0,tt.forwardRef)((function e({children:t,tagName:n="div",value:r="",onChange:o,isSelected:a,multiline:i,inlineToolbar:s,wrapperClassName:l,autocompleters:c,onReplace:u,placeholder:d,allowedFormats:p,formattingControls:m,withoutInteractiveFormatting:h,onRemove:f,onMerge:g,onSplit:b,__unstableOnSplitAtEnd:y,__unstableOnSplitMiddle:v,identifier:_,preserveWhiteSpace:M,__unstablePastePlainText:k,__unstableEmbedURLOnPaste:w,__unstableDisableFormats:E,disableLineBreaks:L,unstableOnFocus:A,__unstableAllowPrefixTransformations:S,...C},T){const x=Zk(e);_=_||x,C=function(e){return(0,at.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(C);const z=(0,tt.useRef)(),{clientId:O}=rb(),{selectionStart:N,selectionEnd:D,isSelected:B,disabled:I}=Cl((e=>{const{getSelectionStart:t,getSelectionEnd:n,isMultiSelecting:r,hasMultiSelection:o}=e(nk),i=t(),s=n();let l;return void 0===a?l=i.clientId===O&&i.attributeKey===_:a&&(l=i.clientId===O),{selectionStart:l?i.offset:void 0,selectionEnd:l?s.offset:void 0,isSelected:l,disabled:r()||o()}})),{selectionChange:P}=sd(nk),R=yj(i),W=vj({allowedFormats:p,formattingControls:m,disableFormats:E}),Y=!W||W.length>0;let H=r,q=o;Array.isArray(r)&&(H=Fi.toHTML(r),q=e=>o(Fi.fromDOM(Av(document,e).childNodes)));const j=(0,tt.useCallback)(((e,t)=>{P(O,_,e,t)}),[O,_]),{formatTypes:F,prepareHandlers:V,valueHandlers:X,changeHandlers:U,dependencies:$}=function({clientId:e,identifier:t,withoutInteractiveFormatting:n,allowedFormats:r}){const o=Cl(Ej,[]),a=(0,tt.useMemo)((()=>o.filter((({name:e,tagName:t})=>!(r&&!r.includes(e)||n&&Lj.has(t))))),[o,r,Lj]),i=Cl((n=>a.reduce(((r,o)=>(o.__experimentalGetPropsForEditableTreePreparation&&(r[o.name]=o.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e})),r)),{})),[a,e,t]),s=sd(),l=[],c=[],u=[],d=[];return a.forEach((n=>{if(n.__experimentalCreatePrepareEditableTree){const r=i[n.name],o=n.__experimentalCreatePrepareEditableTree(r,{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?c.push(o):l.push(o);for(const e in r)d.push(r[e])}if(n.__experimentalCreateOnChangeEditableValue){let r={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(r=n.__experimentalGetPropsForEditableTreeChangeHandler(s,{richTextIdentifier:t,blockClientId:e})),u.push(n.__experimentalCreateOnChangeEditableValue({...i[n.name]||{},...r},{richTextIdentifier:t,blockClientId:e}))}})),{formatTypes:a,prepareHandlers:l,valueHandlers:c,changeHandlers:u,dependencies:d}}({clientId:O,identifier:_,withoutInteractiveFormatting:h,allowedFormats:W});function K(e){return F.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=Zv(e,t.name,0,e.text.length))})),e.formats}const{value:G,onChange:J,onFocus:Z,ref:Q}=function({value:e="",selectionStart:t,selectionEnd:n,placeholder:r,preserveWhiteSpace:o,onSelectionChange:a,onChange:i,__unstableMultilineTag:s,__unstableDisableFormats:l,__unstableIsSelected:c,__unstableDependencies:u,__unstableAfterParse:d,__unstableBeforeSerialize:p,__unstableAddInvisibleFormats:m}){const[,h]=(0,tt.useReducer)((()=>({}))),f=(0,tt.useRef)();function g(){const{ownerDocument:{defaultView:e}}=f.current,t=e.getSelection(),n=t.rangeCount>0?t.getRangeAt(0):null;return Ov({element:f.current,range:n,multilineTag:s,multilineWrapperTags:"li"===s?["ul","ol"]:void 0,__unstableIsEditableTree:!0,preserveWhiteSpace:o})}function b(e,{domOnly:t}={}){R_({value:e,current:f.current,multilineTag:s,multilineWrapperTags:"li"===s?["ul","ol"]:void 0,prepareEditableTree:m,__unstableDomOnly:t,placeholder:r})}const y=(0,tt.useRef)(e),v=(0,tt.useRef)();function _(){y.current=e,v.current=Ov({html:e,multilineTag:s,multilineWrapperTags:"li"===s?["ul","ol"]:void 0,preserveWhiteSpace:o}),l&&(v.current.formats=Array(e.length),v.current.replacements=Array(e.length)),v.current.formats=d(v.current),v.current.start=t,v.current.end=n}const M=(0,tt.useRef)(!1);function k(e){b(e),y.current=l?e.text:u_({value:{...e,formats:p(e)},multilineTag:s,preserveWhiteSpace:o}),v.current=e;const{start:t,end:n,formats:r,text:c}=e;a(t,n),i(y.current,{__unstableFormats:r,__unstableText:c}),h()}function w(){_(),b(v.current)}v.current?t===v.current.start&&n===v.current.end||(M.current=c,v.current={...v.current,start:t,end:n}):_();const E=(0,tt.useRef)(!1);(0,tt.useLayoutEffect)((()=>{E.current&&e!==y.current&&w()}),[e]),(0,tt.useLayoutEffect)((()=>{M.current&&(w(),M.current=!1)}),[M.current]);const L=Rm([f,(0,tt.useCallback)((e=>{e&&(e.style.whiteSpace="pre-wrap",e.style.minWidth="1px")}),[]),Y_({record:v}),H_({record:v,multilineTag:s,preserveWhiteSpace:o}),C_((e=>{function t(t){const{target:n}=t;if(n===e||n.textContent)return;const{ownerDocument:r}=n,{defaultView:o}=r,a=r.createRange(),i=o.getSelection();a.selectNode(n),i.removeAllRanges(),i.addRange(a)}return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[]),j_({record:v,applyRecord:b}),K_({createRecord:g,handleChange:k,multilineTag:s}),F_({multilineTag:s,createRecord:g,handleChange:k}),U_({record:v,applyRecord:b,createRecord:g,handleChange:k,isSelected:c,onSelectionChange:a}),C_((()=>{w(),E.current=!0}),[r,...u])]);return{value:v.current,onChange:k,onFocus:function(){f.current.focus(),b(v.current)},ref:L}}({value:H,onChange(e,{__unstableFormats:t,__unstableText:n}){q(e),Object.values(U).forEach((e=>{e(t,n)}))},selectionStart:N,selectionEnd:D,onSelectionChange:j,placeholder:d,__unstableIsSelected:B,__unstableMultilineTag:R,__unstableDisableFormats:E,preserveWhiteSpace:M,__unstableDependencies:[...$,n],__unstableAfterParse:function(e){return X.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:K,__unstableAddInvisibleFormats:function(e){return V.reduce(((t,n)=>n(t,e.text)),e.formats)}}),ee=dj({onReplace:u,completers:c,record:G,onChange:J});!function({value:e}){const t=e.activeFormats&&!!e.activeFormats.length,{isCaretWithinFormattedText:n}=Cl(nk),{enterFormattedText:r,exitFormattedText:o}=sd(nk);(0,tt.useEffect)((()=>{t?n()||r():n()&&o()}),[t])}({value:G}),function({html:e,value:t}){const n=(0,tt.useRef)(),r=t.activeFormats&&!!t.activeFormats.length,{__unstableMarkLastChangeAsPersistent:o}=sd(nk);(0,tt.useLayoutEffect)((()=>{if(n.current){if(n.current!==t.text){const e=window.setTimeout((()=>{o()}),1e3);return n.current=t.text,()=>{window.clearTimeout(e)}}o()}else n.current=t.text}),[e,r])}({html:H,value:G});const te=n,ne=(0,tt.createElement)(tt.Fragment,null,B&&t&&t({value:G,onChange:J,onFocus:Z}),B&&(0,tt.createElement)(Aj,{value:G,onChange:J,onFocus:Z,formatTypes:F,forwardedRef:z}),B&&Y&&(0,tt.createElement)(hj,{inline:s,anchorRef:z.current}),(0,tt.createElement)(te,ot({role:"textbox","aria-multiline":!0,"aria-label":d},C,ee,{ref:Rm([ee.ref,C.ref,Q,kj({value:G,onChange:J,__unstableAllowPrefixTransformations:S,formatTypes:F,onReplace:u}),C_((e=>{function t(e){(ym.primary(e,"z")||ym.primary(e,"y")||ym.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),fj(),Mj({isSelected:B,disableFormats:E,onChange:J,value:G,formatTypes:F,tagName:n,onReplace:u,onSplit:b,onSplitMiddle:v,__unstableEmbedURLOnPaste:w,multilineTag:R,preserveWhiteSpace:M,pastePlainText:k}),wj({removeEditorOnlyFormats:K,value:G,onReplace:u,onSplit:b,onSplitMiddle:v,multilineTag:R,onChange:J,disableLineBreaks:L,onSplitAtEnd:y}),z,T]),contentEditable:!I||void 0,suppressContentEditableWarning:!I,className:so()("block-editor-rich-text__editable",C.className,"rich-text"),onFocus:A,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===lm||t===tm)){const{start:n,end:r,text:o}=G,a=t===tm,i=G.activeFormats&&!!G.activeFormats.length;if(!Uv(G)||i||a&&0!==n||!a&&r!==o.length)return;g&&g(!a),f&&$v(G)&&a&&f(!a),e.preventDefault()}}})));if(!l)return ne;Hp("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"});const re=so()("block-editor-rich-text",l);return(0,tt.createElement)("div",{className:re},ne)}));Sj.Content=({value:e,tagName:t,multiline:n,...r})=>{Array.isArray(e)&&(e=Fi.toHTML(e));const o=yj(n);!e&&o&&(e=`<${o}>`);const a=(0,tt.createElement)(Ia,null,e);return t?(0,tt.createElement)(t,(0,at.omit)(r,["format"]),a):a},Sj.isEmpty=e=>!e||0===e.length;const Cj=Sj,Tj=(0,tt.forwardRef)(((e,t)=>(0,tt.createElement)(Cj,ot({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));Tj.Content=({value:e="",tagName:t="div",...n})=>(0,tt.createElement)(t,n,e);const xj=Tj,zj=(0,tt.forwardRef)((({__experimentalVersion:e,...t},n)=>{if(2===e)return(0,tt.createElement)(xj,ot({ref:n},t));const{className:r,onChange:o,...a}=t;return(0,tt.createElement)(vR.Z,ot({ref:n,className:so()("block-editor-plain-text",r),onChange:e=>o(e.target.value)},a))}));function Oj({character:e,type:t,onUse:n}){return rS(hm[t](e),(()=>(n(),!1)),{bindGlobal:!0}),null}function Nj({name:e,shortcutType:t,shortcutCharacter:n,...r}){let o,a="RichText.ToolbarControls";return e&&(a+=`.${e}`),t&&n&&(o=gm[t](n)),(0,tt.createElement)(sh,{name:a},(0,tt.createElement)(qg,ot({},r,{shortcut:o})))}class Dj extends tt.Component{constructor(){super(...arguments),this.onInput=this.onInput.bind(this)}onInput(e){e.inputType===this.props.inputType&&this.props.onInput()}componentDidMount(){document.addEventListener("input",this.onInput,!0)}componentWillUnmount(){document.removeEventListener("input",this.onInput,!0)}render(){return null}}function Bj({units:e,...t}){const n=Lk({availableUnits:JL("spacing.units")||["%","px","em","rem","vw"],units:e});return(0,tt.createElement)(UL,ot({units:n},t))}const Ij="none",Pj="custom",Rj="media",Wj="attachment",Yj=["noreferrer","noopener"],Hj=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,tt.createElement)(uo,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,tt.createElement)(uo,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),qj=({linkDestination:e,onChangeUrl:t,url:n,mediaType:r="image",mediaUrl:o,mediaLink:a,linkTarget:i,linkClass:s,rel:l})=>{const[c,u]=(0,tt.useState)(!1),d=(0,tt.useCallback)((()=>{u(!0)})),[p,m]=(0,tt.useState)(!1),[h,f]=(0,tt.useState)(null),g=(0,tt.useRef)(null),b=(0,tt.useCallback)((()=>{e!==Rj&&e!==Wj||f(""),m(!0)})),y=(0,tt.useCallback)((()=>{m(!1)})),v=(0,tt.useCallback)((()=>{f(null),y(),u(!1)})),_=e=>{let t=e;return void 0===e||(0,at.isEmpty)(t)||(0,at.isEmpty)(t)||((0,at.each)(Yj,(e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),(0,at.isEmpty)(t)&&(t=void 0)),t},M=(0,tt.useCallback)((()=>e=>{const t=g.current;t&&t.contains(e.target)||(u(!1),f(null),y())})),k=(0,tt.useCallback)((()=>e=>{if(h){var n;const e=(null===(n=E().find((e=>e.url===h)))||void 0===n?void 0:n.linkDestination)||Pj;t({href:h,linkDestination:e})}y(),f(null),e.preventDefault()})),w=(0,tt.useCallback)((()=>{t({linkDestination:Ij,href:""})})),E=()=>{const e=[{linkDestination:Rj,title:er("Media File"),url:"image"===r?o:void 0,icon:Hj}];return"image"===r&&a&&e.push({linkDestination:Wj,title:er("Attachment Page"),url:"image"===r?a:void 0,icon:(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,tt.createElement)(uo,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},L=(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(KN,{label:er("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;return n=t||l?_(l):void 0,{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===i}),(0,tt.createElement)(LA,{label:er("Link Rel"),value:_(l)||"",onChange:e=>{t({rel:e})}}),(0,tt.createElement)(LA,{label:er("Link CSS Class"),value:s||"",onChange:e=>{t({linkClass:e})}})),A=null!==h?h:n,S=((0,at.find)(E(),["linkDestination",e])||{}).title;return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(qg,{icon:dT,className:"components-toolbar__control",label:er(n?"Edit link":"Insert link"),"aria-expanded":c,onClick:d}),c&&(0,tt.createElement)(nj,{onFocusOutside:M(),onClose:v,renderSettings:()=>L,additionalControls:!A&&(0,tt.createElement)(Gg,null,(0,at.map)(E(),(e=>(0,tt.createElement)(zB,{key:e.linkDestination,icon:e.icon,onClick:()=>{f(null),(e=>{const n=E();let r;r=e?((0,at.find)(n,(t=>t.url===e))||{linkDestination:Pj}).linkDestination:Ij,t({linkDestination:r,href:e})})(e.url),y()}},e.title))))},(!n||p)&&(0,tt.createElement)(nj.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:A,onChangeInputValue:f,onSubmit:k(),autocompleteRef:g}),n&&!p&&(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(nj.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:b,urlLabel:S}),(0,tt.createElement)(wf,{icon:Ym,label:er("Remove link"),onClick:w}))))},jj=ZI((e=>({selectedBlockClientId:e(nk).getBlockSelectionStart()})))((({selectedBlockClientId:e})=>{const t=FT(e);return e?(0,tt.createElement)(wf,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current.focus()}},er("Skip to the selected block")):null})),Fj={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp://g,spaceRegExp:/ | /gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-/:-@[-`{-~","€-¿×÷"," -⯿","⸀-⹿","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:{type:"words"}};function Vj(e,t){return t.replace(e.HTMLRegExp,"\n")}function Xj(e,t){return t.replace(e.astralRegExp,"a")}function Uj(e,t){return t.replace(e.HTMLEntityRegExp,"")}function $j(e,t){return t.replace(e.connectorRegExp," ")}function Kj(e,t){return t.replace(e.removeRegExp,"")}function Gj(e,t){return t.replace(e.HTMLcommentRegExp,"")}function Jj(e,t){return e.shortcodesRegExp?t.replace(e.shortcodesRegExp,"\n"):t}function Zj(e,t){return t.replace(e.spaceRegExp," ")}function Qj(e,t){return t.replace(e.HTMLEntityRegExp,"a")}function eF(e,t,n){var r,o;return e=(0,at.flow)(Vj.bind(null,n),Gj.bind(null,n),Jj.bind(null,n),Xj.bind(null,n),Zj.bind(null,n),Qj.bind(null,n))(e),null!==(r=null===(o=(e+="\n").match(t))||void 0===o?void 0:o.length)&&void 0!==r?r:0}function tF(e,t,n){const r=function(e,t){var n,r;const o=(0,at.extend)({},Fj,t);return o.shortcodes=null!==(n=null===(r=o.l10n)||void 0===r?void 0:r.shortcodes)&&void 0!==n?n:[],o.shortcodes&&o.shortcodes.length&&(o.shortcodesRegExp=new RegExp("\\[\\/?(?:"+o.shortcodes.join("|")+")[^\\]]*?\\]","g")),o.type=e,"characters_excluding_spaces"!==o.type&&"characters_including_spaces"!==o.type&&(o.type="words"),o}(t,n);let o;switch(r.type){case"words":return o=r.wordsRegExp,function(e,t,n){var r,o;return e=(0,at.flow)(Vj.bind(null,n),Gj.bind(null,n),Jj.bind(null,n),Zj.bind(null,n),Uj.bind(null,n),$j.bind(null,n),Kj.bind(null,n))(e),null!==(r=null===(o=(e+="\n").match(t))||void 0===o?void 0:o.length)&&void 0!==r?r:0}(e,o,r);case"characters_including_spaces":return o=r.characters_including_spacesRegExp,eF(e,o,r);case"characters_excluding_spaces":return o=r.characters_excluding_spacesRegExp,eF(e,o,r);default:return 0}}const nF=ZI((e=>{const{getMultiSelectedBlocks:t}=e(nk);return{blocks:t()}}))((function({blocks:e}){const t=tF(fi(e),"words");return(0,tt.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,tt.createElement)(MB,{icon:CW,showColors:!0}),(0,tt.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,tt.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},pn(nr("%d block","%d blocks",e.length),e.length)),(0,tt.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},pn(nr("%d word","%d words",t),t))))}));function rF({blockName:e}){const{preferredStyle:t,onUpdatePreferredStyleVariations:n,styles:r}=Cl((t=>{var n,r;const o=t(nk).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==o||null===(n=o.value)||void 0===n?void 0:n[e],onUpdatePreferredStyleVariations:null!==(r=null==o?void 0:o.onChange)&&void 0!==r?r:null,styles:t(Gr).getBlockStyles(e)}}),[e]),o=(0,tt.useMemo)((()=>[{label:er("Not set"),value:""},...r.map((({label:e,name:t})=>({label:e,value:t})))]),[r]),a=(0,tt.useCallback)((t=>{n(e,t)}),[e,n]);return n&&(0,tt.createElement)(KS,{options:o,value:t||"",label:er("Default Style"),onChange:a})}function oF({choices:e=[],onHover:t=at.noop,onSelect:n,value:r}){return e.map((e=>{const o=r===e.value;return(0,tt.createElement)(zB,{key:e.value,role:"menuitemradio",icon:o&&kS,info:e.info,isSelected:o,shortcut:e.shortcut,className:"components-menu-items-choice",onClick:()=>{o||n(e.value)},onMouseEnter:()=>t(e.value),onMouseLeave:()=>t(null),"aria-label":e["aria-label"]},e.label)}))}const aF=(e,t)=>{if(!t||!e)return;const n=t.filter((({attributes:t})=>!(!t||!Object.keys(t).length)&&(0,at.isMatch)(e,t)));return 1===n.length?n[0]:void 0};const iF=function({blockClientId:e}){const[t,n]=(0,tt.useState)(),{updateBlockAttributes:r}=sd(nk),{variations:o,blockAttributes:a}=Cl((t=>{const{getBlockVariations:n}=t(Gr),{getBlockName:r,getBlockAttributes:o}=t(nk),a=e&&r(e);return{variations:a&&n(a,"transform"),blockAttributes:o(e)}}),[e]);if((0,tt.useEffect)((()=>{var e;n(null===(e=aF(a,o))||void 0===e?void 0:e.name)}),[a,o]),null==o||!o.length)return null;const i=o.map((({name:e,title:t,description:n})=>({value:e,label:t,info:n}))),s=t=>{r(e,{...o.find((({name:e})=>e===t)).attributes})},l="block-editor-block-variation-transforms";return(0,tt.createElement)(Zg,{className:l,label:er("Transform to variation"),text:er("Transform to variation"),popoverProps:{position:"bottom center",className:`${l}__popover`},icon:OA,toggleProps:{iconPosition:"right"}},(()=>(0,tt.createElement)("div",{className:`${l}__container`},(0,tt.createElement)(ON,null,(0,tt.createElement)(oF,{choices:i,value:t,onSelect:s})))))},sF=({clientId:e,blockName:t,hasBlockStyles:n,bubblesVirtually:r})=>{const o=ZB(e);return(0,tt.createElement)("div",{className:"block-editor-block-inspector"},(0,tt.createElement)(NP,o),(0,tt.createElement)(iF,{blockClientId:e}),n&&(0,tt.createElement)("div",null,(0,tt.createElement)(BA,{title:er("Styles")},(0,tt.createElement)(NW,{clientId:e}),Ro(t,"defaultStylePicker",!0)&&(0,tt.createElement)(rF,{blockName:t}))),(0,tt.createElement)(FA.Slot,{bubblesVirtually:r}),(0,tt.createElement)("div",null,(0,tt.createElement)(lF,{slotName:YA.slotName,bubblesVirtually:r})),(0,tt.createElement)(jj,{key:"back"}))},lF=({slotName:e,bubblesVirtually:t})=>{const n=th(e);return Boolean(n.fills&&n.fills.length)?(0,tt.createElement)(BA,{className:"block-editor-block-inspector__advanced",title:er("Advanced"),initialOpen:!1},(0,tt.createElement)(YA.Slot,{bubblesVirtually:t})):null},cF=({showNoBlockSelectedMessage:e=!0,bubblesVirtually:t=!0})=>{const{count:n,hasBlockStyles:r,selectedBlockName:o,selectedBlockClientId:a,blockType:i}=Cl((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:r}=e(nk),{getBlockStyles:o}=e(Gr),a=t(),i=a&&r(a),s=i&&Bo(i),l=i&&o(i);return{count:n(),selectedBlockClientId:a,selectedBlockName:i,blockType:s,hasBlockStyles:l&&l.length>0}}),[]);if(n>1)return(0,tt.createElement)("div",{className:"block-editor-block-inspector"},(0,tt.createElement)(nF,null),(0,tt.createElement)(FA.Slot,{bubblesVirtually:t}));const s=o===No();return i&&a&&!s?(0,tt.createElement)(sF,{clientId:a,blockName:i.name,hasBlockStyles:r,bubblesVirtually:t}):e?(0,tt.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},er("No block selected.")):null};const uF=function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:r,showMostUsedBlocks:o=!1,__experimentalInsertionIndex:a,onSelect:i=at.noop,shouldFocusBlock:s=!1}){const l=Cl((n=>{const{getBlockRootClientId:r}=n(nk);return e||r(t)||void 0}),[t,e]);return(0,tt.createElement)(tH,{onSelect:i,rootClientId:l,clientId:t,isAppender:n,showInserterHelpPanel:r,showMostUsedBlocks:o,__experimentalInsertionIndex:a,shouldFocusBlock:s})};function dF(){return null}dF.Register=function(){const{registerShortcut:e}=sd(AI);return(0,tt.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:er("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:er("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:er("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:er("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:er("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:er("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:er("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:er("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:er("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:er("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};const pF=dF,mF=new Set([am,im,sm,om,nm,tm]);function hF(){const e=Cl((e=>e(nk).isTyping())),{startTyping:t,stopTyping:n}=sd(nk);return Rm([function(){const e=Cl((e=>e(nk).isTyping())),{stopTyping:t}=sd(nk);return C_((n=>{if(!e)return;const{ownerDocument:r}=n;let o,a;function i(e){const{clientX:n,clientY:r}=e;o&&a&&(o!==n||a!==r)&&t(),o=n,a=r}return r.addEventListener("mousemove",i),()=>{r.removeEventListener("mousemove",i)}}),[e,t])}(),C_((r=>{const{ownerDocument:o}=r,{defaultView:a}=o;if(e){let e;function t(t){const{target:r}=t;e=a.setTimeout((()=>{DI(r)||n()}))}function i(e){const{keyCode:t}=e;t!==rm&&9!==t||n()}function s(){const e=a.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||n()}return r.addEventListener("focus",t),r.addEventListener("keydown",i),o.addEventListener("selectionchange",s),()=>{a.clearTimeout(e),r.removeEventListener("focus",t),r.removeEventListener("keydown",i),o.removeEventListener("selectionchange",s)}}function i(e){const{type:n,target:o}=e;DI(o)&&r.contains(o)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&mF.has(t)}(e))&&t()}return r.addEventListener("keypress",i),r.addEventListener("keydown",i),()=>{r.removeEventListener("keypress",i),r.removeEventListener("keydown",i)}}),[e,t,n])])}function fF(e){const t=e.getSelection();ds();const n=t.rangeCount?t.getRangeAt(0):null;return n?jp(n):null}window.navigator.userAgent.indexOf("Trident");const gF=new Set([am,sm,om,im]);function bF(){const e=Cl((e=>e(nk).hasSelectedBlock()));return C_((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:r}=n;let o,a,i;function s(){o||(o=r.requestAnimationFrame((()=>{p(),o=null})))}function l(e){a&&r.cancelAnimationFrame(a),a=r.requestAnimationFrame((()=>{c(e),a=null}))}function c({keyCode:e}){if(!m())return;const o=fF(r);if(!o)return;if(!i)return void(i=o);if(gF.has(e))return void(i=o);const a=o.top-i.top;if(0===a)return;const s=IB(t);if(!s)return;const l=s===n.body,c=l?r.scrollY:s.scrollTop,u=l?0:s.getBoundingClientRect().top,d=l?i.top/r.innerHeight:(i.top-u)/(r.innerHeight-u);if(0===c&&d<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=o);const p=l?r.innerHeight:s.clientHeight;i.top+i.height>u+p||i.top{r.removeEventListener("scroll",s,!0),r.removeEventListener("resize",s,!0),t.removeEventListener("keydown",l),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),r.cancelAnimationFrame(o),r.cancelAnimationFrame(a)}}),[e])}function yF(e,t){const n="start"===t?"firstChild":"lastChild",r="start"===t?"nextSibling":"previousSibling";for(;e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[r];)e=e[r];return e}function vF(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:r,getSelectedBlockClientId:o}=e(nk);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:r(),selectedBlockClientId:o()}}function _F(){const e=(0,tt.useRef)(),{isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:r,selectedBlockClientId:o}=Cl(vF,[]),a=FT(o),i=FT((0,at.first)(n)),s=FT((0,at.last)(n));return(0,tt.useEffect)((()=>{const{ownerDocument:l}=e.current,{defaultView:c}=l;if(!r||t){if(!o||t)return;const e=c.getSelection();if(e.rangeCount&&!e.isCollapsed){const t=a.current,{startContainer:n,endContainer:r}=e.getRangeAt(0);!t||t.contains(n)&&t.contains(r)||e.removeAllRanges()}return}const{length:u}=n;if(u<2)return;e.current.focus();const d=c.getSelection(),p=l.createRange(),m=yF(i.current,"start"),h=yF(s.current,"end");!function(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((e=>{t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}(e.current,!1),p.setStartBefore(m),p.setEndAfter(h),d.removeAllRanges(),d.addRange(p)}),[r,t,n,o]),e}function MF(e){const{tagName:t}=e;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function kF(e,t,n=!1){if(kR(e))return e.selectionStart===e.selectionEnd&&(t?0===e.selectionStart:e.value.length===e.selectionStart);if(!e.isContentEditable)return!0;const{ownerDocument:r}=e,{defaultView:o}=r;ds();const a=o.getSelection();if(!a||!a.rangeCount)return!1;const i=a.getRangeAt(0),s=i.cloneRange(),l=function(e){const{anchorNode:t,focusNode:n,anchorOffset:r,focusOffset:o}=e;ds(),ds();const a=t.compareDocumentPosition(n);return!(a&t.DOCUMENT_POSITION_PRECEDING)&&(!!(a&t.DOCUMENT_POSITION_FOLLOWING)||0!==a||r<=o)}(a),c=a.isCollapsed;c||s.collapse(!l);const u=jp(s),d=jp(i);if(!u||!d)return!1;const p=function(e){const t=Array.from(e.getClientRects());if(!t.length)return;const n=Math.min(...t.map((({top:e})=>e)));return Math.max(...t.map((({bottom:e})=>e)))-n}(i);if(!c&&p&&p>u.height&&l===t)return!1;const m=wR(e)?!t:t,h=e.getBoundingClientRect(),f=MR(r,m?h.left+1:h.right-1,t?h.top+1:h.bottom-1,e);if(!f)return!1;const g=jp(f);if(!g)return!1;const b=t?"top":"bottom",y=m?"left":"right",v=g[b]-d[b],_=g[y]-u[y],M=Math.abs(v)<=1,k=Math.abs(_)<=1;return n?M:M&&k}function wF(e,t){return kF(e,t,!0)}function EF(e,t){return kF(e,t)}function LF(e,t,n,r=!0){if(!e)return;if(!n||!e.isContentEditable)return void LR(e,t);e.focus();const o=n.height/2,a=e.getBoundingClientRect(),i=n.left,s=t?a.bottom-o:a.top+o,{ownerDocument:l}=e,{defaultView:c}=l,u=MR(l,i,s,e);if(!u||!e.contains(u.startContainer))return!r||u&&u.startContainer&&u.startContainer.contains(e)?void LR(e,t):(e.scrollIntoView(t),void LF(e,t,n,!1));ds();const d=c.getSelection();ds(),d.removeAllRanges(),d.addRange(u)}function AF(e,t,n,r){let o,a=zm.focusable.find(n);return t&&(a=(0,at.reverse)(a)),a=a.slice(a.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),(0,at.find)(a,(function(e){if(!zm.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(r){const t=e.getBoundingClientRect();if(t.left>=o.right||t.right<=o.left)return!1}return!0}))}function SF(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksStartClientId:t,getMultiSelectedBlocksEndClientId:n,getPreviousBlockClientId:r,getNextBlockClientId:o,getFirstMultiSelectedBlockClientId:a,getLastMultiSelectedBlockClientId:i,getSettings:s,hasMultiSelection:l}=Cl(nk),{multiSelect:c,selectBlock:u}=sd(nk);return C_((d=>{let p;function m(){p=null}function h(a){const i=e(),s=t(),l=n(),d=r(l||i),p=o(l||i),m=a?d:p;m&&(s===m?u(m):c(s||i,m))}function f(e){const t=a(),n=i(),r=e?t:n;r&&u(r)}function g(e,t){const n=AF(e,t,d);return!(n&&(r=e,o=n,r.closest(AR)===o.closest(AR)));var r,o}function b(t){const{keyCode:a,target:i}=t,c=a===am,u=a===om,m=c||u,b=u||a===im,y=c||a===sm,v=b||y,_=t.shiftKey,M=_||t.ctrlKey||t.altKey||t.metaKey,k=y?wF:EF,{ownerDocument:w}=d,{defaultView:E}=w;if(l()){if(v){(_?h:f)(m),t.preventDefault()}return}if(y?p||(p=fF(E)):p=null,t.defaultPrevented)return;if(!v)return;if(!function(e,t,n){if((t===am||t===sm)&&!n)return!0;const{tagName:r}=e;return"INPUT"!==r&&"TEXTAREA"!==r}(i,a,M))return;const L=wR(i)?!m:m,{keepCaretInsideBlock:A}=s(),S=e();if(_){const e=n(),a=r(e||S),s=o(e||S);(m&&a||!m&&s)&&g(i,m)&&k(i,m)&&(h(m),t.preventDefault())}else if(y&&wF(i,m)&&!A){const e=AF(i,m,d,!0);e&&(LF(e,m,p),t.preventDefault())}else if(b&&E.getSelection().isCollapsed&&EF(i,L)&&!A){LR(AF(i,L,d),m),t.preventDefault()}}return d.addEventListener("mousedown",m),d.addEventListener("keydown",b),()=>{d.removeEventListener("mousedown",m),d.removeEventListener("keydown",b)}}),[])}function CF(e,t,n){let r=t;do{if(e===r)return!0;r=r[n]}while(r);return!1}function TF(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=Cl(nk),{multiSelect:r}=sd(nk),o=function(){const{getAllShortcutKeyCombinations:e}=Cl(AI);return function(t,n){return e(t).some((({modifier:e,character:t})=>ym[e](n,t)))}}();return C_((a=>{function i(a){if(!o("core/block-editor/select-all",a))return;if(!function(e){if(kR(e))return 0===e.selectionStart&&e.value.length===e.selectionEnd;if(!e.isContentEditable)return!0;const{ownerDocument:t}=e,{defaultView:n}=t;ds();const r=n.getSelection();ds();const o=r.rangeCount?r.getRangeAt(0):null;if(!o)return!0;const{startContainer:a,endContainer:i,startOffset:s,endOffset:l}=o;if(a===e&&i===e&&0===s&&l===e.childNodes.length)return!0;e.lastChild,ds();const c=i.nodeType===i.TEXT_NODE?i.data.length:i.childNodes.length;return CF(a,e,"firstChild")&&CF(i,e,"lastChild")&&0===s&&l===c}(a.target))return;const i=t(),[s]=i,l=n(s);let c=e(l);i.length===c.length&&(c=e(n(l)));const u=(0,at.first)(c),d=(0,at.last)(c);u!==d&&(r(u,d),a.preventDefault())}return a.addEventListener("keydown",i),()=>{a.removeEventListener("keydown",i)}}),[])}function xF(){const[e,t,n]=function(){const e=(0,tt.useRef)(),t=(0,tt.useRef)(),n=(0,tt.useRef)(),r=(0,tt.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:a}=Cl(nk),{setNavigationMode:i}=sd(nk),s=Cl((e=>e(nk).isNavigationMode()),[])?void 0:"0",l=(0,tt.useRef)();function c(t){if(l.current)l.current=null;else if(o())e.current.focus();else if(a())r.current.focus();else{i(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";zm.tabbable[n](t.target).focus()}}const u=(0,tt.createElement)("div",{ref:t,tabIndex:s,onFocus:c}),d=(0,tt.createElement)("div",{ref:n,tabIndex:s,onFocus:c}),p=C_((s=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===rm&&!o())return e.preventDefault(),void i(!0);if(9!==e.keyCode)return;const r=e.shiftKey,c=r?"findPrevious":"findNext";if(!o()&&!a())return void(e.target===s&&i(!0));if(MF(e.target)&&MF(zm.tabbable[c](e.target)))return;const u=r?t:n;l.current=!0,u.current.focus({preventScroll:!0})}function u(e){r.current=e.target}function d(r){var o;if(9!==r.keyCode)return;if("region"===(null===(o=r.target)||void 0===o?void 0:o.getAttribute("role")))return;if(e.current===r.target)return;const a=r.shiftKey?"findPrevious":"findNext",i=zm.tabbable[a](r.target);i!==t.current&&i!==n.current||(r.preventDefault(),i.focus({preventScroll:!0}))}return s.ownerDocument.defaultView.addEventListener("keydown",d),s.addEventListener("keydown",c),s.addEventListener("focusout",u),()=>{s.ownerDocument.defaultView.removeEventListener("keydown",d),s.removeEventListener("keydown",c),s.removeEventListener("focusout",u)}}),[]);return[u,Rm([e,p]),d]}(),r=Cl((e=>e(nk).hasMultiSelection()),[]);return[e,Rm([t,_F(),TF(),SF(),C_((e=>{if(e.tabIndex=-1,r)return e.setAttribute("aria-label",er("Multiple selected blocks")),()=>{e.removeAttribute("aria-label")}}),[r])]),n]}const zF=(0,tt.forwardRef)((function({children:e,...t},n){const[r,o,a]=xF();return(0,tt.createElement)(tt.Fragment,null,r,(0,tt.createElement)("div",ot({},t,{ref:Rm([o,n]),className:so()(t.className,"block-editor-writing-flow")}),e),a)})),OF=(0,at.overEvery)([DI,zm.tabbable.isTabbableIndex]);const NF=(0,tt.createContext)({});function DF(e,t=""){var n;const r=(0,tt.useContext)(NF),{name:o}=rb();t=t||o;const a=Boolean(null===(n=r[t])||void 0===n?void 0:n.has(e)),i=(0,tt.useMemo)((()=>function(e,t,n){const r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(n),r}(r,t,e)),[r,t,e]);return[a,(0,tt.useCallback)((({children:e})=>(0,tt.createElement)(NF.Provider,{value:i},e)),[i])]}var BF=n(3692),IF=n.n(BF);const PF=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function RF(e,t){t=t||{};let n=1,r=1;function o(e){const t=e.match(/\n/g);t&&(n+=t.length);const o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function a(){const e={line:n,column:r};return function(t){return t.position=new i(e),m(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;const s=[];function l(o){const a=new Error(t.source+":"+n+":"+r+": "+o);if(a.reason=o,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a;s.push(a)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){let t;const n=[];for(m(),h(n);e.length&&"}"!==e.charAt(0)&&(t=E()||L());)!1!==t&&(n.push(t),h(n));return n}function p(t){const n=t.exec(e);if(!n)return;const r=n[0];return o(r),e=e.slice(r.length),n}function m(){p(/^\s*/)}function h(e){let t;for(e=e||[];t=f();)!1!==t&&e.push(t);return e}function f(){const t=a();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return l("End of comment missing");const i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}function g(){const e=p(/^([^{]+)/);if(e)return WF(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function b(){const e=a();let t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=WF(t[0]),!p(/^:\s*/))return l("property missing ':'");const n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(PF,""),value:n?WF(n[0]).replace(PF,""):""});return p(/^[;\s]*/),r}function y(){const e=[];if(!c())return l("missing '{'");let t;for(h(e);t=b();)!1!==t&&(e.push(t),h(e));return u()?e:l("missing '}'")}function v(){let e;const t=[],n=a();for(;e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:y()})}const _=w("import"),M=w("charset"),k=w("namespace");function w(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=a(),r=p(t);if(!r)return;const o={type:e};return o[e]=r[1].trim(),n(o)}}function E(){if("@"===e[0])return function(){const e=a();let t=p(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=p(/^([-\w]+)\s*/),!t)return l("@keyframes missing name");const r=t[1];if(!c())return l("@keyframes missing '{'");let o,i=h();for(;o=v();)i.push(o),i=i.concat(h());return u()?e({type:"keyframes",name:r,vendor:n,keyframes:i}):l("@keyframes missing '}'")}()||function(){const e=a(),t=p(/^@media *([^{]+)/);if(!t)return;const n=WF(t[1]);if(!c())return l("@media missing '{'");const r=h().concat(d());return u()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}()||function(){const e=a(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:WF(t[1]),media:WF(t[2])})}()||function(){const e=a(),t=p(/^@supports *([^{]+)/);if(!t)return;const n=WF(t[1]);if(!c())return l("@supports missing '{'");const r=h().concat(d());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}()||_()||M()||k()||function(){const e=a(),t=p(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=WF(t[1]),r=WF(t[2]);if(!c())return l("@document missing '{'");const o=h().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):l("@document missing '}'")}()||function(){const e=a();if(!p(/^@page */))return;const t=g()||[];if(!c())return l("@page missing '{'");let n,r=h();for(;n=b();)r.push(n),r=r.concat(h());return u()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}()||function(){const e=a();if(!p(/^@host\s*/))return;if(!c())return l("@host missing '{'");const t=h().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}()||function(){const e=a();if(!p(/^@font-face\s*/))return;if(!c())return l("@font-face missing '{'");let t,n=h();for(;t=b();)n.push(t),n=n.concat(h());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}()}function L(){const e=a(),t=g();return t?(h(),e({type:"rule",selectors:t,declarations:y()})):l("selector missing")}return YF(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}())}function WF(e){return e?e.replace(/^\s+|\s+$/g,""):""}function YF(e,t){const n=e&&"string"==typeof e.type,r=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){YF(e,r)})):n&&"object"==typeof n&&YF(n,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var HF=n(5717),qF=n.n(HF);const jF=FF;function FF(e){this.options=e||{}}FF.prototype.emit=function(e){return e},FF.prototype.visit=function(e){return this[e.type](e)},FF.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let r=0,o=e.length;rt=>{if("declaration"===t.type){const a=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const r=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};GF(e)&&r.push(e)}return r}(t.value).map((o=e,e=>({...e,newUrl:"url("+e.before+e.quote+JF(e.value,o)+e.quote+e.after+")"})));return{...t,value:(n=t.value,r=a,r.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,r,o;return t},QF=/^(body|html|:root).*$/,eV=(e,t=[])=>n=>{const r=n=>t.includes(n.trim())?n:n.match(QF)?n.replace(/^(body|html|:root)/,e):e+" "+n;return"rule"===n.type?{...n,selectors:n.selectors.map(r)}:n},tV=(e,t="")=>(0,at.map)(e,(({css:e,baseURL:n,__experimentalNoWrapper:r=!1})=>{const o=[];return t&&!r&&o.push(eV(t)),n&&o.push(ZF(n)),o.length?KF(e,lS(o)):e})),nV={insertUsage:{},isPublishSidebarEnabled:!0},rV={...ab,richEditingEnabled:!0,codeEditingEnabled:!0,enableCustomFields:!1,supportsLayout:!0};function oV(e){return e&&"object"==typeof e&&"raw"in e?e.raw:e}const aV=st()({postId:function(e=null,t){switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":return t.post.id}return e},postType:function(e=null,t){switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":return t.post.type}return e},preferences:function(e=nV,t){switch(t.type){case"ENABLE_PUBLISH_SIDEBAR":return{...e,isPublishSidebarEnabled:!0};case"DISABLE_PUBLISH_SIDEBAR":return{...e,isPublishSidebarEnabled:!1}}return e},saving:function(e={},t){switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},postLock:function(e={isLocked:!1},t){switch(t.type){case"UPDATE_POST_LOCK":return t.lock}return e},template:function(e={isValid:!0},t){switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},postSavingLock:function(e={},t){switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":return(0,at.omit)(e,t.lockName)}return e},isReady:function(e=!1,t){switch(t.type){case"SETUP_EDITOR_STATE":return!0;case"TEAR_DOWN_EDITOR":return!1}return e},editorSettings:function(e=rV,t){switch(t.type){case"UPDATE_EDITOR_SETTINGS":return{...e,...t.settings}}return e},postAutosavingLock:function(e={},t){switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":return(0,at.omit)(e,t.lockName)}return e}});var iV=n(381),sV=n.n(iV);n(5177),n(5341);const lV="WP",cV=/^[+-][0-1][0-9](:?[0-9][0-9])?$/;let uV={l10n:{locale:"en",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],meridiem:{am:"am",pm:"pm",AM:"AM",PM:"PM"},relative:{future:"%s from now",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}},formats:{time:"g: i a",date:"F j, Y",datetime:"F j, Y g: i a",datetimeAbbreviated:"M j, Y g: i a"},timezone:{offset:"0",string:"",abbr:""}};function dV(){return uV}function pV(){sV().tz.add(sV().tz.pack({name:lV,abbrs:[lV],untils:[null],offsets:[60*-uV.timezone.offset||0]}))}const mV={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S(e){const t=e.format("D");return e.format("Do").replace(t,"")},w:"d",z:e=>(parseInt(e.format("DDD"),10)-1).toString(),W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:e=>e.daysInMonth(),L:e=>e.isLeapYear()?"1":"0",o:"GGGG",Y:"YYYY",y:"YY",a:"a",A:"A",B(e){const t=sV()(e).utcOffset(60),n=parseInt(t.format("s"),10),r=parseInt(t.format("m"),10),o=parseInt(t.format("H"),10);return parseInt(((n+60*r+3600*o)/86.4).toString(),10)},g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSSSSS",v:"SSS",e:"zz",I:e=>e.isDST()?"1":"0",O:"ZZ",P:"Z",T:"z",Z(e){const t=e.format("Z"),n="-"===t[0]?-1:1,r=t.substring(1).split(":").map((e=>parseInt(e,10)));return n*(60*r[0]+r[1])*60},c:"YYYY-MM-DDTHH:mm:ssZ",r:"ddd, D MMM YYYY HH:mm:ss ZZ",U:"X"};function hV(e,t=new Date){let n,r;const o=[],a=sV()(t);for(n=0;n()=>e(yd).hasUndo())),OV=At((e=>()=>e(yd).hasRedo()));function NV(e){return"auto-draft"===RV(e).status}function DV(e){const t=jV(e);return"blocks"in t||"content"in t}const BV=At((e=>t=>{const n=WV(t),r=YV(t);return!!e(yd).hasEditsForEntityRecord("postType",n,r)})),IV=At((e=>t=>{const n=e(yd).__experimentalGetDirtyEntityRecords(),{type:r,id:o}=RV(t);return(0,at.some)(n,(e=>"postType"!==e.kind||e.name!==r||e.key!==o))}));function PV(e){return!BV(e)&&NV(e)}const RV=At((e=>t=>{const n=YV(t),r=WV(t),o=e(yd).getRawEntityRecord("postType",r,n);return o||TV}));function WV(e){return e.postType}function YV(e){return e.postId}function HV(e){return(0,at.get)(RV(e),["_links","version-history",0,"count"],0)}function qV(e){return(0,at.get)(RV(e),["_links","predecessor-version",0,"id"],null)}const jV=At((e=>t=>{const n=WV(t),r=YV(t);return e(yd).getEntityRecordEdits("postType",n,r)||TV})),FV=At((e=>()=>(Hp("`wp.data.select( 'core/editor' ).getReferenceByDistinctEdits`",{since:"5.4",alternative:"`wp.data.select( 'core' ).getReferenceByDistinctEdits`"}),e(yd).getReferenceByDistinctEdits())));function VV(e,t){switch(t){case"type":return WV(e);case"id":return YV(e);default:const n=RV(e);if(!n.hasOwnProperty(t))break;return oV(n[t])}}function XV(e,t){switch(t){case"content":return fX(e)}const n=jV(e);return n.hasOwnProperty(t)?_V.has(t)?((e,t)=>{const n=jV(e);return n.hasOwnProperty(t)?{...VV(e,t),...n[t]}:VV(e,t)})(e,t):n[t]:VV(e,t)}const UV=At((e=>(t,n)=>{if(!(0,at.includes)(LV,n)&&"preview_link"!==n)return;const r=WV(t),o=YV(t),a=(0,at.get)(e(yd).getCurrentUser(),["id"]),i=e(yd).getAutosave(r,o,a);return i?oV(i[n]):void 0}));function $V(e){if("private"===XV(e,"status"))return"private";return XV(e,"password")?"password":"public"}function KV(e){return"pending"===RV(e).status}function GV(e,t){const n=t||RV(e);return-1!==["publish","private"].indexOf(n.status)||"future"===n.status&&!gV(new Date(Number(bV(n.date))-6e4))}function JV(e){return"future"===RV(e).status&&!GV(e)}function ZV(e){const t=RV(e);return BV(e)||-1===["publish","private","future"].indexOf(t.status)}function QV(e){return!iX(e)&&(!!XV(e,"title")||!!XV(e,"excerpt")||!eX(e)||"native"===vb.OS)}function eX(e){const t=TX(e);if(t.length){if(t.length>1)return!1;const e=t[0].name;if(e!==Do()&&e!==Oo())return!1}return!fX(e)}const tX=At((e=>t=>{if(!QV(t))return!1;if(wX(t))return!1;const n=WV(t),r=YV(t),o=e(yd).hasFetchedAutosaves(n,r),a=(0,at.get)(e(yd).getCurrentUser(),["id"]),i=e(yd).getAutosave(n,r,a);return!!o&&(!i||(!!DV(t)||["title","excerpt"].some((e=>oV(i[e])!==XV(t,e)))))})),nX=At((e=>t=>{Hp("`wp.data.select( 'core/editor' ).getAutosave()`",{since:"5.3",alternative:"`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`"});const n=WV(t),r=YV(t),o=(0,at.get)(e(yd).getCurrentUser(),["id"]),a=e(yd).getAutosave(n,r,o);return(0,at.mapValues)((0,at.pick)(a,LV),oV)})),rX=At((e=>t=>{Hp("`wp.data.select( 'core/editor' ).hasAutosave()`",{since:"5.3",alternative:"`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`"});const n=WV(t),r=YV(t),o=(0,at.get)(e(yd).getCurrentUser(),["id"]);return!!e(yd).getAutosave(n,r,o)}));function oX(e){const t=XV(e,"date");return gV(new Date(Number(bV(t))-6e4))}function aX(e){const t=XV(e,"date"),n=XV(e,"modified"),r=RV(e).status;return("draft"===r||"auto-draft"===r||"pending"===r)&&(t===n||null===t)}const iX=At((e=>t=>{const n=WV(t),r=YV(t);return e(yd).isSavingEntityRecord("postType",n,r)})),sX=At((e=>t=>{const n=e(yd).__experimentalGetEntitiesBeingSaved(),{type:r,id:o}=RV(t);return(0,at.some)(n,(e=>"postType"!==e.kind||e.name!==r||e.key!==o))})),lX=At((e=>t=>{const n=WV(t),r=YV(t);return!e(yd).getLastEntitySaveError("postType",n,r)})),cX=At((e=>t=>{const n=WV(t),r=YV(t);return!!e(yd).getLastEntitySaveError("postType",n,r)}));function uX(e){return!!iX(e)&&!!(0,at.get)(e.saving,["options","isAutosave"])}function dX(e){return!!iX(e)&&!!e.saving.options.isPreview}function pX(e){if(e.saving.pending||iX(e))return;let t=UV(e,"preview_link");t||(t=XV(e,"link"),t&&(t=Il(t,{preview:!0})));const n=XV(e,"featured_media");return t&&n?Il(t,{_thumbnail_id:n}):t}function mX(e){const t=TX(e);if(t.length>2)return null;let n;if(1===t.length&&(n=t[0].name,"core/embed"===n)){var r;const e=null===(r=t[0].attributes)||void 0===r?void 0:r.providerNameSlug;["youtube","vimeo"].includes(e)?n="core/video":["spotify","soundcloud"].includes(e)&&(n="core/audio")}switch(2===t.length&&"core/paragraph"===t[1].name&&(n=t[0].name),n){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}}function hX(e){Hp("`core/editor` getBlocksForSerialization selector",{since:"5.3",alternative:"getEditorBlocks",hint:"Blocks serialization pre-processing occurs at save time"});const t=e.editor.present.blocks.value;return 1===t.length&&yo(t[0])?[]:t}const fX=At((e=>t=>{const n=YV(t),r=WV(t),o=e(yd).getEditedEntityRecord("postType",r,n);if(o){if("function"==typeof o.content)return o.content(o);if(o.blocks)return hi(o.blocks);if(o.content)return o.content}return""}));function gX(e){return iX(e)&&!GV(e)&&"publish"===XV(e,"status")}function bX(e){const t=XV(e,"permalink_template");return EV.test(t)}function yX(e){const t=_X(e);if(!t)return null;const{prefix:n,postName:r,suffix:o}=t;return bX(e)?n+r+o:n}function vX(e){return XV(e,"slug")||function(e){return e?(0,at.trim)((0,at.deburr)(e).replace(/[\s\./]+/g,"-").replace(/[^\p{L}\p{N}_-]+/gu,"").toLowerCase(),"-"):""}(XV(e,"title"))||YV(e)}function _X(e){const t=XV(e,"permalink_template");if(!t)return null;const n=XV(e,"slug")||XV(e,"generated_slug"),[r,o]=t.split(EV);return{prefix:r,postName:n,suffix:o}}function MX(e){return e.postLock.isLocked}function kX(e){return Object.keys(e.postSavingLock).length>0}function wX(e){return Object.keys(e.postAutosavingLock).length>0}function EX(e){return e.postLock.isTakeover}function LX(e){return e.postLock.user}function AX(e){return e.postLock.activePostLock}function SX(e){return(0,at.has)(RV(e),["_links","wp:action-unfiltered-html"])}function CX(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:nV.isPublishSidebarEnabled}function TX(e){return XV(e,"blocks")||xV}function xX(e){var t;return Hp("select('core/editor').getEditorSelectionStart",{since:"10.0",plugin:"Gutenberg",alternative:"select('core/editor').getEditorSelection"}),null===(t=XV(e,"selection"))||void 0===t?void 0:t.selectionStart}function zX(e){var t;return Hp("select('core/editor').getEditorSelectionStart",{since:"10.0",plugin:"Gutenberg",alternative:"select('core/editor').getEditorSelection"}),null===(t=XV(e,"selection"))||void 0===t?void 0:t.selectionEnd}function OX(e){return XV(e,"selection")}function NX(e){return e.isReady}function DX(e){return e.editorSettings}function BX(){return Hp("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function IX(){return Hp("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function PX(e){return At((t=>(n,...r)=>(Hp("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`"}),t(nk)[e](...r))))}const RX=PX("getBlockName"),WX=PX("isBlockValid"),YX=PX("getBlockAttributes"),HX=PX("getBlock"),qX=PX("getBlocks"),jX=PX("__unstableGetBlockWithoutInnerBlocks"),FX=PX("getClientIdsOfDescendants"),VX=PX("getClientIdsWithDescendants"),XX=PX("getGlobalBlockCount"),UX=PX("getBlocksByClientId"),$X=PX("getBlockCount"),KX=PX("getBlockSelectionStart"),GX=PX("getBlockSelectionEnd"),JX=PX("getSelectedBlockCount"),ZX=PX("hasSelectedBlock"),QX=PX("getSelectedBlockClientId"),eU=PX("getSelectedBlock"),tU=PX("getBlockRootClientId"),nU=PX("getBlockHierarchyRootClientId"),rU=PX("getAdjacentBlockClientId"),oU=PX("getPreviousBlockClientId"),aU=PX("getNextBlockClientId"),iU=PX("getSelectedBlocksInitialCaretPosition"),sU=PX("getMultiSelectedBlockClientIds"),lU=PX("getMultiSelectedBlocks"),cU=PX("getFirstMultiSelectedBlockClientId"),uU=PX("getLastMultiSelectedBlockClientId"),dU=PX("isFirstMultiSelectedBlock"),pU=PX("isBlockMultiSelected"),mU=PX("isAncestorMultiSelected"),hU=PX("getMultiSelectedBlocksStartClientId"),fU=PX("getMultiSelectedBlocksEndClientId"),gU=PX("getBlockOrder"),bU=PX("getBlockIndex"),yU=PX("isBlockSelected"),vU=PX("hasSelectedInnerBlock"),_U=PX("isBlockWithinSelection"),MU=PX("hasMultiSelection"),kU=PX("isMultiSelecting"),wU=PX("isSelectionEnabled"),EU=PX("getBlockMode"),LU=PX("isTyping"),AU=PX("isCaretWithinFormattedText"),SU=PX("getBlockInsertionPoint"),CU=PX("isBlockInsertionPointVisible"),TU=PX("isValidTemplate"),xU=PX("getTemplate"),zU=PX("getTemplateLock"),OU=PX("canInsertBlockType"),NU=PX("getInserterItems"),DU=PX("hasInserterItems"),BU=PX("getBlockListSettings");function IU(e){var t;return null===(t=DX(e))||void 0===t?void 0:t.defaultTemplateTypes}const PU=gr((e=>{var t;const n=(null===(t=DX(e))||void 0===t?void 0:t.defaultTemplatePartAreas)||[];return null==n?void 0:n.map((e=>{return{...e,icon:(t=e.icon,"header"===t?AV:"footer"===t?SV:"sidebar"===t?CV:vH)};var t}))}),(e=>{var t;return[null===(t=DX(e))||void 0===t?void 0:t.defaultTemplatePartAreas]})),RU=gr(((e,t)=>(0,at.find)(IU(e),{slug:t})||{}),((e,t)=>[IU(e),t]));function WU(e,t){var n;if(!t)return{};const{excerpt:r,slug:o,title:a,area:i}=t,{title:s,description:l}=RU(e,o),c=(0,at.isString)(a)?a:null==a?void 0:a.rendered;return{title:c&&c!==o?c:s||o,description:((0,at.isString)(r)?r:null==r?void 0:r.raw)||l,icon:(null===(n=PU(e).find((e=>i===e.area)))||void 0===n?void 0:n.icon)||vH}}const YU=At((e=>t=>{var n;const r=WV(t),o=e(yd).getPostType(r);return null==o||null===(n=o.labels)||void 0===n?void 0:n.singular_name}));function*HU(e,t,n){let r;r=(0,at.has)(t,["content"])?t.content:e.content.raw;let o=ts(r);"auto-draft"===e.status&&n&&(o=pl(o,n)),yield jU(e),yield{type:"SETUP_EDITOR",post:e,edits:t,template:n},yield u$(o,{__unstableShouldCreateUndoLevel:!1}),yield $U(e),t&&Object.keys(t).some((n=>t[n]!==((0,at.has)(e,[n,"raw"])?e[n].raw:e[n])))&&(yield KU(t))}function qU(){return{type:"TEAR_DOWN_EDITOR"}}function jU(e){return{type:"RESET_POST",post:e}}function*FU(e){Hp("resetAutosave action (`core/editor` store)",{since:"5.3",alternative:"receiveAutosaves action (`core` store)"});const t=yield zt.select(MV,"getCurrentPostId");return yield zt.dispatch(yd.name,"receiveAutosaves",t,e),{type:"__INERT__"}}function VU(e={}){return{type:"REQUEST_POST_UPDATE_START",options:e}}function XU(e={}){return{type:"REQUEST_POST_UPDATE_FINISH",options:e}}function UU(){return Hp("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function $U(e){return{type:"SETUP_EDITOR_STATE",post:e}}function*KU(e,t){const{id:n,type:r}=yield zt.select(MV,"getCurrentPost");yield zt.dispatch(yd.name,"editEntityRecord","postType",r,n,e,t)}function*GU(e={}){if(!(yield zt.select(MV,"isEditedPostSaveable")))return;let t={content:yield zt.select(MV,"getEditedPostContent")};e.isAutosave||(yield zt.dispatch(MV,"editPost",t,{undoIgnore:!0})),yield VU(e);const n=yield zt.select(MV,"getCurrentPost");t={id:n.id,...yield zt.select(yd.name,"getEntityRecordNonTransientEdits","postType",n.type,n.id),...t},yield zt.dispatch(yd.name,"saveEntityRecord","postType",n.type,t,e),yield XU(e);const r=yield zt.select(yd.name,"getLastEntitySaveError","postType",n.type,n.id);if(r){const e=function(e){const{post:t,edits:n,error:r}=e;if(r&&"rest_autosave_no_changes"===r.code)return[];const o=["publish","private","future"],a=-1!==o.indexOf(t.status),i={publish:er("Publishing failed."),private:er("Publishing failed."),future:er("Scheduling failed.")};let s=a||-1===o.indexOf(n.status)?er("Updating failed."):i[n.status];return r.message&&!/<\/?[^>]*>/.test(r.message)&&(s=[s,r.message].join(" ")),[s,{id:kV}]}({post:n,edits:t,error:r});e.length&&(yield zt.dispatch(UI,"createErrorNotice",...e))}else{const t=yield zt.select(MV,"getCurrentPost"),r=function(e){const{previousPost:t,post:n,postType:r}=e;if((0,at.get)(e.options,["isAutosave"]))return[];const o=["publish","private","future"],a=(0,at.includes)(o,t.status),i=(0,at.includes)(o,n.status);let s,l=(0,at.get)(r,["viewable"],!1);if(a||i?a&&!i?(s=r.labels.item_reverted_to_draft,l=!1):s=!a&&i?{publish:r.labels.item_published,private:r.labels.item_published_privately,future:r.labels.item_scheduled}[n.status]:r.labels.item_updated:s=null,s){const e=[];return l&&e.push({label:r.labels.view_item,url:n.link}),[s,{id:kV,type:"snackbar",actions:e}]}return[]}({previousPost:n,post:t,postType:yield zt.resolveSelect(yd.name,"getPostType",t.type),options:e});r.length&&(yield zt.dispatch(UI,"createSuccessNotice",...r)),e.isAutosave||(yield zt.dispatch(nk.name,"__unstableMarkLastChangeAsPersistent"))}}function*JU(){const e=yield zt.select(MV,"getCurrentPost"),t=yield zt.select(MV,"getCurrentPostType"),n=yield zt.resolveSelect(yd.name,"getPostType",t),r=yield ec({path:`/wp/v2/${n.rest_base}/${e.id}?context=edit&_timestamp=${Date.now()}`});yield zt.dispatch(MV,"resetPost",r)}function*ZU(){const e=yield zt.select(MV,"getCurrentPostType"),t=yield zt.resolveSelect(yd.name,"getPostType",e);yield zt.dispatch(UI,"removeNotice",wV);try{const e=yield zt.select(MV,"getCurrentPost");yield ec({path:`/wp/v2/${t.rest_base}/${e.id}`,method:"DELETE"}),yield zt.dispatch(MV,"savePost")}catch(e){yield zt.dispatch(UI,"createErrorNotice",...(n={error:e},[n.error.message&&"unknown_error"!==n.error.code?n.error.message:er("Trashing failed"),{id:wV}]))}var n}function*QU({local:e=!1,...t}={}){if(e){const e=yield zt.select(MV,"getCurrentPost"),t=yield zt.select(MV,"isEditedPostNew"),n=yield zt.select(MV,"getEditedPostAttribute","title"),r=yield zt.select(MV,"getEditedPostAttribute","content"),o=yield zt.select(MV,"getEditedPostAttribute","excerpt");yield{type:"LOCAL_AUTOSAVE_SET",postId:e.id,isPostNew:t,title:n,content:r,excerpt:o}}else yield zt.dispatch(MV,"savePost",{isAutosave:!0,...t})}function*e$(){yield zt.dispatch(yd.name,"redo")}function*t$(){yield zt.dispatch(yd.name,"undo")}function n$(){return{type:"CREATE_UNDO_LEVEL"}}function r$(e){return{type:"UPDATE_POST_LOCK",lock:e}}function o$(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function a$(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function i$(e){return{type:"LOCK_POST_SAVING",lockName:e}}function s$(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function l$(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function c$(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}function*u$(e,t={}){const{__unstableShouldCreateUndoLevel:n,selection:r}=t,o={blocks:e,selection:r};if(!1!==n){const{id:e,type:t}=yield zt.select(MV,"getCurrentPost");if((yield zt.select(yd.name,"getEditedEntityRecord","postType",t,e)).blocks===o.blocks)return yield zt.dispatch(yd.name,"__unstableCreateUndoLevel","postType",t,e);o.content=({blocks:e=[]})=>hi(e)}yield*KU(o)}function d$(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}const p$=e=>function*(...t){Hp("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`"}),yield zt.dispatch(nk.name,e,...t)},m$=p$("resetBlocks"),h$=p$("receiveBlocks"),f$=p$("updateBlock"),g$=p$("updateBlockAttributes"),b$=p$("selectBlock"),y$=p$("startMultiSelect"),v$=p$("stopMultiSelect"),_$=p$("multiSelect"),M$=p$("clearSelectedBlock"),k$=p$("toggleSelection"),w$=p$("replaceBlocks"),E$=p$("replaceBlock"),L$=p$("moveBlocksDown"),A$=p$("moveBlocksUp"),S$=p$("moveBlockToPosition"),C$=p$("insertBlock"),T$=p$("insertBlocks"),x$=p$("showInsertionPoint"),z$=p$("hideInsertionPoint"),O$=p$("setTemplateValidity"),N$=p$("synchronizeTemplate"),D$=p$("mergeBlocks"),B$=p$("removeBlocks"),I$=p$("removeBlock"),P$=p$("toggleBlockMode"),R$=p$("startTyping"),W$=p$("stopTyping"),Y$=p$("enterFormattedText"),H$=p$("exitFormattedText"),q$=p$("insertDefaultBlock"),j$=p$("updateBlockListSettings");function F$(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}const V$={LOCAL_AUTOSAVE_SET({postId:e,isPostNew:t,title:n,content:r,excerpt:o}){!function(e,t,n,r,o){window.sessionStorage.setItem(F$(e,t),JSON.stringify({post_title:n,content:r,excerpt:o}))}(e,t,n,r,o)}},X$={reducer:aV,selectors:M,actions:k,controls:{...nc,...V$}},U$=Jt(MV,{...X$,persist:["preferences"]});rn(MV,{...X$,persist:["preferences"]});function $$(e){const t=(0,at.mapValues)((0,at.pickBy)(e.attributes,{source:"meta"}),"meta");return(0,at.isEmpty)(t)||(e.edit=(e=>ni((t=>({attributes:n,setAttributes:r,...o})=>{const a=Cl((e=>e(U$).getCurrentPostType()),[]),[i,s]=pd("postType",a,"meta"),l=(0,tt.useMemo)((()=>({...n,...(0,at.mapValues)(e,(e=>i[e]))})),[n,i]);return(0,tt.createElement)(t,ot({attributes:l,setAttributes:t=>{const n=(0,at.mapKeys)((0,at.pickBy)(t,((t,n)=>e[n])),((t,n)=>e[n]));(0,at.isEmpty)(n)||s(n),r(t)}},o))}),"withMetaAttributeSource"))(t)(e.edit)),e}function K$(e){const t=e.avatar_urls&&e.avatar_urls[24]?(0,tt.createElement)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,tt.createElement)("span",{className:"editor-autocompleters__no-avatar"});return(0,tt.createElement)(tt.Fragment,null,t,(0,tt.createElement)("span",{className:"editor-autocompleters__user-name"},e.name),(0,tt.createElement)("span",{className:"editor-autocompleters__user-slug"},e.slug))}In("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",$$),tn(Gr).getBlockTypes().map((({name:e})=>tn(Gr).getBlockType(e))).forEach($$);const G$={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){const t=Cl((t=>{const{getUsers:n}=t(yd);return n({context:"view",search:encodeURIComponent(e)})}),[e]);return[(0,tt.useMemo)((()=>t?t.map((e=>({key:`user-${e.slug}`,value:e,label:K$(e)}))):[]),[t])]},getOptionCompletion:e=>`@${e.slug}`};In("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(e=[]){return e.push((0,at.clone)(G$)),e}));const J$=function({notices:e,onRemove:t=at.noop,className:n,children:r}){const o=e=>()=>t(e);return n=so()("components-notice-list",n),(0,tt.createElement)("div",{className:n},r,[...e].reverse().map((e=>(0,tt.createElement)(RT,ot({},(0,at.omit)(e,["content"]),{key:e.id,onRemove:o(e.id)}),e.content))))};const Z$=lS([ZI((e=>({isValid:e(nk).isValidTemplate()}))),eP((e=>{const{setTemplateValidity:t,synchronizeTemplate:n}=e(nk);return{resetTemplateValidity:()=>t(!0),synchronizeTemplate:n}}))])((function({isValid:e,...t}){return e?null:(0,tt.createElement)(RT,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:er("Keep it as is"),onClick:t.resetTemplateValidity},{label:er("Reset the template"),onClick:()=>{window.confirm(er("Resetting the template may result in loss of content, do you want to continue?"))&&t.synchronizeTemplate()}}]},er("The content of your post doesn’t match the template assigned to your post type."))}));const Q$=lS([ZI((e=>({notices:e(UI).getNotices()}))),eP((e=>({onRemove:e(UI).removeNotice})))])((function({notices:e,onRemove:t}){const n=(0,at.filter)(e,{isDismissible:!0,type:"default"}),r=(0,at.filter)(e,{isDismissible:!1,type:"default"});return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(J$,{notices:r,className:"components-editor-notices__pinned"}),(0,tt.createElement)(J$,{notices:n,className:"components-editor-notices__dismissible",onRemove:t},(0,tt.createElement)(Z$,null)))}));function eK({text:e,children:t}){const n=zI(e);return(0,tt.createElement)(wf,{variant:"secondary",ref:n},t)}class tK extends tt.Component{constructor(){super(...arguments),this.reboot=this.reboot.bind(this),this.getContent=this.getContent.bind(this),this.state={error:null}}componentDidCatch(e){this.setState({error:e})}reboot(){this.props.onError()}getContent(){try{return tn(U$).getEditedPostContent()}catch(e){}}render(){const{error:e}=this.state;return e?(0,tt.createElement)(cR,{className:"editor-error-boundary",actions:[(0,tt.createElement)(wf,{key:"recovery",onClick:this.reboot,variant:"secondary"},er("Attempt Recovery")),(0,tt.createElement)(eK,{key:"copy-post",text:this.getContent},er("Copy Post Text")),(0,tt.createElement)(eK,{key:"copy-error",text:e.stack},er("Copy Error"))]},er("The editor has encountered an unexpected error.")):this.props.children}}const nK=tK,rK=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));function oK(){const e=Cl((e=>e(U$).getEditedPostAttribute("content"))),t=tr("words","Word count type. Do not translate!");return(0,tt.createElement)("span",{className:"word-count"},tF(e,t))}const aK=({children:e,isValid:t,level:n,href:r,onSelect:o})=>(0,tt.createElement)("li",{className:so()("document-outline__item",`is-${n.toLowerCase()}`,{"is-invalid":!t})},(0,tt.createElement)("a",{href:r,className:"document-outline__button",onClick:o},(0,tt.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,tt.createElement)("strong",{className:"document-outline__level"},n),(0,tt.createElement)("span",{className:"document-outline__item-content"},e))),iK=(0,tt.createElement)("em",null,er("(Empty heading)")),sK=[(0,tt.createElement)("br",{key:"incorrect-break"}),(0,tt.createElement)("em",{key:"incorrect-message"},er("(Incorrect heading level)"))],lK=[(0,tt.createElement)("br",{key:"incorrect-break-h1"}),(0,tt.createElement)("em",{key:"incorrect-message-h1"},er("(Your theme may already use a H1 for the post title)"))],cK=[(0,tt.createElement)("br",{key:"incorrect-break-multiple-h1"}),(0,tt.createElement)("em",{key:"incorrect-message-multiple-h1"},er("(Multiple H1 headings are not recommended)"))],uK=(e=[])=>(0,at.flatMap)(e,((e={})=>"core/heading"===e.name?{...e,level:e.attributes.level,isEmpty:dK(e)}:uK(e.innerBlocks))),dK=e=>!e.attributes.content||0===e.attributes.content.length,pK=lS(ZI((e=>{const{getBlocks:t}=e(nk),{getEditedPostAttribute:n}=e(U$),{getPostType:r}=e(yd),o=r(n("type"));return{title:n("title"),blocks:t(),isTitleSupported:(0,at.get)(o,["supports","title"],!1)}})))((({blocks:e=[],title:t,onSelect:n,isTitleSupported:r,hasOutlineItemsDisabled:o})=>{const a=uK(e);if(a.length<1)return null;let i=1;const s=document.querySelector(".editor-post-title__input"),l=r&&t&&s,c=(0,at.countBy)(a,"level")[1]>1;return(0,tt.createElement)("div",{className:"document-outline"},(0,tt.createElement)("ul",null,l&&(0,tt.createElement)(aK,{level:er("Title"),isValid:!0,onSelect:n,href:`#${s.id}`,isDisabled:o},t),a.map(((e,t)=>{const r=e.level>i+1,a=!(e.isEmpty||r||!e.level||1===e.level&&(c||l));return i=e.level,(0,tt.createElement)(aK,{key:t,level:`H${e.level}`,isValid:a,isDisabled:o,href:`#block-${e.clientId}`,onSelect:n},e.isEmpty?iK:jv(Ov({html:e.attributes.content})),r&&sK,1===e.level&&c&&cK,l&&1===e.level&&!c&&lK)}))))}));function mK(){return tF(Cl((e=>e(U$).getEditedPostAttribute("content"))),"characters_including_spaces")}const hK=function({hasOutlineItemsDisabled:e,onRequestClose:t}){const{headingCount:n,paragraphCount:r,numberOfBlocks:o}=Cl((e=>{const{getGlobalBlockCount:t}=e(nk);return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]);return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":er("Document Statistics"),tabIndex:"0"},(0,tt.createElement)("ul",{role:"list",className:"table-of-contents__counts"},(0,tt.createElement)("li",{className:"table-of-contents__count"},er("Characters"),(0,tt.createElement)("span",{className:"table-of-contents__number"},(0,tt.createElement)(mK,null))),(0,tt.createElement)("li",{className:"table-of-contents__count"},er("Words"),(0,tt.createElement)(oK,null)),(0,tt.createElement)("li",{className:"table-of-contents__count"},er("Headings"),(0,tt.createElement)("span",{className:"table-of-contents__number"},n)),(0,tt.createElement)("li",{className:"table-of-contents__count"},er("Paragraphs"),(0,tt.createElement)("span",{className:"table-of-contents__number"},r)),(0,tt.createElement)("li",{className:"table-of-contents__count"},er("Blocks"),(0,tt.createElement)("span",{className:"table-of-contents__number"},o)))),n>0&&(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)("hr",null),(0,tt.createElement)("h2",{className:"table-of-contents__title"},er("Document Outline")),(0,tt.createElement)(pK,{onSelect:t,hasOutlineItemsDisabled:e})))};const fK=(0,tt.forwardRef)((function({hasOutlineItemsDisabled:e,repositionDropdown:t,...n},r){const o=Cl((e=>!!e(nk).getBlockCount()),[]);return(0,tt.createElement)(Vg,{position:t?"middle right right":"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:e,onToggle:t})=>(0,tt.createElement)(wf,ot({},n,{ref:r,onClick:o?t:void 0,icon:rK,"aria-expanded":e,"aria-haspopup":"true",label:er("Details"),tooltipPosition:"bottom","aria-disabled":!o})),renderContent:({onClose:t})=>(0,tt.createElement)(hK,{onRequestClose:t,hasOutlineItemsDisabled:e})})})),{wp:gK}=window,bK=[],yK=()=>gK.media.view.MediaFrame.Select.extend({featuredImageToolbar(e){this.createSelectToolbar(e,{text:gK.media.view.l10n.setFeaturedImage,state:this.options.state})},editState(){const e=this.state("featured-image").get("selection"),t=new gK.media.view.EditImage({model:e.single(),controller:this}).render();this.content.set(t),t.loadEditor()},createStates:function(){this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new gK.media.controller.FeaturedImage,new gK.media.controller.EditImage({model:this.options.editImage})])}}),vK=()=>gK.media.view.MediaFrame.Post.extend({galleryToolbar(){const e=this.state().get("editing");this.toolbar.set(new gK.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:e?gK.media.view.l10n.updateGallery:gK.media.view.l10n.insertGallery,priority:80,requires:{library:!0},click(){const e=this.controller,t=e.state();e.close(),t.trigger("update",t.get("library")),e.setState(e.options.state),e.reset()}}}}))},editState(){const e=this.state("gallery").get("selection"),t=new gK.media.view.EditImage({model:e.single(),controller:this}).render();this.content.set(t),t.loadEditor()},createStates:function(){this.on("toolbar:create:main-gallery",this.galleryToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new gK.media.controller.Library({id:"gallery",title:gK.media.view.l10n.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:gK.media.query((0,at.defaults)({type:"image"},this.options.library))}),new gK.media.controller.EditImage({model:this.options.editImage}),new gK.media.controller.GalleryEdit({library:this.options.selection,editing:this.options.editing,menu:"gallery",displaySettings:!1,multiple:!0}),new gK.media.controller.GalleryAdd])}}),_K=e=>(0,at.pick)(e,["sizes","mime","type","subtype","id","url","alt","link","caption"]),MK=e=>gK.media.query({order:"ASC",orderby:"post__in",post__in:e,posts_per_page:-1,query:!0,type:"image"});class kK extends tt.Component{constructor({allowedTypes:e,gallery:t=!1,unstableFeaturedImageFlow:n=!1,modalClass:r,multiple:o=!1,title:a=er("Select or Upload Media")}){if(super(...arguments),this.openModal=this.openModal.bind(this),this.onOpen=this.onOpen.bind(this),this.onSelect=this.onSelect.bind(this),this.onUpdate=this.onUpdate.bind(this),this.onClose=this.onClose.bind(this),t)this.buildAndSetGalleryFrame();else{const t={title:a,multiple:o};e&&(t.library={type:e}),this.frame=gK.media(t)}r&&this.frame.$el.addClass(r),n&&this.buildAndSetFeatureImageFrame(),this.initializeListeners()}initializeListeners(){this.frame.on("select",this.onSelect),this.frame.on("update",this.onUpdate),this.frame.on("open",this.onOpen),this.frame.on("close",this.onClose)}buildAndSetGalleryFrame(){const{addToGallery:e=!1,allowedTypes:t,multiple:n=!1,value:r=bK}=this.props;if(r===this.lastGalleryValue)return;let o;this.lastGalleryValue=r,this.frame&&this.frame.remove(),o=e?"gallery-library":r&&r.length?"gallery-edit":"gallery",this.GalleryDetailsMediaFrame||(this.GalleryDetailsMediaFrame=vK());const a=MK(r),i=new gK.media.model.Selection(a.models,{props:a.props.toJSON(),multiple:n});this.frame=new this.GalleryDetailsMediaFrame({mimeType:t,state:o,multiple:n,selection:i,editing:!(!r||!r.length)}),gK.media.frame=this.frame,this.initializeListeners()}buildAndSetFeatureImageFrame(){const e=yK(),t=MK(this.props.value),n=new gK.media.model.Selection(t.models,{props:t.props.toJSON()});this.frame=new e({mimeType:this.props.allowedTypes,state:"featured-image",multiple:this.props.multiple,selection:n,editing:!!this.props.value}),gK.media.frame=this.frame}componentWillUnmount(){this.frame.remove()}onUpdate(e){const{onSelect:t,multiple:n=!1}=this.props,r=this.frame.state(),o=e||r.get("selection");o&&o.models.length&&t(n?o.models.map((e=>_K(e.toJSON()))):_K(o.models[0].toJSON()))}onSelect(){const{onSelect:e,multiple:t=!1}=this.props,n=this.frame.state().get("selection").toJSON();e(t?n:n[0])}onOpen(){var e;this.updateCollection();if(Array.isArray(this.props.value)?!(null===(e=this.props.value)||void 0===e||!e.length):!!this.props.value){if(!this.props.gallery){const e=this.frame.state().get("selection");(0,at.castArray)(this.props.value).forEach((t=>{e.add(gK.media.attachment(t))}))}MK((0,at.castArray)(this.props.value)).more()}}onClose(){const{onClose:e}=this.props;e&&e()}updateCollection(){const e=this.frame.content.get();if(e&&e.collection){const t=e.collection;t.toArray().forEach((e=>e.trigger("destroy",e))),t.mirroring._hasMore=!0,t.more()}}openModal(){this.props.gallery&&this.buildAndSetGalleryFrame(),this.frame.open()}render(){return this.props.render({open:this.openModal})}}const wK=kK;const EK=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M18.3 4H9.9v-.1l-.9.2c-2.3.4-4 2.4-4 4.8s1.7 4.4 4 4.8l.7.1V20h1.5V5.5h2.9V20h1.5V5.5h2.7V4z"})),LK={className:!1},AK={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},fontSize:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]},style:{type:"object"}},SK=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customFontSize)return e;const t={};return(e.customTextColor||e.customBackgroundColor)&&(t.color={}),e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customFontSize&&(t.typography={fontSize:e.customFontSize}),{...(0,at.omit)(e,["customTextColor","customBackgroundColor","customFontSize"]),style:t}},CK=[{supports:LK,attributes:{...(0,at.omit)(AK,["style"]),customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:SK,save({attributes:e}){const{align:t,content:n,dropCap:r,backgroundColor:o,textColor:a,customBackgroundColor:i,customTextColor:s,fontSize:l,customFontSize:c,direction:u}=e,d=mC("color",a),p=mC("background-color",o),m=Xz(l),h=so()({"has-text-color":a||s,"has-background":o||i,"has-drop-cap":r,[`has-text-align-${t}`]:t,[m]:m,[d]:d,[p]:p}),f={backgroundColor:p?void 0:i,color:d?void 0:s,fontSize:m?void 0:c};return(0,tt.createElement)(Cj.Content,{tagName:"p",style:f,className:h||void 0,value:n,dir:u})}},{supports:LK,attributes:{...(0,at.omit)(AK,["style"]),customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:SK,save({attributes:e}){const{align:t,content:n,dropCap:r,backgroundColor:o,textColor:a,customBackgroundColor:i,customTextColor:s,fontSize:l,customFontSize:c,direction:u}=e,d=mC("color",a),p=mC("background-color",o),m=Xz(l),h=so()({"has-text-color":a||s,"has-background":o||i,"has-drop-cap":r,[m]:m,[d]:d,[p]:p}),f={backgroundColor:p?void 0:i,color:d?void 0:s,fontSize:m?void 0:c,textAlign:t};return(0,tt.createElement)(Cj.Content,{tagName:"p",style:f,className:h||void 0,value:n,dir:u})}},{supports:LK,attributes:{...(0,at.omit)(AK,["style"]),customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate:SK,save({attributes:e}){const{width:t,align:n,content:r,dropCap:o,backgroundColor:a,textColor:i,customBackgroundColor:s,customTextColor:l,fontSize:c,customFontSize:u}=e,d=mC("color",i),p=mC("background-color",a),m=c&&`is-${c}-text`,h=so()({[`align${t}`]:t,"has-background":a||s,"has-drop-cap":o,[m]:m,[d]:d,[p]:p}),f={backgroundColor:p?void 0:s,color:d?void 0:l,fontSize:m?void 0:u,textAlign:n};return(0,tt.createElement)(Cj.Content,{tagName:"p",style:f,className:h||void 0,value:r})}},{supports:LK,attributes:(0,at.omit)({...AK,fontSize:{type:"number"}},["style"]),save({attributes:e}){const{width:t,align:n,content:r,dropCap:o,backgroundColor:a,textColor:i,fontSize:s}=e,l=so()({[`align${t}`]:t,"has-background":a,"has-drop-cap":o}),c={backgroundColor:a,color:i,fontSize:s,textAlign:n};return(0,tt.createElement)("p",{style:c,className:l||void 0},r)},migrate:e=>SK((0,at.omit)({...e,customFontSize:(0,at.isFinite)(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0}))},{supports:LK,attributes:{...AK,content:{type:"string",source:"html",default:""}},save:({attributes:e})=>(0,tt.createElement)(Ia,null,e.content),migrate:e=>e}],TK=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,tt.createElement)(uo,{d:"M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z"}));function xK({direction:e,setDirection:t}){return rr()&&(0,tt.createElement)(ck,{controls:[{icon:TK,title:tr("Left to right","editor button"),isActive:"ltr"===e,onClick(){t("ltr"===e?void 0:"ltr")}}]})}const zK=function({attributes:e,mergeBlocks:t,onReplace:n,onRemove:r,setAttributes:o,clientId:a}){const{align:i,content:s,direction:l,dropCap:c,placeholder:u}=e,d=JL("typography.dropCap"),p=VR({className:so()({"has-drop-cap":c,[`has-text-align-${i}`]:i}),style:{direction:l}});return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,{group:"block"},(0,tt.createElement)(gD,{value:i,onChange:e=>o({align:e})}),(0,tt.createElement)(xK,{direction:l,setDirection:e=>o({direction:e})})),d&&(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("Text settings")},(0,tt.createElement)(KN,{label:er("Drop cap"),checked:!!c,onChange:()=>o({dropCap:!c}),help:er(c?"Showing large initial letter.":"Toggle to show a large initial letter.")}))),(0,tt.createElement)(Cj,ot({identifier:"content",tagName:"p"},p,{value:s,onChange:e=>o({content:e}),onSplit:(t,n)=>{let r;(n||t)&&(r={...e,content:t});const o=Ho("core/paragraph",r);return n&&(o.clientId=a),o},onMerge:t,onReplace:n,onRemove:r,"aria-label":er(s?"Paragraph block":"Empty block; start writing or type forward slash to choose a block"),"data-empty":!s,placeholder:u||er("Type / to choose a block"),__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0})))};const{name:OK}={apiVersion:2,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the building block of all narrative.",keywords:["text"],textdomain:"default",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:"",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0},__experimentalSelector:"p",__unstablePasteTextInline:!0},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},NK={from:[{type:"raw",priority:20,selector:"p",schema:({phrasingContentSchema:e,isPaste:t})=>({p:{children:e,attributes:t?[]:["style","id"]}}),transform(e){const t=Ki(OK,e.outerHTML),{textAlign:n}=e.style||{};return"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),Ho(OK,t)}}]},DK={apiVersion:2,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the building block of all narrative.",keywords:["text"],textdomain:"default",attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:"",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0},__experimentalSelector:"p",__unstablePasteTextInline:!0},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},{name:BK}=DK,IK={icon:EK,example:{attributes:{content:er("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."),style:{typography:{fontSize:28}},dropCap:!0}},__experimentalLabel(e,{context:t}){if("accessibility"===t){const{content:t}=e;return(0,at.isEmpty)(t)?er("Empty"):t}},transforms:NK,deprecated:CK,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:zK,save:function({attributes:e}){const{align:t,content:n,dropCap:r,direction:o}=e,a=so()({"has-drop-cap":r,[`has-text-align-${t}`]:t});return(0,tt.createElement)("p",VR.save({className:a,dir:o}),(0,tt.createElement)(Cj.Content,{value:n}))}},PK=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),RK={align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},WK=[{attributes:RK,save({attributes:e}){const{url:t,alt:n,caption:r,align:o,href:a,width:i,height:s,id:l}=e,c=so()({[`align${o}`]:o,"is-resized":i||s}),u=(0,tt.createElement)("img",{src:t,alt:n,className:l?`wp-image-${l}`:null,width:i,height:s});return(0,tt.createElement)("figure",{className:c},a?(0,tt.createElement)("a",{href:a},u):u,!Cj.isEmpty(r)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",value:r}))}},{attributes:RK,save({attributes:e}){const{url:t,alt:n,caption:r,align:o,href:a,width:i,height:s,id:l}=e,c=(0,tt.createElement)("img",{src:t,alt:n,className:l?`wp-image-${l}`:null,width:i,height:s});return(0,tt.createElement)("figure",{className:o?`align${o}`:null},a?(0,tt.createElement)("a",{href:a},c):c,!Cj.isEmpty(r)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",value:r}))}},{attributes:RK,save({attributes:e}){const{url:t,alt:n,caption:r,align:o,href:a,width:i,height:s}=e,l=i||s?{width:i,height:s}:{},c=(0,tt.createElement)("img",ot({src:t,alt:n},l));let u={};return i?u={width:i}:"left"!==o&&"right"!==o||(u={maxWidth:"50%"}),(0,tt.createElement)("figure",{className:o?`align${o}`:null,style:u},a?(0,tt.createElement)("a",{href:a},c):c,!Cj.isEmpty(r)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",value:r}))}}],YK=ni((e=>{function t(t,r){const[o,a]=(0,tt.useState)([]),i=(0,tt.useMemo)((()=>{const e=e=>{const t=e.id?e:{...e,id:ao()};a((e=>[...e,t]))};return{createNotice:e,createErrorNotice:t=>{e({status:"error",content:t})},removeNotice:e=>{a((t=>t.filter((t=>t.id!==e))))},removeAllNotices:()=>{a([])}}}),[]),s={...t,noticeList:o,noticeOperations:i,noticeUI:o.length>0&&(0,tt.createElement)(J$,{className:"components-with-notices-ui",notices:o,onRemove:i.removeNotice})};return n?(0,tt.createElement)(e,ot({},s,{ref:r})):(0,tt.createElement)(e,s)}let n;const{render:r}=e;return"function"==typeof r?(n=!0,(0,tt.forwardRef)(t)):t})),HK=Ok("box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:",Lw.radiusBlockUi,";border:",Lw.borderWidth," solid ",Gk.ui.border,";",""),qK=Ok("border-color:var( --wp-admin-theme-color );box-shadow:0 0 0 calc( ",Lw.borderWidthFocus," - ",Lw.borderWidth," ) var( --wp-admin-theme-color );outline:2px solid transparent;",""),jK={huge:"1440px",wide:"1280px","x-large":"1080px",large:"960px",medium:"782px",small:"600px",mobile:"480px","zoomed-in":"280px"},FK=Ok("font-family:",yA("default.fontFamily"),";padding:6px 8px;",HK,";font-size:",yA("mobileTextMinFontSize"),";line-height:normal;",`@media (min-width: ${jK["small"]})`,"{font-size:",yA("default.fontSize"),";line-height:normal;}&:focus{",qK,";}&::-webkit-input-placeholder{color:",Gk.darkGray.placeholder,";}&::-moz-placeholder{opacity:1;color:",Gk.darkGray.placeholder,";}&:-ms-input-placeholder{color:",Gk.darkGray.placeholder,";}.is-dark-theme &{&::-webkit-input-placeholder{color:",Gk.lightGray.placeholder,";}&::-moz-placeholder{opacity:1;color:",Gk.lightGray.placeholder,";}&:-ms-input-placeholder{color:",Gk.lightGray.placeholder,";}}","");const VK=yf("textarea",{target:"ebk7yr50"})("width:100%;",FK,";");function XK({label:e,hideLabelFromVision:t,value:n,help:r,onChange:o,rows:a=4,className:i,...s}){const l=`inspector-textarea-control-${Zk(XK)}`;return(0,tt.createElement)(EA,{label:e,hideLabelFromVision:t,id:l,help:r,className:i},(0,tt.createElement)(VK,ot({className:"components-textarea-control__input",id:l,rows:a,onChange:e=>o(e.target.value),"aria-describedby":r?l+"__help":void 0,value:n},s)))}var UK=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$K=function(){return($K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{s||(c(!1),d(!1))};(0,tt.useEffect)((()=>{if(!(null!==p||null!==m))return;const e=p!==f.current,r=m!==h.current;if(e||r){if(p&&!f.current&&m&&!h.current)return f.current=p,void(h.current=m);e&&(c(!0),f.current=p),r&&(d(!0),h.current=m),n({width:p,height:m}),g.current&&hG(g.current),g.current=fG(b,t)}}),[p,m]);return{label:function({axis:e,height:t,moveX:n=!1,moveY:r=!1,position:o=gG,showPx:a=!1,width:i}){if(!n&&!r)return null;if(o===bG)return`${i} x ${t}`;const s=a?" px":"";if(e){if("x"===e&&n)return`${i}${s}`;if("y"===e&&r)return`${t}${s}`}if(n&&r)return`${i} x ${t}`;if(n)return`${i}${s}`;if(r)return`${t}${s}`;return null}({axis:e,height:m,moveX:l,moveY:u,position:r,showPx:o,width:p}),resizeListener:a}}const vG=yf("div",{target:"ekdag503"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),_G=yf("div",{target:"ekdag502"})({name:"ajymcs",styles:"align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"}),MG=yf("div",{target:"ekdag501"})("background:",Gk.ui.border,";border-radius:2px;box-sizing:border-box;font-size:12px;color:",Gk.ui.textDark,";padding:4px 8px;position:relative;"),kG=yf(Rw,{target:"ekdag500"})({name:"1kboj1g",styles:"&&&{color:white;display:block;font-size:13px;line-height:1.4;}"});const wG=(0,tt.forwardRef)((function({label:e,position:t=bG,zIndex:n=1e3,...r},o){const a=!!e,i=t===bG;if(!a)return null;let s={opacity:a?1:null,zIndex:n},l={};return t===gG&&(s={...s,position:"absolute",bottom:-10,left:"50%",transform:"translate(-50%, 0)"},l={transform:"translate(0, 100%)"}),i&&(s={...s,position:"absolute",top:4,right:rr()?null:4,left:rr()?4:null}),(0,tt.createElement)(_G,ot({"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",isActive:a,ref:o,style:s},r),(0,tt.createElement)(MG,{className:"components-resizable-tooltip__tooltip",style:l},(0,tt.createElement)(kG,{as:"span"},e)))}));const EG=(0,tt.forwardRef)((function({axis:e,className:t,fadeTimeout:n=180,isVisible:r=!0,labelRef:o,onResize:a=at.noop,position:i=gG,showPx:s=!0,zIndex:l=1e3,...c},u){const{label:d,resizeListener:p}=yG({axis:e,fadeTimeout:n,onResize:a,showPx:s,position:i});if(!r)return null;const m=so()("components-resize-tooltip",t);return(0,tt.createElement)(vG,ot({"aria-hidden":"true",className:m,ref:u},c),p,(0,tt.createElement)(wG,{"aria-hidden":c["aria-hidden"],fadeTimeout:n,isVisible:r,label:d,position:i,ref:o,zIndex:l}))}));const LG=(0,tt.forwardRef)((function({className:e,children:t,showHandle:n=!0,__experimentalShowTooltip:r=!1,__experimentalTooltipProps:o={},...a},i){const s={width:null,height:null,top:null,right:null,bottom:null,left:null},l="components-resizable-box__handle",c="components-resizable-box__side-handle",u="components-resizable-box__corner-handle";return(0,tt.createElement)(mG,ot({className:so()("components-resizable-box__container",n&&"has-show-handle",e),handleClasses:{top:so()(l,c,"components-resizable-box__handle-top"),right:so()(l,c,"components-resizable-box__handle-right"),bottom:so()(l,c,"components-resizable-box__handle-bottom"),left:so()(l,c,"components-resizable-box__handle-left"),topLeft:so()(l,u,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:so()(l,u,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:so()(l,u,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:so()(l,u,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},handleStyles:{top:s,right:s,bottom:s,left:s,topLeft:s,topRight:s,bottomRight:s,bottomLeft:s},ref:i},a),t,r&&(0,tt.createElement)(EG,o))}));function AG(e){const t=(0,tt.useRef)(void 0);return(0,tt.useEffect)((()=>{t.current=e}),[e]),t.current}function SG(e){const t=/^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(e);if(t)return t[1]}const CG=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M16.5 7.8v7H18v-7c0-1-.8-1.8-1.8-1.8h-7v1.5h7c.2 0 .3.1.3.3zm-8.7 8.7c-.1 0-.2-.1-.2-.2V2H6v4H2v1.5h4v8.8c0 1 .8 1.8 1.8 1.8h8.8v4H18v-4h4v-1.5H7.8z"})),TG=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"})),xG=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],zG="wp-embed";var OG=n(1991),NG=n.n(OG);const{name:DG}={apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},BG=e=>e&&e.includes('class="wp-embedded-content"'),IG=(e,t={})=>{var n;const{preview:r,attributes:o={}}=e,{url:a,providerNameSlug:i,type:s,...l}=o;if(!a||!Bo(DG))return;const c=(e=>{var t;return null===(t=Yo(DG))||void 0===t?void 0:t.find((({patterns:t})=>((e,t=[])=>t.some((t=>e.match(t))))(e,t)))})(a),u="wordpress"===i||s===zG;if(!u&&c&&(c.attributes.providerNameSlug!==i||!i))return Ho(DG,{url:a,...l,...c.attributes});const d=null===(n=Yo(DG))||void 0===n?void 0:n.find((({name:e})=>"wordpress"===e));return d&&r&&BG(r.html)&&!u?Ho(DG,{url:a,...d.attributes,...t}):void 0},PG=e=>{if(!e)return e;const t=xG.reduce(((e,{className:t})=>(e[t]=!1,e)),{"wp-has-aspect-ratio":!1});return NG()(e,t)};function RG(e,t,n=!0){if(!n)return PG(t);const r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;const o=r.body.querySelector("iframe");if(o&&o.height&&o.width){const e=(o.width/o.height).toFixed(2);for(let n=0;n=r.ratio){return e-r.ratio>.1?PG(t):NG()(PG(t),r.className,"wp-has-aspect-ratio")}}}return t}const WG=ln()(((e,t,n,r,o=!0)=>{if(!e)return{};const a={};let{type:i="rich"}=e;const{html:s,provider_name:l}=e,c=(0,at.kebabCase)((l||t).toLowerCase());return BG(s)&&(i=zG),(s||"photo"===i)&&(a.type=i,a.providerNameSlug=c),a.className=RG(s,n,r&&o),a}));function YG(e,t){const[n,r]=(0,tt.useState)();function o(){r(e.current.clientWidth)}return(0,tt.useEffect)(o,t),(0,tt.useEffect)((()=>{const{defaultView:t}=e.current.ownerDocument;return t.addEventListener("resize",o),()=>{t.removeEventListener("resize",o)}}),[]),n}var HG=function(e,t){return(HG=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};var qG=function(){return(qG=Object.assign||function(e){for(var t,n=1,r=arguments.length;nu*o?{width:u*o,height:u}:{width:c,height:c/o}}function XG(e,t,n,r,o){void 0===o&&(o=0);var a=nJ(t.width,t.height,o),i=a.width,s=a.height;return{x:UG(e.x,i,n.width,r),y:UG(e.y,s,n.height,r)}}function UG(e,t,n,r){var o=t*r/2-n/2;return Math.min(o,Math.max(e,-o))}function $G(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function KG(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function GG(e,t,n,r,o,a,i){void 0===a&&(a=0),void 0===i&&(i=!0);var s=i&&0===a?JG:ZG,l={x:s(100,((t.width-n.width/o)/2-e.x/o)/t.width*100),y:s(100,((t.height-n.height/o)/2-e.y/o)/t.height*100),width:s(100,n.width/t.width*100/o),height:s(100,n.height/t.height*100/o)},c=Math.round(s(t.naturalWidth,l.width*t.naturalWidth/100)),u=Math.round(s(t.naturalHeight,l.height*t.naturalHeight/100)),d=t.naturalWidth>=t.naturalHeight*r?{width:Math.round(u*r),height:u}:{width:c,height:Math.round(c/r)};return{croppedAreaPercentages:l,croppedAreaPixels:qG(qG({},d),{x:Math.round(s(t.naturalWidth-d.width,l.x*t.naturalWidth/100)),y:Math.round(s(t.naturalHeight-d.height,l.y*t.naturalHeight/100))})}}function JG(e,t){return Math.min(e,Math.max(0,t))}function ZG(e,t){return t}function QG(e,t,n){var r=t.width/t.naturalWidth,o=function(e,t,n){var r=t.width/t.naturalWidth;if(n)return n.height>n.width?n.height/r/e.height:n.width/r/e.width;var o=e.width/e.height;return t.naturalWidth>=t.naturalHeight*o?t.naturalHeight/e.height:t.naturalWidth/e.width}(e,t,n),a=r*o;return{crop:{x:((t.naturalWidth-e.width)/2-e.x)*a,y:((t.naturalHeight-e.height)/2-e.y)*a},zoom:o}}function eJ(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function tJ(e,t,n,r,o){var a=Math.cos,i=Math.sin,s=o*Math.PI/180;return[(e-n)*a(s)-(t-r)*i(s)+n,(e-n)*i(s)+(t-r)*a(s)+r]}function nJ(e,t,n){var r=e/2,o=t/2,a=[tJ(0,0,r,o,n),tJ(e,0,r,o,n),tJ(e,t,r,o,n),tJ(0,t,r,o,n)],i=Math.min.apply(Math,a.map((function(e){return e[0]}))),s=Math.max.apply(Math,a.map((function(e){return e[0]}))),l=Math.min.apply(Math,a.map((function(e){return e[1]})));return{width:s-i,height:Math.max.apply(Math,a.map((function(e){return e[1]})))-l}}function rJ(){for(var e=[],t=0;t0})).join(" ").trim()}const oJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=null,n.videoRef=null,n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){document.removeEventListener("mousemove",n.onMouseMove),document.removeEventListener("mouseup",n.onDragStopped),document.removeEventListener("touchmove",n.onTouchMove),document.removeEventListener("touchend",n.onDragStopped)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){n.computeSizes(),n.emitCropData(),n.setInitialCrop(),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(){var e=n.props,t=e.initialCroppedAreaPixels,r=e.cropSize;if(t){var o=QG(t,n.mediaSize,r),a=o.crop,i=o.zoom;n.props.onCropChange(a),n.props.onZoomChange&&n.props.onZoomChange(i)}},n.computeSizes=function(){var e,t,r,o,a,i,s=n.imageRef||n.videoRef;if(s&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.mediaSize={width:s.offsetWidth,height:s.offsetHeight,naturalWidth:(null===(e=n.imageRef)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef)||void 0===t?void 0:t.videoWidth)||0,naturalHeight:(null===(r=n.imageRef)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef)||void 0===o?void 0:o.videoHeight)||0};var l=n.props.cropSize?n.props.cropSize:VG(s.offsetWidth,s.offsetHeight,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);(null===(a=n.state.cropSize)||void 0===a?void 0:a.height)===l.height&&(null===(i=n.state.cropSize)||void 0===i?void 0:i.width)===l.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(l),n.setState({cropSize:l},n.recomputeCropPosition)}},n.onMouseDown=function(e){e.preventDefault(),document.addEventListener("mousemove",n.onMouseMove),document.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){e.preventDefault(),document.addEventListener("touchmove",n.onTouchMove,{passive:!1}),document.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onDragStart=function(e){var t,r,o=e.x,a=e.y;n.dragStartPosition={x:o,y:a},n.dragStartCrop=qG({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.rafDragTimeout&&window.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=window.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,a={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},i=n.props.restrictPosition?XG(a,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):a;n.props.onCropChange(i)}}))},n.onDragStopped=function(){var e,t;n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){e.preventDefault();var r=t.getMousePoint(e),o=FG()(e).pixelY,a=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(a,r),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=window.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)},n.getPointOnContainer=function(e){var t=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(r-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,a=o.crop,i=o.zoom;return{x:(t+a.x)/i,y:(r+a.y)/i}},n.setNewZoom=function(e,t){if(n.state.cropSize&&n.props.onZoomChange){var r=n.getPointOnContainer(t),o=n.getPointOnMedia(r),a=Math.min(n.props.maxZoom,Math.max(e,n.props.minZoom)),i={x:o.x*a-r.x,y:o.y*a-r.y},s=n.props.restrictPosition?XG(i,n.mediaSize,n.state.cropSize,a,n.props.rotation):i;n.props.onCropChange(s),n.props.onZoomChange(a)}},n.getCropData=function(){return n.state.cropSize?GG(n.props.restrictPosition?XG(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?XG(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}HG(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.computeSizes),this.containerRef&&(this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.preventZoomSafari),this.containerRef.addEventListener("gesturechange",this.preventZoomSafari)),this.props.disableAutomaticStylesInjection||(this.styleRef=document.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",document.head.appendChild(this.styleRef)),this.imageRef&&this.imageRef.complete&&this.onMediaLoad()},t.prototype.componentWillUnmount=function(){var e;window.removeEventListener("resize",this.computeSizes),this.containerRef&&(this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.containerRef.removeEventListener("gesturechange",this.preventZoomSafari)),this.styleRef&&(null===(e=this.styleRef.parentNode)||void 0===e||e.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){var t,n,r,o,a,i,s,l,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(a=e.crop)||void 0===a?void 0:a.x)===(null===(i=this.props.crop)||void 0===i?void 0:i.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(l=this.props.crop)||void 0===l?void 0:l.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=$G(n,r),this.lastPinchRotation=KG(n,r),this.onDragStart(eJ(n,r))},t.prototype.onPinchMove=function(e){var n=this,r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),a=eJ(r,o);this.onDrag(a),this.rafPinchTimeout&&window.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=window.requestAnimationFrame((function(){var e=$G(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,a),n.lastPinchDistance=e;var i=KG(r,o),s=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=i}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,r=t.video,o=t.mediaProps,a=t.transform,i=t.crop,s=i.x,l=i.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,m=t.style,h=m.containerStyle,f=m.cropAreaStyle,g=m.mediaStyle,b=t.classes,y=b.containerClassName,v=b.cropAreaClassName,_=b.mediaClassName,M=t.objectFit;return nt().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:h,className:rJ("reactEasyCrop_Container",y)},n?nt().createElement("img",qG({alt:"",className:rJ("reactEasyCrop_Image","contain"===M&&"reactEasyCrop_Contain","horizontal-cover"===M&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===M&&"reactEasyCrop_Cover_Vertical",_)},o,{src:n,ref:function(t){return e.imageRef=t},style:qG(qG({},g),{transform:a||"translate("+s+"px, "+l+"px) rotate("+c+"deg) scale("+u+")"}),onLoad:this.onMediaLoad})):r&&nt().createElement("video",qG({autoPlay:!0,loop:!0,muted:!0,className:rJ("reactEasyCrop_Video","contain"===M&&"reactEasyCrop_Contain","horizontal-cover"===M&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===M&&"reactEasyCrop_Cover_Vertical",_)},o,{ref:function(t){return e.videoRef=t},onLoadedMetadata:this.onMediaLoad,style:qG(qG({},g),{transform:a||"translate("+s+"px, "+l+"px) rotate("+c+"deg) scale("+u+")"}),controls:!1}),(Array.isArray(r)?r:[{src:r}]).map((function(e){return nt().createElement("source",qG({key:e.src},e))}))),this.state.cropSize&&nt().createElement("div",{style:qG(qG({},f),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:rJ("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",v)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(nt().Component),aJ={position:"bottom right",isAlternate:!0};function iJ(e,t){const n=function({url:e,naturalWidth:t,naturalHeight:n}){const[r,o]=(0,tt.useState)(),[a,i]=(0,tt.useState)(),[s,l]=(0,tt.useState)({x:0,y:0}),[c,u]=(0,tt.useState)(),[d,p]=(0,tt.useState)(),[m,h]=(0,tt.useState)(),[f,g]=(0,tt.useState)(),b=(0,tt.useCallback)((()=>{l({x:0,y:0}),u(100),p(0),h(t/n),g(t/n)}),[t,n,l,u,p,h,g]),y=(0,tt.useCallback)((()=>{const r=(d+90)%360;let a=t/n;if(d%180==90&&(a=n/t),0===r)return o(),p(r),h(1/m),void l({x:-s.y*a,y:s.x*a});const i=new window.Image;i.src=e,i.onload=function(e){const t=document.createElement("canvas");let n=0,i=0;r%180?(t.width=e.target.height,t.height=e.target.width):(t.width=e.target.width,t.height=e.target.height),90!==r&&180!==r||(n=t.width),270!==r&&180!==r||(i=t.height);const c=t.getContext("2d");c.translate(n,i),c.rotate(r*Math.PI/180),c.drawImage(e.target,0,0),t.toBlob((e=>{o(URL.createObjectURL(e)),p(r),h(1/m),l({x:-s.y*a,y:s.x*a})}))};const c=Fn("media.crossOrigin",void 0,e);"string"==typeof c&&(i.crossOrigin=c)}),[d,t,n,o,p,h,l]);return(0,tt.useMemo)((()=>({editedUrl:r,setEditedUrl:o,crop:a,setCrop:i,position:s,setPosition:l,zoom:c,setZoom:u,rotation:d,setRotation:p,rotateClockwise:y,aspect:m,setAspect:h,defaultAspect:f,initializeTransformValues:b})),[r,o,a,i,s,l,c,u,d,p,y,m,h,f,b])}(e),{initializeTransformValues:r}=n;return(0,tt.useEffect)((()=>{t&&r()}),[t,r]),n}const sJ=(0,tt.createContext)({}),lJ=()=>(0,tt.useContext)(sJ);function cJ({id:e,url:t,naturalWidth:n,naturalHeight:r,isEditing:o,onFinishEditing:a,onSaveImage:i,children:s}){const l=iJ({url:t,naturalWidth:n,naturalHeight:r},o),c=function({crop:e,rotation:t,height:n,width:r,aspect:o,url:a,id:i,onSaveImage:s,onFinishEditing:l}){const{createErrorNotice:c}=sd(UI),[u,d]=(0,tt.useState)(!1),p=(0,tt.useCallback)((()=>{d(!1),l()}),[d,l]),m=(0,tt.useCallback)((()=>{d(!0);let u={};(e.width<99.9||e.height<99.9)&&(u=e),t>0&&(u.rotation=t),u.src=a,Ql({path:`/wp/v2/media/${i}/edit`,method:"POST",data:u}).then((e=>{s({id:e.id,url:e.source_url,height:n&&r?r/o:void 0})})).catch((e=>{c(pn(er("Could not edit image. %s"),e.message),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{d(!1),l()}))}),[d,e,t,n,r,o,a,s,c,d,l]);return(0,tt.useMemo)((()=>({isInProgress:u,apply:m,cancel:p})),[u,m,p])}({id:e,url:t,onSaveImage:i,onFinishEditing:a,...l}),u=(0,tt.useMemo)((()=>({...l,...c})),[l,c]);return(0,tt.createElement)(sJ.Provider,{value:u},s)}function uJ({url:e,width:t,height:n,clientWidth:r,naturalHeight:o,naturalWidth:a}){const{isInProgress:i,editedUrl:s,position:l,zoom:c,aspect:u,setPosition:d,setCrop:p,setZoom:m,rotation:h}=lJ();let f=n||r*o/a;return h%180==90&&(f=r*a/o),(0,tt.createElement)("div",{className:so()("wp-block-image__crop-area",{"is-applying":i}),style:{width:t||r,height:f}},(0,tt.createElement)(oJ,{image:s||e,disabled:i,minZoom:1,maxZoom:3,crop:l,zoom:c/100,aspect:u,onCropChange:d,onCropComplete:e=>{p(e)},onZoomChange:e=>{m(100*e)}}),i&&(0,tt.createElement)(cq,null))}function dJ(){const{isInProgress:e,zoom:t,setZoom:n}=lJ();return(0,tt.createElement)(Vg,{contentClassName:"wp-block-image__zoom",popoverProps:aJ,renderToggle:({isOpen:t,onToggle:n})=>(0,tt.createElement)(qg,{icon:bP,label:er("Zoom"),onClick:n,"aria-expanded":t,disabled:e}),renderContent:()=>(0,tt.createElement)(rT,{label:er("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}const pJ=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function mJ({aspectRatios:e,isDisabled:t,label:n,onClick:r,value:o}){return(0,tt.createElement)(ON,{label:n},e.map((({title:e,aspect:n})=>(0,tt.createElement)(zB,{key:n,disabled:t,onClick:()=>{r(n)},role:"menuitemradio",isSelected:n===o,icon:n===o?kS:void 0},e))))}function hJ({toggleProps:e}){const{isInProgress:t,aspect:n,setAspect:r,defaultAspect:o}=lJ();return(0,tt.createElement)(Zg,{icon:pJ,label:er("Aspect Ratio"),popoverProps:aJ,toggleProps:e,className:"wp-block-image__aspect-ratio"},(({onClose:e})=>(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(mJ,{isDisabled:t,onClick:t=>{r(t),e()},value:n,aspectRatios:[{title:er("Original"),aspect:o},{title:er("Square"),aspect:1}]}),(0,tt.createElement)(mJ,{label:er("Landscape"),isDisabled:t,onClick:t=>{r(t),e()},value:n,aspectRatios:[{title:er("16:10"),aspect:1.6},{title:er("16:9"),aspect:16/9},{title:er("4:3"),aspect:4/3},{title:er("3:2"),aspect:1.5}]}),(0,tt.createElement)(mJ,{label:er("Portrait"),isDisabled:t,onClick:t=>{r(t),e()},value:n,aspectRatios:[{title:er("10:16"),aspect:.625},{title:er("9:16"),aspect:9/16},{title:er("3:4"),aspect:3/4},{title:er("2:3"),aspect:2/3}]}))))}const fJ=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function gJ(){const{isInProgress:e,rotateClockwise:t}=lJ();return(0,tt.createElement)(qg,{icon:fJ,label:er("Rotate"),onClick:t,disabled:e})}function bJ(){const{isInProgress:e,apply:t,cancel:n}=lJ();return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(qg,{onClick:t,disabled:e},er("Apply")),(0,tt.createElement)(qg,{onClick:n},er("Cancel")))}function yJ({url:e,width:t,height:n,clientWidth:r,naturalHeight:o,naturalWidth:a}){return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(uJ,{url:e,width:t,height:n,clientWidth:r,naturalHeight:o,naturalWidth:a}),(0,tt.createElement)(lk,null,(0,tt.createElement)(eb,null,(0,tt.createElement)(dJ,null),(0,tt.createElement)(Yg,null,(e=>(0,tt.createElement)(hJ,{toggleProps:e}))),(0,tt.createElement)(gJ,null)),(0,tt.createElement)(eb,null,(0,tt.createElement)(bJ,null))))}const vJ=20,_J="none",MJ="media",kJ="attachment",wJ="custom",EJ=["image"];function LJ({temporaryURL:e,attributes:{url:t="",alt:n,caption:r,align:o,id:a,href:i,rel:s,linkClass:l,linkDestination:c,title:u,width:d,height:p,linkTarget:m,sizeSlug:h},setAttributes:f,isSelected:g,insertBlocksAfter:b,onReplace:y,onSelectImage:v,onSelectURL:_,onUploadError:M,containerRef:k,clientId:w}){const E=(0,tt.useRef)(),L=AG(t),{image:A,multiImageSelection:S}=Cl((e=>{const{getMedia:t}=e(yd),{getMultiSelectedBlockClientIds:n,getBlockName:r}=e(nk),o=n();return{image:a&&g?t(a):null,multiImageSelection:o.length&&o.every((e=>"core/image"===r(e)))}}),[a,g]),{canInsertCover:C,getBlock:T,imageEditing:x,imageSizes:z,maxWidth:O,mediaUpload:N}=Cl((e=>{const{getBlock:t,getBlockRootClientId:n,getBlockTransformItems:r,getSettings:o}=e(nk),a=r([t(w)],n(w));return{...(0,at.pick)(o(),["imageEditing","imageSizes","maxWidth","mediaUpload"]),getBlock:t,canInsertCover:(null==a?void 0:a.length)&&!!a.find((({name:e})=>"core/cover"===e))}}),[w]),{replaceBlocks:D,toggleSelection:B}=sd(nk),{createErrorNotice:I,createSuccessNotice:P}=sd(UI),R=Gp("medium"),W=(0,at.includes)(["wide","full"],o),[{naturalWidth:Y,naturalHeight:H},q]=(0,tt.useState)({}),[j,F]=(0,tt.useState)(!1),[V,X]=(0,tt.useState)(),U=YG(k,[o]),$=!W&&R,K=(0,at.map)((0,at.filter)(z,(({slug:e})=>(0,at.get)(A,["media_details","sizes",e,"source_url"]))),(({name:e,slug:t})=>({value:t,label:e})));(0,tt.useEffect)((()=>{AJ(a,t)&&g&&!V&&window.fetch(t).then((e=>e.blob())).then((e=>X(e))).catch((()=>{}))}),[a,t,g,V]),(0,tt.useEffect)((()=>{t&&!L&&g&&E.current.focus()}),[t,L]),(0,tt.useEffect)((()=>{g||F(!1)}),[g]);const G=a&&Y&&H&&x,J=!S&&G&&!j;const Z=(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,{group:"block"},(0,tt.createElement)(uA,{value:o,onChange:function(e){const t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};f({...t,align:e})}}),!S&&!j&&(0,tt.createElement)(qj,{url:i||"",onChangeUrl:function(e){f(e)},linkDestination:c,mediaUrl:A&&A.source_url||t,mediaLink:A&&A.link,linkTarget:m,linkClass:l,rel:s}),J&&(0,tt.createElement)(qg,{onClick:()=>F(!0),icon:CG,label:er("Crop")}),V&&(0,tt.createElement)(qg,{onClick:function(){N({filesList:[V],onFileChange([e]){v(e),Js(e.url)||(X(),P(er("Image uploaded."),{type:"snackbar"}))},allowedTypes:EJ,onError(e){I(e,{type:"snackbar"})}})},icon:$q,label:er("Upload external image")}),!S&&C&&(0,tt.createElement)(qg,{icon:TG,label:er("Add text over image"),onClick:function(){D(w,Jo(T(w),"core/cover"))}})),!S&&!j&&(0,tt.createElement)(lk,{group:"other"},(0,tt.createElement)(Jq,{mediaId:a,mediaURL:t,allowedTypes:EJ,accept:"image/*",onSelect:v,onSelectURL:_,onError:M})),(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("Image settings")},!S&&(0,tt.createElement)(XK,{label:er("Alt text (alternative text)"),value:n,onChange:function(e){f({alt:e})},help:(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(CA,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},er("Describe the purpose of the image")),er("Leave empty if the image is purely decorative."))}),(0,tt.createElement)(qH,{onChangeImage:function(e){const t=(0,at.get)(A,["media_details","sizes",e,"source_url"]);if(!t)return null;f({url:t,width:void 0,height:void 0,sizeSlug:e})},onChange:e=>f(e),slug:h,width:d,height:p,imageSizeOptions:K,isResizable:$,imageWidth:Y,imageHeight:H}))),(0,tt.createElement)(YA,null,(0,tt.createElement)(LA,{label:er("Title attribute"),value:u||"",onChange:function(e){f({title:e})},help:(0,tt.createElement)(tt.Fragment,null,er("Describe the role of this image on the page."),(0,tt.createElement)(CA,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute"},er("(Note: many devices and browsers do not display this text.)")))}))),Q=function(e){const t=SG(e);if(t)return(0,at.last)(t.split("/"))}(t);let ee;ee=n||(Q?pn(er("This image has an empty alt attribute; its file name is %s"),Q):er("This image has an empty alt attribute"));let te,ne,re=(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)("img",{src:e||t,alt:ee,onError:()=>function(){const e=IG({attributes:{url:t}});void 0!==e&&y(e)}(),onLoad:e=>{q((0,at.pick)(e.target,["naturalWidth","naturalHeight"]))}}),e&&(0,tt.createElement)(cq,null));if(U&&Y&&H){const e=Y>U,t=H/Y;te=e?U:Y,ne=e?U*t:H}if(G&&j)re=(0,tt.createElement)(yJ,{url:t,width:d,height:p,clientWidth:U,naturalHeight:H,naturalWidth:Y});else if($&&te){const e=d||te,t=p||ne,n=Y/H,r=Y{B(!0),f({width:parseInt(e+a.width,10),height:parseInt(t+a.height,10)})}},re)}else re=(0,tt.createElement)("div",{style:{width:d,height:p}},re);return(0,tt.createElement)(cJ,{id:a,url:t,naturalWidth:Y,naturalHeight:H,clientWidth:U,onSaveImage:e=>f(e),isEditing:j,onFinishEditing:()=>F(!1)},!e&&Z,re,(!Cj.isEmpty(r)||g)&&(0,tt.createElement)(Cj,{ref:E,tagName:"figcaption","aria-label":er("Image caption text"),placeholder:er("Add caption"),value:r,onChange:e=>f({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>b(Ho("core/paragraph"))}))}const AJ=(e,t)=>t&&!e&&!Js(t);const SJ=YK((function({attributes:e,setAttributes:t,isSelected:n,className:r,noticeUI:o,insertBlocksAfter:a,noticeOperations:i,onReplace:s,clientId:l}){const{url:c="",alt:u,caption:d,align:p,id:m,width:h,height:f,sizeSlug:g}=e,[b,y]=(0,tt.useState)(),v=(0,tt.useRef)();(0,tt.useEffect)((()=>{v.current=u}),[u]);const _=(0,tt.useRef)();(0,tt.useEffect)((()=>{_.current=d}),[d]);const M=(0,tt.useRef)(),{imageDefaultSize:k,mediaUpload:w}=Cl((e=>{const{getSettings:t}=e(nk);return(0,at.pick)(t(),["imageDefaultSize","mediaUpload"])}),[]);function E(e){i.removeAllNotices(),i.createErrorNotice(e)}function L(n){var r,o,a,i,s;if(!n||!n.url)return void t({url:void 0,alt:void 0,id:void 0,title:void 0,caption:void 0});if(Js(n.url))return void y(n.url);y();let l,u=((e,t)=>{const n=(0,at.pick)(e,["alt","id","link","caption"]);return n.url=(0,at.get)(e,["sizes",t,"url"])||(0,at.get)(e,["media_details","sizes",t,"source_url"])||e.url,n})(n,k);var d,p;_.current&&!(0,at.get)(u,["caption"])&&(u=(0,at.omit)(u,["caption"])),l=n.id&&n.id===m?{url:c}:{width:void 0,height:void 0,sizeSlug:(d=n,p=k,(0,at.has)(d,["sizes",p,"url"])||(0,at.has)(d,["media_details","sizes",p,"source_url"])?k:"full")};let h,f=e.linkDestination;if(!f)switch((null===(r=wp)||void 0===r||null===(o=r.media)||void 0===o||null===(a=o.view)||void 0===a||null===(i=a.settings)||void 0===i||null===(s=i.defaultProps)||void 0===s?void 0:s.link)||_J){case"file":case MJ:f=MJ;break;case"post":case kJ:f=kJ;break;case wJ:f=wJ;break;case _J:f=_J}switch(f){case MJ:h=n.url;break;case kJ:h=n.link}u.href=h,t({...u,...l,linkDestination:f})}function A(e){e!==c&&t({url:e,id:void 0,width:void 0,height:void 0,sizeSlug:k})}const S=((e,t)=>!e&&Js(t))(m,c);(0,tt.useEffect)((()=>{if(!S)return;const e=Ks(c);e&&w({filesList:[e],onFileChange:([e])=>{L(e)},allowedTypes:EJ,onError:e=>{i.createErrorNotice(e),t({src:void 0,id:void 0,url:void 0})}})}),[]),(0,tt.useEffect)((()=>{if(b)return()=>{Gs(b)}}),[b]);const C=AJ(m,c)?c:void 0,T=!!c&&(0,tt.createElement)("img",{alt:er("Edit image"),title:er("Edit image"),className:"edit-image-preview",src:c}),x=VR({ref:M,className:so()(r,{"is-transient":b,"is-resized":!!h||!!f,[`size-${g}`]:g})});return(0,tt.createElement)("figure",x,(b||c)&&(0,tt.createElement)(LJ,{temporaryURL:b,attributes:e,setAttributes:t,isSelected:n,insertBlocksAfter:a,onReplace:s,onSelectImage:L,onSelectURL:A,onUploadError:E,containerRef:M,clientId:l}),!c&&(0,tt.createElement)(lk,{group:"block"},(0,tt.createElement)(uA,{value:p,onChange:function(e){const n=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};t({...n,align:e})}})),(0,tt.createElement)(oj,{icon:(0,tt.createElement)(MB,{icon:PK}),onSelect:L,onSelectURL:A,notices:o,onError:E,accept:"image/*",allowedTypes:EJ,value:{id:m,src:C},mediaPreview:T,disableMediaButtons:b||c}))}));function CJ(e,t){const{body:n}=document.implementation.createHTMLDocument("");n.innerHTML=e;const{firstElementChild:r}=n;if(r&&"A"===r.nodeName)return r.getAttribute(t)||void 0}const TJ={img:{attributes:["src","alt","title"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},xJ={from:[{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&!!e.querySelector("img"),schema:({phrasingContentSchema:e})=>({figure:{require:["img"],children:{...TJ,a:{attributes:["href","rel","target"],children:TJ},figcaption:{children:e}}}}),transform:e=>{const t=e.className+" "+e.querySelector("img").className,n=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),r=""===e.id?void 0:e.id,o=n?n[1]:void 0,a=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),i=a?Number(a[1]):void 0,s=e.querySelector("a"),l=s&&s.href?"custom":void 0,c=s&&s.href?s.href:void 0,u=s&&s.rel?s.rel:void 0,d=s&&s.className?s.className:void 0;return Ho("core/image",Ki("core/image",e.outerHTML,{align:o,id:i,linkDestination:l,href:c,rel:u,linkClass:d,anchor:r}))}},{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("image/"),transform:e=>Ho("core/image",{url:$s(e[0])})},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,{shortcode:t}){const{body:n}=document.implementation.createHTMLDocument("");n.innerHTML=t.content;let r=n.querySelector("img");for(;r&&r.parentNode&&r.parentNode!==n;)r=r.parentNode;return r&&r.parentNode.removeChild(r),n.innerHTML.trim()}},href:{shortcode:(e,{shortcode:t})=>CJ(t.content,"href")},rel:{shortcode:(e,{shortcode:t})=>CJ(t.content,"rel")},linkClass:{shortcode:(e,{shortcode:t})=>CJ(t.content,"class")},id:{type:"number",shortcode:({named:{id:e}})=>{if(e)return parseInt(e.replace("attachment_",""),10)}},align:{type:"string",shortcode:({named:{align:e="alignnone"}})=>e.replace("align","")}}}]},zJ={apiVersion:2,name:"core/image",title:"Image",category:"media",description:"Insert an image to make a visual statement.",keywords:["img","photo","picture"],textdomain:"default",attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{__experimentalDuotone:"img",text:!1,background:!1},__experimentalBorder:{radius:!0}},styles:[{name:"default",label:"Default",isDefault:!0},{name:"rounded",label:"Rounded"}],editorStyle:"wp-block-image-editor",style:"wp-block-image"},{name:OJ}=zJ,NJ={icon:PK,example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",caption:er("Mont Blanc appears—still, snowy, and serene.")}},__experimentalLabel(e,{context:t}){if("accessibility"===t){const{caption:t,alt:n,url:r}=e;return r?n?n+(t?". "+t:""):t||"":er("Empty")}},getEditWrapperProps:e=>({"data-align":e.align}),transforms:xJ,edit:SJ,save:function({attributes:e}){const{url:t,alt:n,caption:r,align:o,href:a,rel:i,linkClass:s,width:l,height:c,id:u,linkTarget:d,sizeSlug:p,title:m}=e,h=(0,at.isEmpty)(i)?void 0:i,f=so()({[`align${o}`]:o,[`size-${p}`]:p,"is-resized":l||c}),g=(0,tt.createElement)("img",{src:t,alt:n,className:u?`wp-image-${u}`:null,width:l,height:c,title:m}),b=(0,tt.createElement)(tt.Fragment,null,a?(0,tt.createElement)("a",{className:s,href:a,target:d,rel:h},g):g,!Cj.isEmpty(r)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",value:r}));return"left"===o||"right"===o||"center"===o?(0,tt.createElement)("div",VR.save(),(0,tt.createElement)("figure",{className:f},b)):(0,tt.createElement)("figure",VR.save({className:f}),b)},deprecated:WK},DJ=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M6.2 5.2v13.4l5.8-4.8 5.8 4.8V5.2z"})),BJ={className:!1,anchor:!0},IJ={align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"}},PJ=e=>{if(!e.customTextColor)return e;const t={color:{text:e.customTextColor}};return{...(0,at.omit)(e,["customTextColor"]),style:t}},RJ=["left","right","center"],WJ=e=>{const{align:t,...n}=e;return RJ.includes(t)?{...n,textAlign:t}:e},YJ=[{supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},fontSize:!0,lineHeight:!0,__experimentalSelector:{"core/heading/h1":"h1","core/heading/h2":"h2","core/heading/h3":"h3","core/heading/h4":"h4","core/heading/h5":"h5","core/heading/h6":"h6"},__unstablePasteTextInline:!0},attributes:IJ,isEligible:({align:e})=>RJ.includes(e),migrate:WJ,save({attributes:e}){const{align:t,content:n,level:r}=e,o="h"+r,a=so()({[`has-text-align-${t}`]:t});return(0,tt.createElement)(o,VR.save({className:a}),(0,tt.createElement)(Cj.Content,{value:n}))}},{supports:BJ,attributes:{...IJ,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>PJ(WJ(e)),save({attributes:e}){const{align:t,content:n,customTextColor:r,level:o,textColor:a}=e,i="h"+o,s=mC("color",a),l=so()({[s]:s,"has-text-color":a||r,[`has-text-align-${t}`]:t});return(0,tt.createElement)(Cj.Content,{className:l||void 0,tagName:i,style:{color:s?void 0:r},value:n})}},{attributes:{...IJ,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>PJ(WJ(e)),save({attributes:e}){const{align:t,content:n,customTextColor:r,level:o,textColor:a}=e,i="h"+o,s=mC("color",a),l=so()({[s]:s,[`has-text-align-${t}`]:t});return(0,tt.createElement)(Cj.Content,{className:l||void 0,tagName:i,style:{color:s?void 0:r},value:n})},supports:BJ},{supports:BJ,attributes:{...IJ,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>PJ(WJ(e)),save({attributes:e}){const{align:t,level:n,content:r,textColor:o,customTextColor:a}=e,i="h"+n,s=mC("color",o),l=so()({[s]:s});return(0,tt.createElement)(Cj.Content,{className:l||void 0,tagName:i,style:{textAlign:t,color:s?void 0:a},value:r})}}];function HJ({level:e,isPressed:t=!1}){const n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(e)?(0,tt.createElement)(mo,{width:"24",height:"24",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:t},(0,tt.createElement)(uo,{d:n[e]})):null}const qJ=[1,2,3,4,5,6],jJ={className:"block-library-heading-level-dropdown",isAlternate:!0};function FJ({selectedLevel:e,onChange:t}){return(0,tt.createElement)(Vg,{popoverProps:jJ,renderToggle:({onToggle:t,isOpen:n})=>(0,tt.createElement)(qg,{"aria-expanded":n,"aria-haspopup":"true",icon:(0,tt.createElement)(HJ,{level:e}),label:er("Change heading level"),onClick:t,onKeyDown:e=>{n||e.keyCode!==sm||(e.preventDefault(),t())},showTooltip:!0}),renderContent:()=>(0,tt.createElement)(yW,{className:"block-library-heading-level-toolbar",label:er("Change heading level")},(0,tt.createElement)(eb,{isCollapsed:!1,controls:qJ.map((n=>{const r=n===e;return{icon:(0,tt.createElement)(HJ,{level:n,isPressed:r}),title:pn(er("Heading %d"),n),isActive:r,onClick(){t(n)}}}))}))})}const VJ=function({attributes:e,setAttributes:t,mergeBlocks:n,onReplace:r,style:o,clientId:a}){const{textAlign:i,content:s,level:l,placeholder:c}=e,u="h"+l,d=VR({className:so()({[`has-text-align-${i}`]:i}),style:o});return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,{group:"block"},(0,tt.createElement)(FJ,{selectedLevel:l,onChange:e=>t({level:e})}),(0,tt.createElement)(gD,{value:i,onChange:e=>{t({textAlign:e})}})),(0,tt.createElement)(Cj,ot({identifier:"content",tagName:u,value:s,onChange:e=>t({content:e}),onMerge:n,onSplit:(t,n)=>{let r;return r=n||t?Ho("core/heading",{...e,content:t}):Ho("core/paragraph"),n&&(r.clientId=a),r},onReplace:r,onRemove:()=>r([]),"aria-label":er("Heading text"),placeholder:c||er("Heading"),textAlign:i},d)))};const{name:XJ}={apiVersion:2,name:"core/heading",title:"Heading",category:"text",description:"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",keywords:["title","subtitle"],textdomain:"default",attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",__experimentalRole:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontWeight:!0},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"},UJ={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((({content:e,anchor:t})=>Ho(XJ,{content:e,anchor:t})))},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:({phrasingContentSchema:e,isPaste:t})=>{const n={children:e,attributes:t?[]:["style","id"]};return{h1:n,h2:n,h3:n,h4:n,h5:n,h6:n}},transform(e){const t=Ki(XJ,e.outerHTML),{textAlign:n}=e.style||{};var r;return t.level=(r=e.nodeName,Number(r.substr(1))),"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),Ho(XJ,t)}},...[1,2,3,4,5,6].map((e=>({type:"prefix",prefix:Array(e+1).join("#"),transform:t=>Ho(XJ,{level:e,content:t})}))),...[1,2,3,4,5,6].map((e=>({type:"enter",regExp:new RegExp(`^/(h|H)${e}$`),transform:t=>Ho(XJ,{level:e,content:t})})))],to:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((({content:e,anchor:t})=>Ho("core/paragraph",{content:e,anchor:t})))}]},$J={apiVersion:2,name:"core/heading",title:"Heading",category:"text",description:"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",keywords:["title","subtitle"],textdomain:"default",attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",__experimentalRole:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontWeight:!0},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0},editorStyle:"wp-block-heading-editor",style:"wp-block-heading"},{name:KJ}=$J,GJ={icon:DJ,example:{attributes:{content:er("Code is Poetry"),level:2}},__experimentalLabel(e,{context:t}){if("accessibility"===t){const{content:t,level:n}=e;return(0,at.isEmpty)(t)?pn(er("Level %s. Empty."),n):pn(er("Level %1$s. %2$s"),n,t)}},transforms:UJ,deprecated:YJ,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:VJ,save:function({attributes:e}){const{textAlign:t,content:n,level:r}=e,o="h"+r,a=so()({[`has-text-align-${t}`]:t});return(0,tt.createElement)(o,VR.save({className:a}),(0,tt.createElement)(Cj.Content,{value:n}))}},JJ=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z"})),ZJ={value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},QJ=[{attributes:ZJ,save({attributes:e}){const{align:t,value:n,citation:r}=e;return(0,tt.createElement)("blockquote",{style:{textAlign:t||null}},(0,tt.createElement)(Cj.Content,{multiline:!0,value:n}),!Cj.isEmpty(r)&&(0,tt.createElement)(Cj.Content,{tagName:"cite",value:r}))}},{attributes:{...ZJ,style:{type:"number",default:1}},migrate:e=>2===e.style?{...(0,at.omit)(e,["style"]),className:e.className?e.className+" is-style-large":"is-style-large"}:e,save({attributes:e}){const{align:t,value:n,citation:r,style:o}=e;return(0,tt.createElement)("blockquote",{className:2===o?"is-large":"",style:{textAlign:t||null}},(0,tt.createElement)(Cj.Content,{multiline:!0,value:n}),!Cj.isEmpty(r)&&(0,tt.createElement)(Cj.Content,{tagName:"cite",value:r}))}},{attributes:{...ZJ,citation:{type:"string",source:"html",selector:"footer",default:""},style:{type:"number",default:1}},save({attributes:e}){const{align:t,value:n,citation:r,style:o}=e;return(0,tt.createElement)("blockquote",{className:`blocks-quote-style-${o}`,style:{textAlign:t||null}},(0,tt.createElement)(Cj.Content,{multiline:!0,value:n}),!Cj.isEmpty(r)&&(0,tt.createElement)(Cj.Content,{tagName:"footer",value:r}))}}],eZ="web"===vb.OS;const tZ={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>Ho("core/quote",{value:u_({value:Gv(e.map((({content:e})=>Ov({html:e}))),"\u2028"),multilineTag:"p"}),anchor:e.anchor})},{type:"block",blocks:["core/heading"],transform:({content:e,anchor:t})=>Ho("core/quote",{value:`

${e}

`,anchor:t})},{type:"block",blocks:["core/pullquote"],transform:({value:e,citation:t,anchor:n})=>Ho("core/quote",{value:e,citation:t,anchor:n})},{type:"prefix",prefix:">",transform:e=>Ho("core/quote",{value:`

${e}

`})},{type:"raw",isMatch:e=>{const t=(()=>{let e=!1;return t=>"P"===t.nodeName||(e||"CITE"!==t.nodeName?void 0:(e=!0,!0))})();return"BLOCKQUOTE"===e.nodeName&&Array.from(e.childNodes).every(t)},schema:({phrasingContentSchema:e})=>({blockquote:{children:{p:{children:e},cite:{children:e}}}})}],to:[{type:"block",blocks:["core/paragraph"],transform:({value:e,citation:t})=>{const n=[];return e&&"

"!==e&&n.push(...o_(Ov({html:e,multilineTag:"p"}),"\u2028").map((e=>Ho("core/paragraph",{content:u_({value:e})})))),t&&"

"!==t&&n.push(Ho("core/paragraph",{content:t})),0===n.length?Ho("core/paragraph",{content:""}):n}},{type:"block",blocks:["core/heading"],transform:({value:e,citation:t,...n})=>{if("

"===e)return Ho("core/heading",{content:t});const r=o_(Ov({html:e,multilineTag:"p"}),"\u2028"),o=Ho("core/heading",{content:u_({value:r[0]})});if(!t&&1===r.length)return o;return[o,Ho("core/quote",{...n,citation:t,value:u_({value:r.slice(1).length?Gv(r.slice(1),"\u2028"):Ov(),multilineTag:"p"})})]}},{type:"block",blocks:["core/pullquote"],transform:({value:e,citation:t,anchor:n})=>Ho("core/pullquote",{value:e,citation:t,anchor:n})}]},nZ={apiVersion:2,name:"core/quote",title:"Quote",category:"text",description:'Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar',keywords:["blockquote","cite"],textdomain:"default",attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",__experimentalRole:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",__experimentalRole:"content"},align:{type:"string"}},supports:{anchor:!0},styles:[{name:"default",label:"Default",isDefault:!0},{name:"large",label:"Large"}],editorStyle:"wp-block-quote-editor",style:"wp-block-quote"},{name:rZ}=nZ,oZ={icon:JJ,example:{attributes:{value:"

"+er("In quoting others, we cite ourselves.")+"

",citation:"Julio Cortázar",className:"is-style-large"}},transforms:tZ,edit:function({attributes:e,setAttributes:t,isSelected:n,mergeBlocks:r,onReplace:o,className:a,insertBlocksAfter:i,style:s}){const{align:l,value:c,citation:u}=e,d=VR({className:so()(a,{[`has-text-align-${l}`]:l}),style:s});return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,{group:"block"},(0,tt.createElement)(gD,{value:l,onChange:e=>{t({align:e})}})),(0,tt.createElement)("blockquote",d,(0,tt.createElement)(Cj,{identifier:"value",multiline:!0,value:c,onChange:e=>t({value:e}),onMerge:r,onRemove:e=>{const t=!u||0===u.length;!e&&t&&o([])},"aria-label":er("Quote text"),placeholder:er("Add quote"),onReplace:o,onSplit:t=>Ho("core/quote",{...e,value:t}),__unstableOnSplitMiddle:()=>Ho("core/paragraph"),textAlign:l}),(!Cj.isEmpty(u)||n)&&(0,tt.createElement)(Cj,{identifier:"citation",tagName:eZ?"cite":void 0,style:{display:"block"},value:u,onChange:e=>t({citation:e}),__unstableMobileNoFocusOnMount:!0,"aria-label":er("Quote citation text"),placeholder:er("Add citation"),className:"wp-block-quote__citation",textAlign:l,__unstableOnSplitAtEnd:()=>i(Ho("core/paragraph"))})))},save:function({attributes:e}){const{align:t,value:n,citation:r}=e,o=so()({[`has-text-align-${t}`]:t});return(0,tt.createElement)("blockquote",VR.save({className:o}),(0,tt.createElement)(Cj.Content,{multiline:!0,value:n}),!Cj.isEmpty(r)&&(0,tt.createElement)(Cj.Content,{tagName:"cite",value:r}))},merge:(e,{value:t,citation:n})=>(n||(n=e.citation),t&&"

"!==t?{...e,value:e.value+t,citation:n}:{...e,citation:n}),deprecated:QJ},aZ=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8h-1.5zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zM4.5 4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1V12l-2.3-1.7c-.3-.2-.6-.2-.9 0l-2.9 2.1L8 11.3c-.2-.1-.5-.1-.7 0l-2.9 1.5V4.6zm0 11.8v-1.8l3.2-1.7 2.4 1.2c.2.1.5.1.8-.1l2.8-2 2.8 2v2.5c0 .1-.1.1-.1.1H4.6c0-.1-.1-.2-.1-.2z"}));function iZ(e){return Math.min(3,e.images.length)}const sZ=(e,t="large")=>{const n=(0,at.pick)(e,["alt","id","link","caption"]);n.url=(0,at.get)(e,["sizes",t,"url"])||(0,at.get)(e,["media_details","sizes",t,"source_url"])||e.url;const r=(0,at.get)(e,["sizes","full","url"])||(0,at.get)(e,["media_details","sizes","full","source_url"]);return r&&(n.fullUrl=r),n},lZ=[{attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},sizeSlug:{type:"string",default:"large"}},supports:{align:!0},isEligible:({linkTo:e})=>!e||"attachment"===e||"media"===e,migrate(e){let t=e.linkTo;return e.linkTo?"attachment"===e.linkTo?t="post":"media"===e.linkTo&&(t="file"):t="none",{...e,linkTo:t}},save({attributes:e}){const{images:t,columns:n=iZ(e),imageCrop:r,caption:o,linkTo:a}=e;return(0,tt.createElement)("figure",{className:`columns-${n} ${r?"is-cropped":""}`},(0,tt.createElement)("ul",{className:"blocks-gallery-grid"},t.map((e=>{let t;switch(a){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,tt.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,tt.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,tt.createElement)("figure",null,t?(0,tt.createElement)("a",{href:t},n):n,!Cj.isEmpty(e.caption)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!Cj.isEmpty(o)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:o}))}},{attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",default:[]},columns:{type:"number"},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},isEligible:({ids:e})=>e&&e.some((e=>"string"==typeof e)),migrate:e=>({...e,ids:(0,at.map)(e.ids,(e=>{const t=parseInt(e,10);return Number.isInteger(t)?t:null}))}),save({attributes:e}){const{images:t,columns:n=iZ(e),imageCrop:r,caption:o,linkTo:a}=e;return(0,tt.createElement)("figure",{className:`columns-${n} ${r?"is-cropped":""}`},(0,tt.createElement)("ul",{className:"blocks-gallery-grid"},t.map((e=>{let t;switch(a){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,tt.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,tt.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,tt.createElement)("figure",null,t?(0,tt.createElement)("a",{href:t},n):n,!Cj.isEmpty(e.caption)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!Cj.isEmpty(o)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:o}))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){const{images:t,columns:n=iZ(e),imageCrop:r,linkTo:o}=e;return(0,tt.createElement)("ul",{className:`columns-${n} ${r?"is-cropped":""}`},t.map((e=>{let t;switch(o){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const n=(0,tt.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,tt.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,tt.createElement)("figure",null,t?(0,tt.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",value:e.caption})))})))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"array",source:"children",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible:({images:e,ids:t})=>e&&e.length>0&&(!t&&e||t&&e&&t.length!==e.length||(0,at.some)(e,((e,n)=>!e&&null!==t[n]||parseInt(e,10)!==t[n]))),migrate:e=>({...e,ids:(0,at.map)(e.images,(({id:e})=>e?parseInt(e,10):null))}),supports:{align:!0},save({attributes:e}){const{images:t,columns:n=iZ(e),imageCrop:r,linkTo:o}=e;return(0,tt.createElement)("ul",{className:`columns-${n} ${r?"is-cropped":""}`},t.map((e=>{let t;switch(o){case"media":t=e.url;break;case"attachment":t=e.link}const n=(0,tt.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,tt.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,tt.createElement)("figure",null,t?(0,tt.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",value:e.caption})))})))}},{attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){const{images:t,columns:n=iZ(e),align:r,imageCrop:o,linkTo:a}=e,i=so()(`columns-${n}`,{alignnone:"none"===r,"is-cropped":o});return(0,tt.createElement)("div",{className:i},t.map((e=>{let t;switch(a){case"media":t=e.url;break;case"attachment":t=e.link}const n=(0,tt.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return(0,tt.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?(0,tt.createElement)("a",{href:t},n):n)})))}}];function cZ(e){return{type:"SET_IS_MATCHING",values:e}}function uZ(e,t){return-1===t.indexOf(" ")&&(t=">= "+t),!!e[t]}const dZ=Jt("core/viewport",{reducer:function(e={},t){switch(t.type){case"SET_IS_MATCHING":return t.values}return e},actions:S,selectors:C});an(dZ);const pZ=e=>ni((t=>JA((n=>{const r=(0,at.mapValues)(e,(e=>{let[t,n]=e.split(" ");return void 0===n&&(n=t,t=">="),Gp(n,t)}));return(0,tt.createElement)(t,ot({},n,r))}))),"withViewportMatch");((e,t)=>{const n=(0,at.debounce)((()=>{const e=(0,at.mapValues)(r,(e=>e.matches));nn(dZ).setIsMatching(e)}),{leading:!0}),r=(0,at.reduce)(e,((e,r,o)=>((0,at.forEach)(t,((t,a)=>{const i=window.matchMedia(`(${t}: ${r}px)`);i.addListener(n);const s=[a,o].join(" ");e[s]=i})),e)),{});window.addEventListener("orientationchange",n),n(),n.flush()})({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},{"<":"max-width",">=":"min-width"});const mZ="div",hZ=(0,tt.createElement)(MB,{icon:aZ}),fZ="none",gZ="file",bZ="post";class yZ extends tt.Component{constructor(){super(...arguments),this.onSelectImage=this.onSelectImage.bind(this),this.onRemoveImage=this.onRemoveImage.bind(this),this.bindContainer=this.bindContainer.bind(this),this.onEdit=this.onEdit.bind(this),this.onSelectImageFromLibrary=this.onSelectImageFromLibrary.bind(this),this.onSelectCustomURL=this.onSelectCustomURL.bind(this),this.state={isEditing:!1}}bindContainer(e){this.container=e}onSelectImage(){this.props.isSelected||this.props.onSelect()}onRemoveImage(e){this.container===this.container.ownerDocument.activeElement&&this.props.isSelected&&-1!==[tm,lm].indexOf(e.keyCode)&&(e.preventDefault(),this.props.onRemove())}onEdit(){this.setState({isEditing:!0})}componentDidUpdate(){const{image:e,url:t,__unstableMarkNextChangeAsNotPersistent:n}=this.props;e&&!t&&(n(),this.props.setAttributes({url:e.source_url,alt:e.alt_text}))}deselectOnBlur(){this.props.onDeselect()}onSelectImageFromLibrary(e){const{setAttributes:t,id:n,url:r,alt:o,caption:a,sizeSlug:i}=this.props;if(!e||!e.url)return;let s=sZ(e,i);((e,t)=>!e&&Js(t))(n,r)&&o&&(s=(0,at.omit)(s,["alt"])),a&&!(0,at.get)(s,["caption"])&&(s=(0,at.omit)(s,["caption"])),t(s),this.setState({isEditing:!1})}onSelectCustomURL(e){const{setAttributes:t,url:n}=this.props;e!==n&&(t({url:e,id:void 0}),this.setState({isEditing:!1}))}render(){const{url:e,alt:t,id:n,linkTo:r,link:o,isFirstItem:a,isLastItem:i,isSelected:s,caption:l,onRemove:c,onMoveForward:u,onMoveBackward:d,setAttributes:p,"aria-label":m}=this.props,{isEditing:h}=this.state;let f;switch(r){case gZ:f=e;break;case bZ:f=o}const g=(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)("img",{src:e,alt:t,"data-id":n,onKeyDown:this.onRemoveImage,tabIndex:"0","aria-label":m,ref:this.bindContainer}),Js(e)&&(0,tt.createElement)(cq,null)),b=so()({"is-selected":s,"is-transient":Js(e)});return(0,tt.createElement)("figure",{className:b,onClick:this.onSelectImage,onFocus:this.onSelectImage},!h&&(f?(0,tt.createElement)("a",{href:f},g):g),h&&(0,tt.createElement)(oj,{labels:{title:er("Edit gallery image")},icon:PK,onSelect:this.onSelectImageFromLibrary,onSelectURL:this.onSelectCustomURL,accept:"image/*",allowedTypes:["image"],value:{id:n,src:e}}),(0,tt.createElement)(GA,{className:"block-library-gallery-item__inline-menu is-left"},(0,tt.createElement)(wf,{icon:jB,onClick:a?void 0:d,label:er("Move image backward"),"aria-disabled":a,disabled:!s}),(0,tt.createElement)(wf,{icon:qB,onClick:i?void 0:u,label:er("Move image forward"),"aria-disabled":i,disabled:!s})),(0,tt.createElement)(GA,{className:"block-library-gallery-item__inline-menu is-right"},(0,tt.createElement)(wf,{icon:Qq,onClick:this.onEdit,label:er("Replace image"),disabled:!s}),(0,tt.createElement)(wf,{icon:gP,onClick:c,label:er("Remove image"),disabled:!s})),!h&&(s||l)&&(0,tt.createElement)(Cj,{tagName:"figcaption","aria-label":er("Image caption text"),placeholder:s?er("Add caption"):null,value:l,onChange:e=>p({caption:e}),inlineToolbar:!0}))}}const vZ=lS([ZI(((e,t)=>{const{getMedia:n}=e(yd),{id:r}=t;return{image:r?n(parseInt(r,10)):null}})),eP((e=>{const{__unstableMarkNextChangeAsNotPersistent:t}=e(nk);return{__unstableMarkNextChangeAsNotPersistent:t}}))])(yZ);function _Z({isHidden:e,...t}){return e?(0,tt.createElement)(Mf,ot({as:Cj},t)):(0,tt.createElement)(Cj,t)}const MZ=e=>{const{attributes:t,isSelected:n,setAttributes:r,selectedImage:o,mediaPlaceholder:a,onMoveBackward:i,onMoveForward:s,onRemoveImage:l,onSelectImage:c,onDeselectImage:u,onSetImageAttributes:d,insertBlocksAfter:p,blockProps:m}=e,{align:h,columns:f=iZ(t),caption:g,imageCrop:b,images:y}=t;return(0,tt.createElement)("figure",ot({},m,{className:so()(m.className,{[`align${h}`]:h,[`columns-${f}`]:f,"is-cropped":b})}),(0,tt.createElement)("ul",{className:"blocks-gallery-grid"},y.map(((e,r)=>{const a=pn(er("image %1$d of %2$d in gallery"),r+1,y.length);return(0,tt.createElement)("li",{className:"blocks-gallery-item",key:e.id?`${e.id}-${r}`:e.url},(0,tt.createElement)(vZ,{url:e.url,alt:e.alt,id:e.id,isFirstItem:0===r,isLastItem:r+1===y.length,isSelected:n&&o===r,onMoveBackward:i(r),onMoveForward:s(r),onRemove:l(r),onSelect:c(r),onDeselect:u(r),setAttributes:e=>d(r,e),caption:e.caption,"aria-label":a,sizeSlug:t.sizeSlug}))}))),a,(0,tt.createElement)(_Z,{isHidden:!n&&Cj.isEmpty(g),tagName:"figcaption",className:"blocks-gallery-caption","aria-label":er("Gallery caption text"),placeholder:er("Write gallery caption…"),value:g,onChange:e=>r({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>p(Ho("core/paragraph"))}))},kZ=[{value:bZ,label:er("Attachment Page")},{value:gZ,label:er("Media File")},{value:fZ,label:er("None")}],wZ=["image"],EZ=vb.select({web:er("Drag images, upload new ones or select files from your library."),native:er("ADD MEDIA")}),LZ=vb.select({web:{},native:{type:"stepper"}});const AZ=lS([YK,pZ({isNarrow:"< small"})])((function(e){const{attributes:t,clientId:n,isSelected:r,noticeUI:o,noticeOperations:a,onFocus:i}=e,{columns:s=iZ(t),imageCrop:l,images:c,linkTo:u,sizeSlug:d}=t,[p,m]=(0,tt.useState)(),[h,f]=(0,tt.useState)(),{__unstableMarkNextChangeAsNotPersistent:g}=sd(nk),{imageSizes:b,mediaUpload:y,getMedia:v,wasBlockJustInserted:_}=Cl((e=>{const t=e(nk).getSettings();return{imageSizes:t.imageSizes,mediaUpload:t.mediaUpload,getMedia:e(yd).getMedia,wasBlockJustInserted:e(nk).wasBlockJustInserted(n,"inserter_menu")}})),M=(0,tt.useMemo)((()=>r?(0,at.reduce)(t.ids,((e,t)=>{if(!t)return e;const n=v(t),r=(0,at.reduce)(b,((e,t)=>{const r=(0,at.get)(n,["sizes",t.slug,"url"]),o=(0,at.get)(n,["media_details","sizes",t.slug,"source_url"]);return{...e,[t.slug]:r||o}}),{});return{...e,[parseInt(t,10)]:r}}),{}):{}),[r,t.ids,b]);function k(t){if(t.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');t.images&&(t={...t,ids:(0,at.map)(t.images,(({id:e})=>parseInt(e,10)))}),e.setAttributes(t)}function w(e,t){const n=[...c];n.splice(t,1,c[e]),n.splice(e,1,c[t]),m(t),k({images:n})}function E(e){const t=(0,at.toString)(e.id),n=(0,at.find)(c,{id:t}),r=n?n.caption:e.caption;if(!h)return r;const o=(0,at.find)(h,{id:t});return o&&o.caption!==e.caption?e.caption:r}function L(e){f(e.map((e=>({id:(0,at.toString)(e.id),caption:e.caption})))),k({images:e.map((e=>({...sZ(e,d),caption:E(e),id:(0,at.toString)(e.id)}))),columns:t.columns?Math.min(e.length,t.columns):t.columns})}(0,tt.useEffect)((()=>{if("web"===vb.OS&&c&&c.length>0&&(0,at.every)(c,(({url:e})=>Js(e)))){const e=(0,at.map)(c,(({url:e})=>Ks(e)));(0,at.forEach)(c,(({url:e})=>Gs(e))),y({filesList:e,onFileChange:L,allowedTypes:["image"]})}}),[]),(0,tt.useEffect)((()=>{r||m()}),[r]),(0,tt.useEffect)((()=>{var e,t,n,r,o,a;u||(g(),k({linkTo:(null===(e=window)||void 0===e||null===(t=e.wp)||void 0===t||null===(n=t.media)||void 0===n||null===(r=n.view)||void 0===r||null===(o=r.settings)||void 0===o||null===(a=o.defaultProps)||void 0===a?void 0:a.link)||fZ}))}),[u]);const A=!!c.length,S=A&&c.some((e=>!!e.id)),C=(0,tt.createElement)(oj,{addToGallery:S,isAppender:A,disableMediaButtons:A&&!r,icon:!A&&hZ,labels:{title:!A&&er("Gallery"),instructions:!A&&EZ},onSelect:L,accept:"image/*",allowedTypes:wZ,multiple:!0,value:S?c:{},onError:function(e){a.removeAllNotices(),a.createErrorNotice(e)},notices:A?void 0:o,onFocus:i,autoOpenMediaUpload:!A&&r&&_}),T=VR();if(!A)return(0,tt.createElement)(mZ,T,C);const x=(0,at.map)((0,at.filter)(b,(({slug:e})=>(0,at.some)(M,(t=>t[e])))),(({name:e,slug:t})=>({value:t,label:e}))),z=A&&!(0,at.isEmpty)(x);return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("Gallery settings")},c.length>1&&(0,tt.createElement)(rT,ot({label:er("Columns"),value:s,onChange:function(e){k({columns:e})},min:1,max:Math.min(8,c.length)},LZ,{required:!0})),(0,tt.createElement)(KN,{label:er("Crop images"),checked:!!l,onChange:function(){k({imageCrop:!l})},help:function(e){return er(e?"Thumbnails are cropped to align.":"Thumbnails are not cropped.")}}),(0,tt.createElement)(KS,{label:er("Link to"),value:u,onChange:function(e){k({linkTo:e})},options:kZ,hideCancelButton:!0}),z&&(0,tt.createElement)(KS,{label:er("Image size"),value:d,options:x,onChange:function(e){k({images:(0,at.map)(c,(t=>{if(!t.id)return t;const n=(0,at.get)(M,[parseInt(t.id,10),e]);return{...t,...n&&{url:n}}})),sizeSlug:e})},hideCancelButton:!0}))),o,(0,tt.createElement)(MZ,ot({},e,{selectedImage:p,mediaPlaceholder:C,onMoveBackward:function(e){return()=>{0!==e&&w(e,e-1)}},onMoveForward:function(e){return()=>{e!==c.length-1&&w(e,e+1)}},onRemoveImage:function(e){return()=>{const n=(0,at.filter)(c,((t,n)=>e!==n));m(),k({images:n,columns:t.columns?Math.min(n.length,t.columns):t.columns})}},onSelectImage:function(e){return()=>{m(e)}},onDeselectImage:function(){return()=>{m()}},onSetImageAttributes:function(e,t){c[e]&&k({images:[...c.slice(0,e),{...c[e],...t},...c.slice(e+1)]})},blockProps:T,onFocusGalleryCaption:function(){m()}})))}));const SZ=e=>e?e.split(",").map((e=>parseInt(e,10))):[],CZ={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t,sizeSlug:n}=e[0];t=(0,at.every)(e,["align",t])?t:void 0,n=(0,at.every)(e,["sizeSlug",n])?n:void 0;const r=(0,at.filter)(e,(({url:e})=>e));return Ho("core/gallery",{images:r.map((({id:e,url:t,alt:n,caption:r})=>({id:(0,at.toString)(e),url:t,alt:n,caption:r}))),ids:r.map((({id:e})=>parseInt(e,10))),align:t,sizeSlug:n})}},{type:"shortcode",tag:"gallery",attributes:{images:{type:"array",shortcode:({named:{ids:e}})=>SZ(e).map((e=>({id:(0,at.toString)(e)})))},ids:{type:"array",shortcode:({named:{ids:e}})=>SZ(e)},columns:{type:"number",shortcode:({named:{columns:e="3"}})=>parseInt(e,10)},linkTo:{type:"string",shortcode:({named:{link:e="post"}})=>e}},isMatch:({named:e})=>void 0!==e.ids},{type:"files",isMatch:e=>1!==e.length&&(0,at.every)(e,(e=>0===e.type.indexOf("image/"))),transform:e=>Ho("core/gallery",{images:e.map((e=>sZ({url:$s(e)})))})}],to:[{type:"block",blocks:["core/image"],transform:({images:e,align:t,sizeSlug:n,ids:r})=>e.length>0?e.map((({url:e,alt:o,caption:a},i)=>Ho("core/image",{id:r[i],url:e,alt:o,caption:a,align:t,sizeSlug:n}))):Ho("core/image",{align:t})}]},TZ={apiVersion:2,name:"core/gallery",title:"Gallery",category:"media",description:"Display multiple images in a rich gallery.",keywords:["images","photos"],textdomain:"default",attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"}},supports:{anchor:!0,align:!0},editorStyle:"wp-block-gallery-editor",style:"wp-block-gallery"},{name:xZ}=TZ,zZ={icon:aZ,example:{attributes:{columns:2,images:[{url:"https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"},{url:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"}]}},transforms:CZ,edit:AZ,save:function({attributes:e}){const{images:t,columns:n=iZ(e),imageCrop:r,caption:o,linkTo:a}=e,i=`columns-${n} ${r?"is-cropped":""}`;return(0,tt.createElement)("figure",VR.save({className:i}),(0,tt.createElement)("ul",{className:"blocks-gallery-grid"},t.map((e=>{let t;switch(a){case gZ:t=e.fullUrl||e.url;break;case bZ:t=e.link}const n=(0,tt.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,tt.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},(0,tt.createElement)("figure",null,t?(0,tt.createElement)("a",{href:t},n):n,!Cj.isEmpty(e.caption)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})))}))),!Cj.isEmpty(o)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:o}))},deprecated:lZ},OZ=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5zM8 12.8h8v-1.5H8v1.5zm0 3h8v-1.5H8v1.5z"}));function NZ({className:e}){return(0,tt.createElement)(yH,{className:e},er("Block rendered as empty."))}function DZ({response:e,className:t}){const n=pn(er("Error loading block: %s"),e.errorMsg);return(0,tt.createElement)(yH,{className:t},n)}function BZ({className:e}){return(0,tt.createElement)(yH,{className:e},(0,tt.createElement)(cq,null))}function IZ(e){const{attributes:t,block:n,className:r,httpMethod:o="GET",urlQueryArgs:a,EmptyResponsePlaceholder:i=NZ,ErrorResponsePlaceholder:s=DZ,LoadingResponsePlaceholder:l=BZ}=e,c=(0,tt.useRef)(!0),u=(0,tt.useRef)(),[d,p]=(0,tt.useState)(null),m=AG(e);function h(){if(!c.current)return;null!==d&&p(null);const e=t&&ko(n,t),r="POST"===o,i=function(e,t=null,n={}){return Il(`/wp/v2/block-renderer/${e}`,{context:"edit",...null!==t?{attributes:t}:{},...n})}(n,r?null:null!=e?e:null,a),s=r?{attributes:null!=e?e:null}:null,l=u.current=Ql({path:i,data:s,method:r?"POST":"GET"}).then((e=>{c.current&&l===u.current&&e&&p(e.rendered)})).catch((e=>{c.current&&l===u.current&&p({error:!0,errorMsg:e.message})}));return l}const f=qp(h,500);return(0,tt.useEffect)((()=>()=>{c.current=!1}),[]),(0,tt.useEffect)((()=>{void 0===m?h():(0,at.isEqual)(m,e)||f()})),""===d?(0,tt.createElement)(i,e):d?d.error?(0,tt.createElement)(s,ot({response:d},e)):(0,tt.createElement)(Ia,{className:r},d):(0,tt.createElement)(l,e)}const PZ={},RZ=ZI((e=>{const t=e("core/editor");if(t){const e=t.getCurrentPostId();if(e&&"number"==typeof e)return{currentPostId:e}}return PZ}))((({urlQueryArgs:e=PZ,currentPostId:t,...n})=>{const r=(0,tt.useMemo)((()=>t?{post_id:t,...e}:e),[t,e]);return(0,tt.createElement)(IZ,ot({urlQueryArgs:r},n))}));window&&window.wp&&window.wp.components&&(window.wp.components.ServerSideRender=(0,tt.forwardRef)(((e,t)=>(Hp("wp.components.ServerSideRender",{since:"5.3",alternative:"wp.serverSideRender"}),(0,tt.createElement)(RZ,ot({},e,{ref:t}))))));const WZ=RZ;const YZ={apiVersion:2,name:"core/archives",title:"Archives",category:"widgets",description:"Display a monthly archive of your posts.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1}},supports:{align:!0,html:!1},editorStyle:"wp-block-archives-editor"},{name:HZ}=YZ,qZ={icon:OZ,example:{},edit:function({attributes:e,setAttributes:t}){const{showPostCounts:n,displayAsDropdown:r}=e;return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("Archives settings")},(0,tt.createElement)(KN,{label:er("Display as dropdown"),checked:r,onChange:()=>t({displayAsDropdown:!r})}),(0,tt.createElement)(KN,{label:er("Show post counts"),checked:n,onChange:()=>t({showPostCounts:!n})}))),(0,tt.createElement)("div",VR(),(0,tt.createElement)(jP,null,(0,tt.createElement)(WZ,{block:"core/archives",attributes:e}))))}},jZ=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})),FZ=[{attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{align:!0},save({attributes:e}){const{autoplay:t,caption:n,loop:r,preload:o,src:a}=e;return(0,tt.createElement)("figure",null,(0,tt.createElement)("audio",{controls:"controls",src:a,autoPlay:t,loop:r,preload:o}),!Cj.isEmpty(n)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",value:n}))}}],VZ=["audio"];const XZ=YK((function({attributes:e,noticeOperations:t,setAttributes:n,onReplace:r,isSelected:o,noticeUI:a,insertBlocksAfter:i}){const{id:s,autoplay:l,caption:c,loop:u,preload:d,src:p}=e,m=VR(),h=Cl((e=>{const{getSettings:t}=e(nk);return t().mediaUpload}),[]);function f(e){return t=>{n({[e]:t})}}function g(e){if(e!==p){const t=IG({attributes:{url:e}});if(void 0!==t)return void r(t);n({src:e,id:void 0})}}function b(e){t.removeAllNotices(),t.createErrorNotice(e)}function y(e){e&&e.url?n({src:e.url,id:e.id}):n({src:void 0,id:void 0})}return(0,tt.useEffect)((()=>{if(!s&&Js(p)){const e=Ks(p);e&&h({filesList:[e],onFileChange:([{id:e,url:t}])=>{n({id:e,src:t})},onError:e=>{n({src:void 0,id:void 0}),t.createErrorNotice(e)},allowedTypes:VZ})}}),[]),p?(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,{group:"other"},(0,tt.createElement)(Jq,{mediaId:s,mediaURL:p,allowedTypes:VZ,accept:"audio/*",onSelect:y,onSelectURL:g,onError:b})),(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("Audio settings")},(0,tt.createElement)(KN,{label:er("Autoplay"),onChange:f("autoplay"),checked:l,help:function(e){return e?er("Autoplay may cause usability issues for some users."):null}}),(0,tt.createElement)(KN,{label:er("Loop"),onChange:f("loop"),checked:u}),(0,tt.createElement)(KS,{label:er("Preload"),value:d||"",onChange:e=>n({preload:e||void 0}),options:[{value:"",label:er("Browser default")},{value:"auto",label:er("Auto")},{value:"metadata",label:er("Metadata")},{value:"none",label:er("None")}]}))),(0,tt.createElement)("figure",m,(0,tt.createElement)(jP,{isDisabled:!o},(0,tt.createElement)("audio",{controls:"controls",src:p})),(!Cj.isEmpty(c)||o)&&(0,tt.createElement)(Cj,{tagName:"figcaption","aria-label":er("Audio caption text"),placeholder:er("Add caption"),value:c,onChange:e=>n({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>i(Ho("core/paragraph"))}))):(0,tt.createElement)("div",m,(0,tt.createElement)(oj,{icon:(0,tt.createElement)(MB,{icon:jZ}),onSelect:y,onSelectURL:g,accept:"audio/*",allowedTypes:VZ,value:e,notices:a,onError:b}))}));const UZ={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("audio/"),transform:e=>Ho("core/audio",{src:$s(e[0])})},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:({named:{src:e,mp3:t,m4a:n,ogg:r,wav:o,wma:a}})=>e||t||n||r||o||a},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}}]},$Z={apiVersion:2,name:"core/audio",title:"Audio",category:"media",description:"Embed a simple audio player.",keywords:["music","sound","podcast","recording"],textdomain:"default",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{anchor:!0,align:!0},editorStyle:"wp-block-audio-editor",style:"wp-block-audio"},{name:KZ}=$Z,GZ={icon:jZ,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"}},transforms:UZ,deprecated:FZ,edit:XZ,save:function({attributes:e}){const{autoplay:t,caption:n,loop:r,preload:o,src:a}=e;return a&&(0,tt.createElement)("figure",VR.save(),(0,tt.createElement)("audio",{controls:"controls",src:a,autoPlay:t,loop:r,preload:o}),!Cj.isEmpty(n)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",value:n}))}},JZ=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M17 3H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5V6.2h-5v1.6zM17 13H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5v-1.5h-5v1.5z"})),ZZ=[{supports:{align:["center","left","right"],anchor:!0},save:()=>(0,tt.createElement)("div",null,(0,tt.createElement)(JH.Content,null)),isEligible:({align:e})=>e&&["center","left","right"].includes(e),migrate:e=>({...e,align:void 0,contentJustification:e.align})}],{name:QZ}={apiVersion:2,name:"core/buttons",title:"Buttons",category:"design",description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",attributes:{contentJustification:{type:"string"},orientation:{type:"string",default:"horizontal"}},supports:{anchor:!0,align:["wide","full"]},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},eQ={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>Ho(QZ,{},e.map((e=>Ho("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>Ho(QZ,{},e.map((e=>{const t=Av(document,e.content),n=t.innerText||"",r=t.querySelector("a");return Ho("core/button",{text:n,url:null==r?void 0:r.getAttribute("href")})}))),isMatch:e=>e.every((e=>{const t=Av(document,e.content),n=t.innerText||"",r=t.querySelectorAll("a");return n.length<=30&&r.length<=1}))}]},tQ=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"})),nQ=e=>{var t,n,r;const{borderRadius:o,...a}=e,i=[o,null===(t=a.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius].find((e=>"number"==typeof e&&0!==e));return i?{...a,style:{...a.style,border:{...null===(r=a.style)||void 0===r?void 0:r.border,radius:`${i}px`}}}:a},rQ=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customGradient)return e;const t={color:{}};return e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customGradient&&(t.color.gradient=e.customGradient),{...(0,at.omit)(e,["customTextColor","customBackgroundColor","customGradient"]),style:t}},oQ=e=>rQ((0,at.omit)({...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0},["color","textColor"])),aQ={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"}},iQ=[{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...aQ,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},isEligible({style:e}){var t;return"number"==typeof(null==e||null===(t=e.border)||void 0===t?void 0:t.radius)},save({attributes:e,className:t}){var n,r,o;const{fontSize:a,linkTarget:i,rel:s,style:l,text:c,title:u,url:d,width:p}=e;if(!c)return null;const m=null==l||null===(n=l.border)||void 0===n?void 0:n.radius,h=aD(e),f=so()("wp-block-button__link",h.className,{"no-border-radius":0===(null==l||null===(r=l.border)||void 0===r?void 0:r.radius)}),g={borderRadius:m||void 0,...h.style},b=so()(t,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":a||(null==l||null===(o=l.typography)||void 0===o?void 0:o.fontSize)});return(0,tt.createElement)("div",VR.save({className:b}),(0,tt.createElement)(Cj.Content,{tagName:"a",className:f,href:d,title:u,style:g,value:c,target:i,rel:s}))},migrate:nQ},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...aQ,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save({attributes:e,className:t}){const{borderRadius:n,linkTarget:r,rel:o,text:a,title:i,url:s,width:l}=e,c=aD(e),u=so()("wp-block-button__link",c.className,{"no-border-radius":0===n}),d={borderRadius:n?n+"px":void 0,...c.style},p=so()(t,{[`has-custom-width wp-block-button__width-${l}`]:l});return(0,tt.createElement)("div",VR.save({className:p}),(0,tt.createElement)(Cj.Content,{tagName:"a",className:u,href:s,title:i,style:d,value:a,target:r,rel:o}))},migrate:nQ},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...aQ,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save({attributes:e,className:t}){const{borderRadius:n,linkTarget:r,rel:o,text:a,title:i,url:s,width:l}=e,c=aD(e),u=so()("wp-block-button__link",c.className,{"no-border-radius":0===n}),d={borderRadius:n?n+"px":void 0,...c.style},p=so()(t,{[`has-custom-width wp-block-button__width-${l}`]:l});return(0,tt.createElement)("div",VR.save({className:p}),(0,tt.createElement)(Cj.Content,{tagName:"a",className:u,href:s,title:i,style:d,value:a,target:r,rel:o}))},migrate:nQ},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...aQ,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},save({attributes:e}){const{borderRadius:t,linkTarget:n,rel:r,text:o,title:a,url:i}=e,s=so()("wp-block-button__link",{"no-border-radius":0===t}),l={borderRadius:t?t+"px":void 0};return(0,tt.createElement)(Cj.Content,{tagName:"a",className:s,href:i,title:a,style:l,value:o,target:n,rel:r})},migrate:nQ},{supports:{align:!0,alignWide:!1},attributes:{...aQ,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},customGradient:{type:"string"},gradient:{type:"string"}},isEligible:e=>!!e.customTextColor||!!e.customBackgroundColor||!!e.customGradient,migrate:lS(nQ,rQ),save({attributes:e}){const{backgroundColor:t,borderRadius:n,customBackgroundColor:r,customTextColor:o,customGradient:a,linkTarget:i,gradient:s,rel:l,text:c,textColor:u,title:d,url:p}=e,m=mC("color",u),h=!a&&mC("background-color",t),f=fC(s),g=so()("wp-block-button__link",{"has-text-color":u||o,[m]:m,"has-background":t||r||a||s,[h]:h,"no-border-radius":0===n,[f]:f}),b={background:a||void 0,backgroundColor:h||a||s?void 0:r,color:m?void 0:o,borderRadius:n?n+"px":void 0};return(0,tt.createElement)("div",null,(0,tt.createElement)(Cj.Content,{tagName:"a",className:g,href:p,title:d,style:b,value:c,target:i,rel:l}))}},{attributes:{...aQ,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"}},isEligible:e=>e.className&&e.className.includes("is-style-squared"),migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),nQ(rQ({...e,className:t||void 0,borderRadius:0}))},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,customTextColor:r,linkTarget:o,rel:a,text:i,textColor:s,title:l,url:c}=e,u=mC("color",s),d=mC("background-color",t),p=so()("wp-block-button__link",{"has-text-color":s||r,[u]:u,"has-background":t||n,[d]:d}),m={backgroundColor:d?void 0:n,color:u?void 0:r};return(0,tt.createElement)("div",null,(0,tt.createElement)(Cj.Content,{tagName:"a",className:p,href:c,title:l,style:m,value:i,target:o,rel:a}))}},{attributes:{...aQ,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:oQ,save({attributes:e}){const{url:t,text:n,title:r,backgroundColor:o,textColor:a,customBackgroundColor:i,customTextColor:s}=e,l=mC("color",a),c=mC("background-color",o),u=so()("wp-block-button__link",{"has-text-color":a||s,[l]:l,"has-background":o||i,[c]:c}),d={backgroundColor:c?void 0:i,color:l?void 0:s};return(0,tt.createElement)("div",null,(0,tt.createElement)(Cj.Content,{tagName:"a",className:u,href:t,title:r,style:d,value:n}))}},{attributes:{...aQ,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:n,title:r,align:o,color:a,textColor:i}=e,s={backgroundColor:a,color:i};return(0,tt.createElement)("div",{className:`align${o}`},(0,tt.createElement)(Cj.Content,{tagName:"a",className:"wp-block-button__link",href:t,title:r,style:s,value:n}))},migrate:oQ},{attributes:{...aQ,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:n,title:r,align:o,color:a,textColor:i}=e;return(0,tt.createElement)("div",{className:`align${o}`,style:{backgroundColor:a}},(0,tt.createElement)(Cj.Content,{tagName:"a",href:t,title:r,style:{color:i},value:n}))},migrate:oQ}],sQ="noreferrer noopener";function lQ({selectedWidth:e,setAttributes:t}){return(0,tt.createElement)(BA,{title:er("Width settings")},(0,tt.createElement)(GA,{"aria-label":er("Button width")},[25,50,75,100].map((n=>(0,tt.createElement)(wf,{key:n,isSmall:!0,variant:n===e?"primary":void 0,onClick:()=>{var r;t({width:e===(r=n)?void 0:r})}},n,"%")))))}function cQ({isSelected:e,url:t,setAttributes:n,opensInNewTab:r,onToggleOpenInNewTab:o,anchorRef:a}){const[i,s]=(0,tt.useState)(!1),l=!!t,c=l&&e,u=()=>(s(!0),!1),d=()=>{n({url:void 0,linkTarget:void 0,rel:void 0}),s(!1)},p=(i||c)&&(0,tt.createElement)(yh,{position:"bottom center",onClose:()=>s(!1),anchorRef:null==a?void 0:a.current},(0,tt.createElement)(Vq,{className:"wp-block-navigation-link__inline-link-input",value:{url:t,opensInNewTab:r},onChange:({url:e="",opensInNewTab:t})=>{n({url:e}),r!==t&&o(t)}}));return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,{group:"block"},!l&&(0,tt.createElement)(qg,{name:"link",icon:dT,title:er("Link"),shortcut:gm.primary("k"),onClick:u}),c&&(0,tt.createElement)(qg,{name:"link",icon:pT,title:er("Unlink"),shortcut:gm.primaryShift("k"),onClick:d,isActive:!0})),e&&(0,tt.createElement)(aS,{bindGlobal:!0,shortcuts:{[hm.primary("k")]:u,[hm.primaryShift("k")]:d}}),p)}const uQ=function(e){var t;const{attributes:n,setAttributes:r,className:o,isSelected:a,onReplace:i,mergeBlocks:s}=e,{linkTarget:l,placeholder:c,rel:u,style:d,text:p,url:m,width:h}=n,f=(0,tt.useCallback)((e=>{r({rel:e})}),[r]),g=(0,tt.useCallback)((e=>{const t=e?"_blank":void 0;let n=u;t&&!u?n=sQ:t||u!==sQ||(n=void 0),r({linkTarget:t,rel:n})}),[u,r]),b=rD(n),y=iD(n),v=(0,tt.useRef)(),_=VR({ref:v});return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)("div",ot({},_,{className:so()(_.className,{[`has-custom-width wp-block-button__width-${h}`]:h,"has-custom-font-size":_.style.fontSize})}),(0,tt.createElement)(Cj,{"aria-label":er("Button text"),placeholder:c||er("Add text…"),value:p,onChange:e=>{r({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:so()(o,"wp-block-button__link",y.className,b.className,{"no-border-radius":0===(null==d||null===(t=d.border)||void 0===t?void 0:t.radius)}),style:{...b.style,...y.style},onSplit:e=>Ho("core/button",{...n,text:e}),onReplace:i,onMerge:s,identifier:"text"})),(0,tt.createElement)(cQ,{url:m,setAttributes:r,isSelected:a,opensInNewTab:"_blank"===l,onToggleOpenInNewTab:g,anchorRef:v}),(0,tt.createElement)(FA,null,(0,tt.createElement)(lQ,{selectedWidth:h,setAttributes:r})),(0,tt.createElement)(YA,null,(0,tt.createElement)(LA,{label:er("Link rel"),value:u||"",onChange:f})))};const dQ={apiVersion:2,name:"core/button",title:"Button",category:"design",parent:["core/buttons"],description:"Prompt visitors to take action with a button-style link.",keywords:["link"],textdomain:"default",attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wp-block-button__link"},styles:[{name:"fill",label:"Fill",isDefault:!0},{name:"outline",label:"Outline"}],editorStyle:"wp-block-button-editor",style:"wp-block-button"},{name:pQ}=dQ,mQ={icon:tQ,example:{attributes:{className:"is-style-fill",text:er("Call to Action")}},edit:uQ,save:function({attributes:e,className:t}){var n,r;const{fontSize:o,linkTarget:a,rel:i,style:s,text:l,title:c,url:u,width:d}=e;if(!l)return null;const p=nD(e),m=aD(e),h=so()("wp-block-button__link",m.className,p.className,{"no-border-radius":0===(null==s||null===(n=s.border)||void 0===n?void 0:n.radius)}),f={...p.style,...m.style},g=so()(t,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":o||(null==s||null===(r=s.typography)||void 0===r?void 0:r.fontSize)});return(0,tt.createElement)("div",VR.save({className:g}),(0,tt.createElement)(Cj.Content,{tagName:"a",className:h,href:u,title:c,style:f,value:l,target:a,rel:i}))},deprecated:iQ,merge:(e,{text:t=""})=>({...e,text:(e.text||"")+t})},hQ=[pQ],fQ={type:"default",alignments:[]},gQ=["left","center","right"],bQ=["left","center","right","space-between"];const yQ=function({attributes:{contentJustification:e,orientation:t},setAttributes:n}){const r=VR({className:so()({[`is-content-justification-${e}`]:e,"is-vertical":"vertical"===t})}),o=Cl((e=>{var t;const n=e(nk).getSettings().__experimentalPreferredStyleVariations;return null==n||null===(t=n.value)||void 0===t?void 0:t[pQ]}),[]),a=GH(r,{allowedBlocks:hQ,template:[[pQ,{className:o&&`is-style-${o}`}]],orientation:t,__experimentalLayout:fQ,templateInsertUpdatesSelection:!0}),i="vertical"===t?gQ:bQ;return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,{group:"block"},(0,tt.createElement)(oq,{allowedControls:i,value:e,onChange:e=>n({contentJustification:e}),popoverProps:{position:"bottom right",isAlternate:!0}})),(0,tt.createElement)("div",a))};const vQ=[{name:"buttons-horizontal",isDefault:!0,title:er("Horizontal"),description:er("Buttons shown in a row."),attributes:{orientation:"horizontal"},scope:["transform"]},{name:"buttons-vertical",title:er("Vertical"),description:er("Buttons shown in a column."),attributes:{orientation:"vertical"},scope:["transform"]}],_Q={apiVersion:2,name:"core/buttons",title:"Buttons",category:"design",description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",attributes:{contentJustification:{type:"string"},orientation:{type:"string",default:"horizontal"}},supports:{anchor:!0,align:["wide","full"]},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},{name:MQ}=_Q,kQ={icon:JZ,example:{innerBlocks:[{name:"core/button",attributes:{text:er("Find out more")}},{name:"core/button",attributes:{text:er("Contact us")}}]},deprecated:ZZ,transforms:eQ,edit:yQ,save:function({attributes:{contentJustification:e,orientation:t}}){return(0,tt.createElement)("div",VR.save({className:so()({[`is-content-justification-${e}`]:e,"is-vertical":"vertical"===t})}),(0,tt.createElement)(JH.Content,null))},variations:vQ},wQ=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"})),EQ=ln()((e=>{if(!e)return{};const t=sV()(e);return{year:t.year(),month:t.month()+1}}));const LQ={apiVersion:2,name:"core/calendar",title:"Calendar",category:"widgets",description:"A calendar of your site’s posts.",keywords:["posts","archive"],textdomain:"default",attributes:{month:{type:"integer"},year:{type:"integer"}},supports:{align:!0},style:"wp-block-calendar"},{name:AQ}=LQ,SQ={icon:wQ,example:{},edit:function({attributes:e}){const t=VR(),{date:n,hasPosts:r,hasPostsResolved:o}=Cl((e=>{const{getEntityRecords:t,hasFinishedResolution:n}=e(yd),r={status:"publish",per_page:1},o=t("postType","post",r),a=n("getEntityRecords",["postType","post",r]);let i;const s=e("core/editor");if(s){"post"===s.getEditedPostAttribute("type")&&(i=s.getEditedPostAttribute("date"))}return{date:i,hasPostsResolved:a,hasPosts:a&&1===(null==o?void 0:o.length)}}),[]);return r?(0,tt.createElement)("div",t,(0,tt.createElement)(jP,null,(0,tt.createElement)(WZ,{block:"core/calendar",attributes:{...e,...EQ(n)}}))):(0,tt.createElement)("div",t,(0,tt.createElement)(yH,{icon:wQ,label:er("Calendar")},o?er("No published posts found."):(0,tt.createElement)(cq,null)))}},CQ=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{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"})),TQ=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,tt.createElement)(uo,{d:"M10.44 3.02l1.82-1.82 6.36 6.35-1.83 1.82c-1.05-.68-2.48-.57-3.41.36l-.75.75c-.92.93-1.04 2.35-.35 3.41l-1.83 1.82-2.41-2.41-2.8 2.79c-.42.42-3.38 2.71-3.8 2.29s1.86-3.39 2.28-3.81l2.79-2.79L4.1 9.36l1.83-1.82c1.05.69 2.48.57 3.4-.36l.75-.75c.93-.92 1.05-2.35.36-3.41z"}));const xQ={apiVersion:2,name:"core/categories",title:"Categories",category:"widgets",description:"Display a list of all categories.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1}},supports:{align:!0,html:!1},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"},{name:zQ}=xQ,OQ={icon:CQ,example:{},edit:function e({attributes:{displayAsDropdown:t,showHierarchy:n,showPostCounts:r},setAttributes:o}){const a=Zk(e,"blocks-category-select"),{categories:i,isRequesting:s}=Cl((e=>{const{getEntityRecords:t,isResolving:n}=e(yd),r={per_page:-1,hide_empty:!0,context:"view"};return{categories:t("taxonomy","category",r),isRequesting:n("getEntityRecords",["taxonomy","category",r])}}),[]),l=e=>null!=i&&i.length?null===e?i:i.filter((({parent:t})=>t===e)):[],c=e=>`wp-block-categories__list wp-block-categories__list-level-${e}`,u=e=>t=>o({[e]:t}),d=e=>e?(0,at.unescape)(e).trim():er("(Untitled)"),p=(e,t)=>{const o=l(e.id),{id:a,link:i,count:s,name:u}=e;return(0,tt.createElement)("li",{key:a},(0,tt.createElement)("a",{href:i,target:"_blank",rel:"noreferrer noopener"},d(u)),r&&(0,tt.createElement)("span",{className:"wp-block-categories__post-count"},` (${s})`),n&&!!o.length&&(0,tt.createElement)("ul",{className:c(t+1)},o.map((e=>p(e,t+1)))))},m=(e,t)=>{const{id:o,count:a,name:i}=e,s=l(o);return[(0,tt.createElement)("option",{key:o},(0,at.times)(3*t,(()=>" ")),d(i),r&&` (${a})`),n&&!!s.length&&s.map((e=>m(e,t+1)))]};return(0,tt.createElement)("div",VR(),(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("Categories settings")},(0,tt.createElement)(KN,{label:er("Display as dropdown"),checked:t,onChange:u("displayAsDropdown")}),(0,tt.createElement)(KN,{label:er("Show hierarchy"),checked:n,onChange:u("showHierarchy")}),(0,tt.createElement)(KN,{label:er("Show post counts"),checked:r,onChange:u("showPostCounts")}))),s&&(0,tt.createElement)(yH,{icon:TQ,label:er("Categories")},(0,tt.createElement)(cq,null)),!s&&0===(null==i?void 0:i.length)&&(0,tt.createElement)("p",null,er("Your site does not have any posts, so there is nothing to display here at the moment.")),!s&&(null==i?void 0:i.length)>0&&(t?(()=>{const e=l(n?0:null);return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(Mf,{as:"label",htmlFor:a},er("Categories")),(0,tt.createElement)("select",{id:a,className:"wp-block-categories__dropdown"},e.map((e=>m(e,0)))))})():(()=>{const e=l(n?0:null);return(0,tt.createElement)("ul",{className:c(0)},e.map((e=>p(e,0))))})()))}},NQ=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));function DQ(e){return e.replace(/\[/g,"[")}function BQ(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}const IQ={from:[{type:"enter",regExp:/^```$/,transform:()=>Ho("core/code")},{type:"block",blocks:["core/html"],transform:({content:e})=>Ho("core/code",{content:e})},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName,schema:{pre:{children:{code:{children:{"#text":{}}}}}}}]},PQ={apiVersion:2,name:"core/code",title:"Code",category:"text",description:"Display code snippets that respect your spacing and tabs.",textdomain:"default",attributes:{content:{type:"string",source:"html",selector:"code"}},supports:{anchor:!0,__experimentalSelector:".wp-block-code > code",typography:{fontSize:!0}},style:"wp-block-code"},{name:RQ}=PQ,WQ={icon:NQ,example:{attributes:{content:er('// A "block" is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );')}},transforms:IQ,edit:function({attributes:e,setAttributes:t,onRemove:n}){const r=VR();return(0,tt.createElement)("pre",r,(0,tt.createElement)(Cj,{tagName:"code",value:e.content,onChange:e=>t({content:e}),onRemove:n,placeholder:er("Write code…"),"aria-label":er("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0}))},save:function({attributes:e}){return(0,tt.createElement)("pre",VR.save(),(0,tt.createElement)(Cj.Content,{tagName:"code",value:(t=e.content,(0,at.flow)(DQ,BQ)(t||""))}));var t}},YQ=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z"}));function HQ(e){let t,{doc:n}=HQ;n||(n=document.implementation.createHTMLDocument(""),HQ.doc=n),n.body.innerHTML=e;for(const e of n.body.firstChild.classList)if(t=e.match(/^layout-column-(\d+)$/))return Number(t[1])-1}const qQ=[{attributes:{verticalAlignment:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>{if(!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};return e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),{...(0,at.omit)(e,["customTextColor","customBackgroundColor"]),style:t,isStackedOnMobile:!0}},save({attributes:e}){const{verticalAlignment:t,backgroundColor:n,customBackgroundColor:r,textColor:o,customTextColor:a}=e,i=mC("background-color",n),s=mC("color",o),l=so()({"has-background":n||r,"has-text-color":o||a,[i]:i,[s]:s,[`are-vertically-aligned-${t}`]:t}),c={backgroundColor:i?void 0:r,color:s?void 0:a};return(0,tt.createElement)("div",{className:l||void 0,style:c},(0,tt.createElement)(JH.Content,null))}},{attributes:{columns:{type:"number",default:2}},isEligible:(e,t)=>!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==HQ(e.originalContent))),migrate(e,t){const n=t.reduce(((e,t)=>{const{originalContent:n}=t;let r=HQ(n);return void 0===r&&(r=0),e[r]||(e[r]=[]),e[r].push(t),e}),[]).map((e=>Ho("core/column",{},e)));return[{...(0,at.omit)(e,["columns"]),isStackedOnMobile:!0},n]},save({attributes:e}){const{columns:t}=e;return(0,tt.createElement)("div",{className:`has-${t}-columns`},(0,tt.createElement)(JH.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate:(e,t)=>[e={...(0,at.omit)(e,["columns"]),isStackedOnMobile:!0},t],save({attributes:e}){const{verticalAlignment:t,columns:n}=e,r=so()(`has-${n}-columns`,{[`are-vertically-aligned-${t}`]:t});return(0,tt.createElement)("div",{className:r},(0,tt.createElement)(JH.Content,null))}}],jQ=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function FQ(e,t){const{width:n=100/t}=e.attributes;return jQ(n)}function VQ(e,t,n=e.length){const r=function(e,t=e.length){return(0,at.sumBy)(e,(e=>FQ(e,t)))}(e,n);return(0,at.mapValues)(function(e,t=e.length){return e.reduce(((e,n)=>{const r=FQ(n,t);return Object.assign(e,{[n.clientId]:r})}),{})}(e,n),(e=>jQ(t*e/r)))}function XQ(e,t){return e.map((e=>(0,at.merge)({},e,{attributes:{width:`${t[e.clientId]}%`}})))}const UQ=["core/column"];const $Q=eP(((e,t,n)=>({updateAlignment(r){const{clientId:o,setAttributes:a}=t,{updateBlockAttributes:i}=e(nk),{getBlockOrder:s}=n.select(nk);a({verticalAlignment:r});s(o).forEach((e=>{i(e,{verticalAlignment:r})}))},updateColumns(r,o){const{clientId:a}=t,{replaceInnerBlocks:i}=e(nk),{getBlocks:s}=n.select(nk);let l=s(a);const c=function(e){return e.every((e=>{var t;const n=e.attributes.width;return Number.isFinite(null!=n&&null!==(t=n.endsWith)&&void 0!==t&&t.call(n,"%")?parseFloat(n):n)}))}(l),u=o>r;if(u&&c){const e=jQ(100/o);l=[...XQ(l,VQ(l,100-e)),...(0,at.times)(o-r,(()=>Ho("core/column",{width:`${e}%`})))]}else if(u)l=[...l,...(0,at.times)(o-r,(()=>Ho("core/column")))];else if(l=(0,at.dropRight)(l,r-o),c){l=XQ(l,VQ(l,100))}i(a,l)}})))((function({attributes:e,setAttributes:t,updateAlignment:n,updateColumns:r,clientId:o}){const{isStackedOnMobile:a,verticalAlignment:i}=e,{count:s}=Cl((e=>({count:e(nk).getBlockCount(o)})),[o]),l=GH(VR({className:so()({[`are-vertically-aligned-${i}`]:i,"is-not-stacked-on-mobile":!a})}),{allowedBlocks:UQ,orientation:"horizontal",renderAppender:!1});return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,null,(0,tt.createElement)(WH,{onChange:n,value:i})),(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,null,(0,tt.createElement)(rT,{label:er("Columns"),value:s,onChange:e=>r(s,e),min:1,max:Math.max(6,s)}),s>6&&(0,tt.createElement)(RT,{status:"warning",isDismissible:!1},er("This column count exceeds the recommended amount and may cause visual breakage.")),(0,tt.createElement)(KN,{label:er("Stack on mobile"),checked:a,onChange:()=>t({isStackedOnMobile:!a})}))),(0,tt.createElement)("div",l))}));function KQ({clientId:e,name:t,setAttributes:n}){const{blockType:r,defaultVariation:o,variations:a}=Cl((e=>{const{getBlockVariations:n,getBlockType:r,getDefaultBlockVariation:o}=e(Gr);return{blockType:r(t),defaultVariation:o(t,"block"),variations:n(t,"block")}}),[t]),{replaceInnerBlocks:i}=sd(nk),s=VR();return(0,tt.createElement)("div",s,(0,tt.createElement)(_H,{icon:(0,at.get)(r,["icon","src"]),label:(0,at.get)(r,["title"]),variations:a,onSelect:(t=o)=>{t.attributes&&n(t.attributes),t.innerBlocks&&i(e,qo(t.innerBlocks),!0)},allowSkip:!0}))}const GQ=e=>{const{clientId:t}=e,n=Cl((e=>e(nk).getBlocks(t).length>0),[t])?$Q:KQ;return(0,tt.createElement)(n,e)};const JQ=[{name:"one-column-full",title:er("100"),description:er("One column"),icon:(0,tt.createElement)(mo,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{fillRule:"evenodd",clipRule:"evenodd",d:"m39.0625 14h-30.0625v20.0938h30.0625zm-30.0625-2c-1.10457 0-2 .8954-2 2v20.0938c0 1.1045.89543 2 2 2h30.0625c1.1046 0 2-.8955 2-2v-20.0938c0-1.1046-.8954-2-2-2z"})),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:er("50 / 50"),description:er("Two columns; equal split"),icon:(0,tt.createElement)(mo,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"})),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:er("30 / 70"),description:er("Two columns; one-third, two-thirds split"),icon:(0,tt.createElement)(mo,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z"})),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:er("70 / 30"),description:er("Two columns; two-thirds, one-third split"),icon:(0,tt.createElement)(mo,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z"})),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:er("33 / 33 / 33"),description:er("Three columns; equal split"),icon:(0,tt.createElement)(mo,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z"})),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:er("25 / 50 / 25"),description:er("Three columns; wide center column"),icon:(0,tt.createElement)(mo,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z"})),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}],ZQ={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2);return Ho("core/columns",{},qo(e.map((({name:e,attributes:n,innerBlocks:r})=>["core/column",{width:`${t}%`},[[e,{...n},r]]]))))},isMatch:({length:e})=>e&&e<=6},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:n,backgroundColor:r,textColor:o,style:a,mediaAlt:i,mediaId:s,mediaPosition:l,mediaSizeSlug:c,mediaType:u,mediaUrl:d,mediaWidth:p,verticalAlignment:m}=e;let h;if("image"!==u&&u)h=["core/video",{id:s,src:d}];else{h=["core/image",{...{id:s,alt:i,url:d,sizeSlug:c},...{href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}}]}const f=[["core/column",{width:`${p}%`},[h]],["core/column",{width:100-p+"%"},t]];return"right"===l&&f.reverse(),Ho("core/columns",{align:n,backgroundColor:r,textColor:o,style:a,verticalAlignment:m},qo(f))}}]},QQ={apiVersion:2,name:"core/columns",title:"Columns",category:"design",description:"Add a block that displays content in multiple columns, then add whatever content blocks you’d like.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"},{name:e0}=QQ,t0={icon:YQ,variations:JQ,example:{innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:er("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:er("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:er("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:er("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:qQ,edit:GQ,save:function({attributes:e}){const{isStackedOnMobile:t,verticalAlignment:n}=e,r=so()({[`are-vertically-aligned-${n}`]:n,"is-not-stacked-on-mobile":!t});return(0,tt.createElement)("div",VR.save({className:r}),(0,tt.createElement)(JH.Content,null))},transforms:ZQ},n0=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"})),r0=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible:({width:e})=>isFinite(e),migrate:e=>({...e,width:`${e.width}%`}),save({attributes:e}){const{verticalAlignment:t,width:n}=e,r=so()({[`is-vertically-aligned-${t}`]:t}),o={flexBasis:n+"%"};return(0,tt.createElement)("div",{className:r,style:o},(0,tt.createElement)(JH.Content,null))}}];const o0=function({attributes:{verticalAlignment:e,width:t,templateLock:n=!1},setAttributes:r,clientId:o}){const a=so()("block-core-columns",{[`is-vertically-aligned-${e}`]:e}),i=Lk({availableUnits:JL("spacing.units")||["%","px","em","rem","vw"]}),{columnsIds:s,hasChildBlocks:l,rootClientId:c}=Cl((e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(nk),r=n(o);return{hasChildBlocks:t(o).length>0,rootClientId:r,columnsIds:t(r)}}),[o]),{updateBlockAttributes:u}=sd(nk),d=Number.isFinite(t)?t+"%":t,p=VR({className:a,style:d?{flexBasis:d}:void 0}),m=s.length,h=s.indexOf(o)+1,f=pn(er("%1$s (%2$d of %3$d)"),p["aria-label"],h,m),g=GH({...p,"aria-label":f},{templateLock:n,renderAppender:l?void 0:JH.ButtonBlockAppender});return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,null,(0,tt.createElement)(WH,{onChange:e=>{r({verticalAlignment:e}),u(c,{verticalAlignment:null})},value:e})),(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("Column settings")},(0,tt.createElement)(UL,{label:er("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:t||"",onChange:e=>{e=0>parseFloat(e)?"0":e,r({width:e})},units:i}))),(0,tt.createElement)("div",g))};const a0={apiVersion:2,name:"core/column",title:"Column",category:"text",parent:["core/columns"],description:"A single column within a columns block.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},width:{type:"string"},templateLock:{enum:["all","insert",!1]}},supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0},spacing:{padding:!0}}},{name:i0}=a0,s0={icon:n0,edit:o0,save:function({attributes:e}){const{verticalAlignment:t,width:n}=e,r=so()({[`is-vertically-aligned-${t}`]:t});let o;return n&&(o={flexBasis:Number.isFinite(n)?n+"%":n}),(0,tt.createElement)("div",VR.save({className:r,style:o}),(0,tt.createElement)(JH.Content,null))},deprecated:r0},l0=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z"})),c0={"top left":"is-position-top-left","top center":"is-position-top-center","top right":"is-position-top-right","center left":"is-position-center-left","center center":"is-position-center-center",center:"is-position-center-center","center right":"is-position-center-right","bottom left":"is-position-bottom-left","bottom center":"is-position-bottom-center","bottom right":"is-position-bottom-right"},u0="image",d0="video";function p0(e){return e?{backgroundImage:`url(${e})`}:{}}const m0=["image","video"];function h0(e){return 0!==e&&50!==e&&e?"has-background-dim-"+10*Math.round(e/10):null}function f0(e){return t=>{if(!t||!t.url)return void e({url:void 0,id:void 0});var n,r;let o;if(Js(t.url)&&(t.type=(n=t.url,null===(r=Ks(n))||void 0===r?void 0:r.type.split("/")[0])),t.media_type)o=t.media_type===u0?u0:d0;else{if(t.type!==u0&&t.type!==d0)return;o=t.type}e({url:t.url,id:t.id,backgroundType:o,...o===d0?{focalPoint:void 0,hasParallax:void 0}:{}})}}function g0(e){return!e||"center center"===e||"center"===e}function b0(e){return g0(e)?"":c0[e]}const y0={url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"}},v0=[{attributes:{...y0,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:r,customGradient:o,customOverlayColor:a,dimRatio:i,focalPoint:s,hasParallax:l,isRepeated:c,overlayColor:u,url:d,minHeight:p,minHeightUnit:m}=e,h=mC("background-color",u),f=fC(n),g=m?`${p}${m}`:p,b=u0===t,y=d0===t,v=b?p0(d):{},_={};let M;h||(v.backgroundColor=a),o&&!d&&(v.background=o),v.minHeight=g||void 0,s&&(M=`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`,b&&!l&&(v.backgroundPosition=M),y&&(_.objectPosition=M));const k=so()(h0(i),h,{"has-background-dim":0!==i,"has-parallax":l,"is-repeated":c,"has-background-gradient":n||o,[f]:!d&&f,"has-custom-content-position":!g0(r)},b0(r));return(0,tt.createElement)("div",VR.save({className:k,style:v}),d&&(n||o)&&0!==i&&(0,tt.createElement)("span",{"aria-hidden":"true",className:so()("wp-block-cover__gradient-background",f),style:o?{background:o}:void 0}),y&&d&&(0,tt.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:_}),(0,tt.createElement)("div",{className:"wp-block-cover__inner-container"},(0,tt.createElement)(JH.Content,null)))}},{attributes:{...y0,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:n,customGradient:r,customOverlayColor:o,dimRatio:a,focalPoint:i,hasParallax:s,overlayColor:l,url:c,minHeight:u}=e,d=mC("background-color",l),p=fC(n),m=t===u0?p0(c):{};d||(m.backgroundColor=o),i&&!s&&(m.backgroundPosition=`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`),r&&!c&&(m.background=r),m.minHeight=u||void 0;const h=so()(h0(a),d,{"has-background-dim":0!==a,"has-parallax":s,"has-background-gradient":r,[p]:!c&&p});return(0,tt.createElement)("div",{className:h,style:m},c&&(n||r)&&0!==a&&(0,tt.createElement)("span",{"aria-hidden":"true",className:so()("wp-block-cover__gradient-background",p),style:r?{background:r}:void 0}),d0===t&&c&&(0,tt.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),(0,tt.createElement)("div",{className:"wp-block-cover__inner-container"},(0,tt.createElement)(JH.Content,null)))}},{attributes:{...y0,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:n,customGradient:r,customOverlayColor:o,dimRatio:a,focalPoint:i,hasParallax:s,overlayColor:l,url:c,minHeight:u}=e,d=mC("background-color",l),p=fC(n),m=t===u0?p0(c):{};d||(m.backgroundColor=o),i&&!s&&(m.backgroundPosition=`${100*i.x}% ${100*i.y}%`),r&&!c&&(m.background=r),m.minHeight=u||void 0;const h=so()(h0(a),d,{"has-background-dim":0!==a,"has-parallax":s,"has-background-gradient":r,[p]:!c&&p});return(0,tt.createElement)("div",{className:h,style:m},c&&(n||r)&&0!==a&&(0,tt.createElement)("span",{"aria-hidden":"true",className:so()("wp-block-cover__gradient-background",p),style:r?{background:r}:void 0}),d0===t&&c&&(0,tt.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),(0,tt.createElement)("div",{className:"wp-block-cover__inner-container"},(0,tt.createElement)(JH.Content,null)))}},{attributes:{...y0,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,contentAlign:n,customOverlayColor:r,dimRatio:o,focalPoint:a,hasParallax:i,overlayColor:s,title:l,url:c}=e,u=mC("background-color",s),d=t===u0?p0(c):{};u||(d.backgroundColor=r),a&&!i&&(d.backgroundPosition=`${100*a.x}% ${100*a.y}%`);const p=so()(h0(o),u,{"has-background-dim":0!==o,"has-parallax":i,[`has-${n}-content`]:"center"!==n});return(0,tt.createElement)("div",{className:p,style:d},d0===t&&c&&(0,tt.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),!Cj.isEmpty(l)&&(0,tt.createElement)(Cj.Content,{tagName:"p",className:"wp-block-cover-text",value:l}))},migrate:e=>[(0,at.omit)(e,["title","contentAlign"]),[Ho("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:er("Write title…")})]]},{attributes:{...y0,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},align:{type:"string"}},supports:{className:!1},save({attributes:e}){const{url:t,title:n,hasParallax:r,dimRatio:o,align:a,contentAlign:i,overlayColor:s,customOverlayColor:l}=e,c=mC("background-color",s),u=p0(t);c||(u.backgroundColor=l);const d=so()("wp-block-cover-image",h0(o),c,{"has-background-dim":0!==o,"has-parallax":r,[`has-${i}-content`]:"center"!==i},a?`align${a}`:null);return(0,tt.createElement)("div",{className:d,style:u},!Cj.isEmpty(n)&&(0,tt.createElement)(Cj.Content,{tagName:"p",className:"wp-block-cover-image-text",value:n}))},migrate:e=>[(0,at.omit)(e,["title","contentAlign","align"]),[Ho("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:er("Write title…")})]]},{attributes:{...y0,title:{type:"string",source:"html",selector:"h2"},align:{type:"string"},contentAlign:{type:"string",default:"center"}},supports:{className:!1},save({attributes:e}){const{url:t,title:n,hasParallax:r,dimRatio:o,align:a}=e,i=p0(t),s=so()("wp-block-cover-image",h0(o),{"has-background-dim":0!==o,"has-parallax":r},a?`align${a}`:null);return(0,tt.createElement)("section",{className:s,style:i},(0,tt.createElement)(Cj.Content,{tagName:"h2",value:n}))},migrate:e=>[(0,at.omit)(e,["title","contentAlign","align"]),[Ho("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:er("Write title…")})]]}];var _0=n(7667),M0=n.n(_0);const k0=yf("div",{target:"e11wezi78"})({name:"1g31405",styles:"background-color:transparent;box-sizing:border-box;text-align:center;width:100%"}),w0=yf("div",{target:"e11wezi77"})({name:"v0nrlz",styles:"align-items:center;box-sizing:border-box;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.2 );cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;img,video{box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:auto;}"}),E0=yf("div",{target:"e11wezi76"})("background:",Gk.lightGray[300],";box-sizing:border-box;height:170px;max-width:280px;min-width:200px;width:100%;"),L0=yf(UL,{target:"e11wezi75"})({name:"1pzk433",styles:"width:100px"}),A0=yf(cw,{target:"e11wezi74"})({name:"ox4xcy",styles:"max-width:320px;padding:1em 0"}),S0=yf("div",{target:"e11wezi73"})("box-sizing:border-box;left:50%;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );transition:opacity 120ms linear;z-index:1;",(({isActive:e})=>e&&"\n\t\topacity: 1;\n\t"),";"),C0=yf("div",{target:"e11wezi72"})({name:"1sy4ch9",styles:"box-sizing:border-box;background:white;box-shadow:0 0 2px rgba( 0, 0, 0, 0.6 );position:absolute;opacity:0.4;transform:translateZ( 0 )"}),T0=yf(C0,{target:"e11wezi71"})({name:"1qp910y",styles:"height:1px;left:0;right:0"}),x0=yf(C0,{target:"e11wezi70"})({name:"1oz3zka",styles:"width:1px;top:0;bottom:0"}),z0={top:0,left:0,bottom:0,right:0,width:0,height:0},O0=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function N0(e){return Math.round(100*e)}function D0({onChange:e=at.noop,percentages:t={x:.5,y:.5}}){const n=N0(t.x),r=N0(t.y),o=(n,r)=>{const o=parseInt(n,10);isNaN(o)||e({...t,[r]:o/100})};return(0,tt.createElement)(A0,{className:"focal-point-picker__controls"},(0,tt.createElement)(B0,{label:er("Left"),value:n,onChange:e=>o(e,"x"),dragDirection:"e"}),(0,tt.createElement)(B0,{label:er("Top"),value:r,onChange:e=>o(e,"y"),dragDirection:"s"}))}function B0(e){return(0,tt.createElement)(L0,ot({className:"focal-point-picker__controls-position-unit-control",labelPosition:"side",max:100,min:0,unit:"%",units:[{value:"%",label:"%"}]},e))}const I0=yf("div",{target:"eas61re3"})("background-color:transparent;box-sizing:border-box;cursor:grab;height:30px;margin:-15px 0 0 -15px;opacity:0.8;position:absolute;user-select:none;width:30px;will-change:transform;z-index:10000;",(({isDragging:e})=>e&&"cursor: grabbing;"),";"),P0=yf(mo,{target:"eas61re2"})({name:"qkx60y",styles:"display:block;height:100%;left:0;position:absolute;top:0;width:100%"}),R0=yf(uo,{target:"eas61re1"})({name:"1b3qpiw",styles:"fill:white"}),W0=yf(uo,{target:"eas61re0"})("fill:",Gk.blue.wordpress[700],";fill:",Gk.ui.theme,";");function Y0({coordinates:e={left:"50%",top:"50%"},...t}){const n=so()("components-focal-point-picker__icon_container"),r={left:e.left,top:e.top};return(0,tt.createElement)(I0,ot({},t,{className:n,style:r}),(0,tt.createElement)(P0,{className:"components-focal-point-picker__icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30"},(0,tt.createElement)(R0,{className:"components-focal-point-picker__icon-outline",d:"M15 1C7.3 1 1 7.3 1 15s6.3 14 14 14 14-6.3 14-14S22.7 1 15 1zm0 22c-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8-3.6 8-8 8z"}),(0,tt.createElement)(W0,{className:"components-focal-point-picker__icon-fill",d:"M15 3C8.4 3 3 8.4 3 15s5.4 12 12 12 12-5.4 12-12S21.6 3 15 3zm0 22C9.5 25 5 20.5 5 15S9.5 5 15 5s10 4.5 10 10-4.5 10-10 10z"})))}const{clearTimeout:H0,setTimeout:q0}="undefined"!=typeof window?window:{};function j0({bounds:e={},value:t,...n}){const r=function(e){const[t,n]=(0,tt.useState)(!1);return EL((()=>{n(!0);const e=q0((()=>{n(!1)}),600);return()=>H0(e)}),[e]),{isActive:t}}(t),o={width:e.width,height:e.height};return(0,tt.createElement)(S0,ot({},n,r,{className:"components-focal-point-picker__grid",style:o}),(0,tt.createElement)(T0,{style:{top:"33%"}}),(0,tt.createElement)(T0,{style:{top:"66%"}}),(0,tt.createElement)(x0,{style:{left:"33%"}}),(0,tt.createElement)(x0,{style:{left:"66%"}}))}function F0({alt:e,autoPlay:t,src:n,onLoad:r=at.noop,mediaRef:o,muted:a=!0,...i}){if(!n)return(0,tt.createElement)(V0,{className:"components-focal-point-picker__media components-focal-point-picker__media--placeholder",onLoad:r,mediaRef:o});return function(e=""){return!!e&&O0.includes(function(e=""){const t=e.split(".");return t[t.length-1]}(e))}(n)?(0,tt.createElement)("video",ot({},i,{autoPlay:t,className:"components-focal-point-picker__media components-focal-point-picker__media--video",loop:!0,muted:a,onLoadedData:r,ref:o,src:n})):(0,tt.createElement)("img",ot({},i,{alt:e,className:"components-focal-point-picker__media components-focal-point-picker__media--image",onLoad:r,ref:o,src:n}))}function V0({mediaRef:e,onLoad:t=at.noop,...n}){const r=(0,tt.useRef)(t);return(0,tt.useLayoutEffect)((()=>{window.requestAnimationFrame((()=>{r.current()}))}),[]),(0,tt.createElement)(E0,ot({ref:e},n))}class X0 extends tt.Component{constructor(e){super(...arguments),this.state={isDragging:!1,bounds:z0,percentages:e.value},this.containerRef=(0,tt.createRef)(),this.mediaRef=(0,tt.createRef)(),this.onMouseDown=this.startDrag.bind(this),this.onMouseUp=this.stopDrag.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseMove=this.doDrag.bind(this),this.ifDraggingStop=()=>{this.state.isDragging&&this.stopDrag()},this.onChangeAtControls=e=>{this.updateValue(e),this.props.onChange(e)},this.updateBounds=this.updateBounds.bind(this),this.updateValue=this.updateValue.bind(this)}componentDidMount(){const{defaultView:e}=this.containerRef.current.ownerDocument;e.addEventListener("resize",this.updateBounds),this.updateBounds()}componentDidUpdate(e){e.url!==this.props.url&&this.ifDraggingStop();const{isDragging:t,percentages:{x:n,y:r}}=this.state,{value:o}=this.props;t||o.x===n&&o.y===r||this.setState({percentages:this.props.value})}componentWillUnmount(){const{defaultView:e}=this.containerRef.current.ownerDocument;e.removeEventListener("resize",this.updateBounds),this.ifDraggingStop()}calculateBounds(){const e=z0;if(!this.mediaRef.current)return e;if(0===this.mediaRef.current.clientWidth||0===this.mediaRef.current.clientHeight)return e;const t=this.mediaRef.current.clientWidth,n=this.mediaRef.current.clientHeight,r=this.pickerDimensions(),o=r.width/t,a=r.height/n;return a>=o?(e.width=e.right=r.width,e.height=n*o,e.top=(r.height-e.height)/2,e.bottom=e.top+e.height):(e.height=e.bottom=r.height,e.width=t*a,e.left=(r.width-e.width)/2,e.right=e.left+e.width),e}updateValue(e={}){const{x:t,y:n}=e,r={x:parseFloat(t).toFixed(2),y:parseFloat(n).toFixed(2)};this.setState({percentages:r})}updateBounds(){this.setState({bounds:this.calculateBounds()})}startDrag(e){var t,n;e.persist(),this.containerRef.current.focus(),this.setState({isDragging:!0});const{ownerDocument:r}=this.containerRef.current;r.addEventListener("mouseup",this.onMouseUp),r.addEventListener("mousemove",this.onMouseMove);const o=this.getValueFromPoint({x:e.pageX,y:e.pageY},e.shiftKey);this.updateValue(o),null===(t=(n=this.props).onDragStart)||void 0===t||t.call(n,o,e)}stopDrag(e){var t,n;const{ownerDocument:r}=this.containerRef.current;r.removeEventListener("mouseup",this.onMouseUp),r.removeEventListener("mousemove",this.onMouseMove),this.setState({isDragging:!1},(()=>{this.props.onChange(this.state.percentages)})),null===(t=(n=this.props).onDragEnd)||void 0===t||t.call(n,e)}onKeyDown(e){const{keyCode:t,shiftKey:n}=e;if(![am,sm,om,im].includes(t))return;e.preventDefault();const r={...this.state.percentages},o=n?.1:.01,a=t===am||t===om?-1*o:o,i=t===am||t===sm?"y":"x",s=parseFloat(r[i])+a;r[i]=NL(s,0,1,o),this.updateValue(r),this.props.onChange(r)}doDrag(e){var t,n;e.preventDefault();const r=this.getValueFromPoint({x:e.pageX,y:e.pageY},e.shiftKey);this.updateValue(r),null===(t=(n=this.props).onDrag)||void 0===t||t.call(n,r,e)}getValueFromPoint(e,t){const{bounds:n}=this.state,r=this.pickerDimensions(),o={left:e.x-r.left,top:e.y-r.top},a=Math.max(n.left,Math.min(o.left,n.right)),i=Math.max(n.top,Math.min(o.top,n.bottom));let s=(a-n.left)/(r.width-2*n.left),l=(i-n.top)/(r.height-2*n.top);const c=t?.1:.01;return s=NL(s,0,1,c),l=NL(l,0,1,c),{x:s,y:l}}pickerDimensions(){const e=this.containerRef.current;if(!e)return{width:0,height:0,left:0,top:0};const{clientHeight:t,clientWidth:n}=e,{top:r,left:o}=e.getBoundingClientRect();return{width:n,height:t,top:r+document.body.scrollTop,left:o}}iconCoordinates(){const{bounds:e,percentages:{x:t,y:n}}=this.state;if(void 0===e.left||void 0===e.top)return{left:"50%",top:"50%"};const{width:r,height:o}=this.pickerDimensions();return{left:t*(r-2*e.left)+e.left,top:n*(o-2*e.top)+e.top}}render(){const{autoPlay:e,className:t,help:n,instanceId:r,label:o,url:a}=this.props,{bounds:i,isDragging:s,percentages:l}=this.state,c=this.iconCoordinates(),u=so()("components-focal-point-picker-control",t),d=`inspector-focal-point-picker-control-${r}`;return(0,tt.createElement)(EA,{label:o,id:d,help:n,className:u},(0,tt.createElement)(k0,{className:"components-focal-point-picker-wrapper"},(0,tt.createElement)(w0,{className:"components-focal-point-picker",onKeyDown:this.onKeyDown,onMouseDown:this.onMouseDown,onBlur:this.ifDraggingStop,ref:this.containerRef,role:"button",tabIndex:"-1"},(0,tt.createElement)(j0,{bounds:i,value:l.x+l.y}),(0,tt.createElement)(F0,{alt:er("Media preview"),autoPlay:e,mediaRef:this.mediaRef,onLoad:this.updateBounds,src:a}),(0,tt.createElement)(Y0,{coordinates:c,isDragging:s}))),(0,tt.createElement)(D0,{percentages:l,onChange:this.onChangeAtControls}))}}X0.defaultProps={autoPlay:!0,value:{x:.5,y:.5},url:null};const U0=cS(X0),$0=(0,tt.forwardRef)((({className:e,children:t},n)=>(0,tt.createElement)("div",{className:so()("components-panel__row",e),ref:n},t))),K0=[["core/paragraph",{align:"center",fontSize:"large",placeholder:er("Write title…")}]],{__Visualizer:G0}=lN;function J0(){return J0.fastAverageColor||(J0.fastAverageColor=new(M0())),J0.fastAverageColor}function Z0({onChange:e,onUnitChange:t,unit:n="px",value:r=""}){const[o,a]=(0,tt.useState)(null),i=`block-cover-height-input-${Zk(Bj)}`,s="px"===n,l=Lk({availableUnits:JL("spacing.units")||["px","em","rem","vw","vh"],defaultValues:{px:"430",em:"20",rem:"20",vw:"20",vh:"50"}}),c=null!==o?o:r,u=s?50:0;return(0,tt.createElement)(EA,{label:er("Minimum height of cover"),id:i},(0,tt.createElement)(Bj,{id:i,isResetValueOnUnitChange:!0,min:u,onBlur:()=>{null!==o&&a(null)},onChange:n=>{const r=""!==n?parseInt(n,10):void 0;isNaN(r)&&void 0!==r?a(n):(a(null),e(r),void 0===r&&t())},onUnitChange:t,step:"1",style:{maxWidth:80},unit:n,units:l,value:c}))}const Q0={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};function e1({className:e,onResizeStart:t,onResize:n,onResizeStop:r,...o}){const[a,i]=(0,tt.useState)(!1);return(0,tt.createElement)(LG,ot({className:so()(e,{"is-resizing":a}),enable:Q0,onResizeStart:(e,r,o)=>{t(o.clientHeight),n(o.clientHeight)},onResize:(e,t,r)=>{n(r.clientHeight),a||i(!0)},onResizeStop:(e,t,n)=>{r(n.clientHeight),i(!1)},minHeight:50},o))}function t1({x:e,y:t}){return`${Math.round(100*e)}% ${Math.round(100*t)}%`}function n1({disableMediaButtons:e=!1,children:t,noticeUI:n,noticeOperations:r,onSelectMedia:o}){const{removeAllNotices:a,createErrorNotice:i}=r;return(0,tt.createElement)(oj,{icon:(0,tt.createElement)(MB,{icon:l0}),labels:{title:er("Cover"),instructions:er("Upload an image or video file, or pick one from your media library.")},onSelect:o,accept:"image/*,video/*",allowedTypes:m0,notices:n,disableMediaButtons:e,onError:e=>{a(),i(e)}},t)}const r1=lS([eP((e=>{const{toggleSelection:t}=e(nk);return{toggleSelection:t}})),cD({overlayColor:"background-color"}),YK,cS])((function({attributes:e,clientId:t,isSelected:n,noticeUI:r,noticeOperations:o,overlayColor:a,setAttributes:i,setOverlayColor:s,toggleSelection:l}){var c,u;const{contentPosition:d,id:p,backgroundType:m,dimRatio:h,focalPoint:f,hasParallax:g,isRepeated:b,minHeight:y,minHeightUnit:v,style:_,url:M}=e,{gradientClass:k,gradientValue:w,setGradient:E}=function({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=rb(),r=JL("color.gradients")||hC,{gradient:o,customGradient:a}=Cl((r=>{const{getBlockAttributes:o}=r(nk),a=o(n)||{};return{customGradient:a[t],gradient:a[e]}}),[n,e,t]),{updateBlockAttributes:i}=sd(nk),s=(0,tt.useCallback)((o=>{const a=yC(r,o);i(n,a?{[e]:a,[t]:void 0}:{[e]:void 0,[t]:o})}),[r,n,i]),l=fC(o);let c;return c=o?gC(r,o):a,{gradientClass:l,gradientValue:c,setGradient:s}}(),L=f0(i),A=((e,t)=>!e&&Js(t))(p,M),[S,C]=(0,tt.useState)(y),[T,x]=(0,tt.useState)(v),z="vh"===v&&100===y,O=(0,tt.useRef)(),N=function(e,t=50,n,r){const[o,a]=(0,tt.useState)(!1);return(0,tt.useEffect)((()=>{e&&t<=50&&r.current&&J0().getColorAsync(r.current,(e=>{a(e.isDark)}))}),[e,e&&t<=50&&r.current,a]),(0,tt.useEffect)((()=>{if(t>50||!e){if(!n)return void a(!0);a(go()(n).isDark())}}),[n,t>50||!e,a]),(0,tt.useEffect)((()=>{e||n||a(!1)}),[!e&&!n,a]),o}(M,h,a.color,O),D=u0===m,B=d0===m,[I,P]=(0,tt.useState)(null),R=v?`${y}${v}`:y,W=!(g||b),Y={...D&&!W?p0(M):{backgroundImage:w||void 0},backgroundColor:a.color,minHeight:I||R||void 0},H={objectPosition:f&&W?t1(f):void 0},q=!!(M||a.color||w),j=B||D&&(!g||b),F=e=>{const[t,n]=O.current?[O.current.style,"objectPosition"]:[U.current.style,"backgroundPosition"];t[n]=t1(e)},V=Cl((e=>e(nk).getBlock(t).innerBlocks.length>0),[t]),X=(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,{group:"block"},(0,tt.createElement)(gB,{label:er("Change content position"),value:d,onChange:e=>i({contentPosition:e}),isDisabled:!V}),(0,tt.createElement)(vD,{isActive:z,onToggle:()=>z?i("vh"===T&&100===S?{minHeight:void 0,minHeightUnit:void 0}:{minHeight:S,minHeightUnit:T}):(C(y),x(v),i({minHeight:100,minHeightUnit:"vh"})),isDisabled:!V})),(0,tt.createElement)(lk,{group:"other"},(0,tt.createElement)(Jq,{mediaId:p,mediaURL:M,allowedTypes:m0,accept:"image/*,video/*",onSelect:L,name:er(M?"Replace":"Add Media")})),(0,tt.createElement)(FA,null,!!M&&(0,tt.createElement)(BA,{title:er("Media settings")},D&&(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(KN,{label:er("Fixed background"),checked:g,onChange:()=>{i({hasParallax:!g,...g?{}:{focalPoint:void 0}})}}),(0,tt.createElement)(KN,{label:er("Repeated background"),checked:b,onChange:()=>{i({isRepeated:!b})}})),j&&(0,tt.createElement)(U0,{label:er("Focal point picker"),url:M,value:f,onDragStart:F,onDrag:F,onChange:e=>i({focalPoint:e})}),(0,tt.createElement)($0,null,(0,tt.createElement)(wf,{variant:"secondary",isSmall:!0,className:"block-library-cover__reset-button",onClick:()=>i({url:void 0,id:void 0,backgroundType:void 0,dimRatio:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0})},er("Clear Media")))),(0,tt.createElement)(BA,{title:er("Dimensions")},(0,tt.createElement)(Z0,{value:I||y,unit:v,onChange:e=>i({minHeight:e}),onUnitChange:e=>i({minHeightUnit:e})})),(0,tt.createElement)(IT,{title:er("Overlay"),initialOpen:!0,settings:[{colorValue:a.color,gradientValue:w,onColorChange:s,onGradientChange:E,label:er("Color")}]},!!M&&(0,tt.createElement)(rT,{label:er("Opacity"),value:h,onChange:e=>i({dimRatio:e}),min:0,max:100,step:10,required:!0})))),U=(0,tt.useRef)(),$=VR({ref:U}),K=GH({className:"wp-block-cover__inner-container"},{template:K0,templateInsertUpdatesSelection:!0});if(!V&&!q)return(0,tt.createElement)(tt.Fragment,null,X,(0,tt.createElement)("div",ot({},$,{className:so()("is-placeholder",$.className)}),(0,tt.createElement)(n1,{noticeUI:r,onSelectMedia:L,noticeOperations:o},(0,tt.createElement)("div",{className:"wp-block-cover__placeholder-background-options"},(0,tt.createElement)(YH,{disableCustomColors:!0,value:a.color,onChange:s,clearable:!1})))));const G=so()(h0(h),{"is-dark-theme":N,"has-background-dim":0!==h,"is-transient":A,"has-parallax":g,"is-repeated":b,[a.class]:a.class,"has-background-gradient":w,[k]:!M&&k,"has-custom-content-position":!g0(d)},b0(d));return(0,tt.createElement)(tt.Fragment,null,X,(0,tt.createElement)("div",ot({},$,{className:so()(G,$.className),style:{...Y,...$.style},"data-url":M}),(0,tt.createElement)(G0,{values:null==_||null===(c=_.spacing)||void 0===c?void 0:c.padding,showValues:null==_||null===(u=_.visualizers)||void 0===u?void 0:u.padding}),(0,tt.createElement)(e1,{className:"block-library-cover__resize-container",onResizeStart:()=>{i({minHeightUnit:"px"}),l(!1)},onResize:P,onResizeStop:e=>{l(!0),i({minHeight:e}),P(null)},showHandle:n}),M&&w&&0!==h&&(0,tt.createElement)("span",{"aria-hidden":"true",className:so()("wp-block-cover__gradient-background",k),style:{backgroundImage:w}}),M&&D&&W&&(0,tt.createElement)("img",{ref:O,className:"wp-block-cover__image-background",alt:"",src:M,style:H}),M&&B&&(0,tt.createElement)("video",{ref:O,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:M,style:H}),A&&(0,tt.createElement)(cq,null),(0,tt.createElement)(n1,{disableMediaButtons:!0,noticeUI:r,onSelectMedia:L,noticeOperations:o}),(0,tt.createElement)("div",K)))}));const o1={from:[{type:"block",blocks:["core/image"],transform:({caption:e,url:t,align:n,id:r,anchor:o,style:a})=>{var i;return Ho("core/cover",{url:t,align:n,id:r,anchor:o,style:{color:{duotone:null==a||null===(i=a.color)||void 0===i?void 0:i.duotone}}},[Ho("core/paragraph",{content:e,fontSize:"large"})])}},{type:"block",blocks:["core/video"],transform:({caption:e,src:t,align:n,id:r,anchor:o})=>Ho("core/cover",{url:t,align:n,id:r,backgroundType:d0,anchor:o},[Ho("core/paragraph",{content:e,fontSize:"large"})])},{type:"block",blocks:["core/group"],isMatch:({backgroundColor:e,gradient:t,style:n})=>{var r,o;return e||(null==n||null===(r=n.color)||void 0===r?void 0:r.background)||(null==n||null===(o=n.color)||void 0===o?void 0:o.gradient)||t},transform:({align:e,anchor:t,backgroundColor:n,gradient:r,style:o},a)=>{var i,s;return Ho("core/cover",{align:e,anchor:t,overlayColor:n,customOverlayColor:null==o||null===(i=o.color)||void 0===i?void 0:i.background,gradient:r,customGradient:null==o||null===(s=o.color)||void 0===s?void 0:s.gradient},a)}}],to:[{type:"block",blocks:["core/image"],isMatch:({backgroundType:e,url:t,overlayColor:n,customOverlayColor:r,gradient:o,customGradient:a})=>t?e===u0:!(n||r||o||a),transform:({title:e,url:t,align:n,id:r,anchor:o,style:a})=>{var i;return Ho("core/image",{caption:e,url:t,align:n,id:r,anchor:o,style:{color:{duotone:null==a||null===(i=a.color)||void 0===i?void 0:i.duotone}}})}},{type:"block",blocks:["core/video"],isMatch:({backgroundType:e,url:t,overlayColor:n,customOverlayColor:r,gradient:o,customGradient:a})=>t?e===d0:!(n||r||o||a),transform:({title:e,url:t,align:n,id:r,anchor:o})=>Ho("core/video",{caption:e,src:t,id:r,align:n,anchor:o})}]},a1={apiVersion:2,name:"core/cover",title:"Cover",category:"media",description:"Add an image or video with a text overlay — great for headers.",textdomain:"default",attributes:{url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"}},supports:{anchor:!0,align:!0,html:!1,spacing:{padding:!0},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",text:!1,background:!1}},editorStyle:"wp-block-cover-editor",style:"wp-block-cover"},{name:i1}=a1,s1={icon:l0,example:{attributes:{customOverlayColor:"#065174",dimRatio:40,url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{customFontSize:48,content:er("Snow Patrol"),align:"center"}}]},transforms:o1,save:function({attributes:e}){const{backgroundType:t,gradient:n,contentPosition:r,customGradient:o,customOverlayColor:a,dimRatio:i,focalPoint:s,hasParallax:l,isRepeated:c,overlayColor:u,url:d,id:p,minHeight:m,minHeightUnit:h}=e,f=mC("background-color",u),g=fC(n),b=h?`${m}${h}`:m,y=u0===t,v=d0===t,_=!(l||c),M={...y&&!_?p0(d):{},backgroundColor:f?void 0:a,background:o&&!d?o:void 0,minHeight:b||void 0},k=s&&_?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,w=so()(h0(i),f,{"has-background-dim":0!==i,"has-parallax":l,"is-repeated":c,"has-background-gradient":n||o,[g]:!d&&g,"has-custom-content-position":!g0(r)},b0(r));return(0,tt.createElement)("div",VR.save({className:w,style:M}),d&&(n||o)&&0!==i&&(0,tt.createElement)("span",{"aria-hidden":"true",className:so()("wp-block-cover__gradient-background",g),style:o?{background:o}:void 0}),y&&_&&d&&(0,tt.createElement)("img",{className:so()("wp-block-cover__image-background",p?`wp-image-${p}`:null),alt:"",src:d,style:{objectPosition:k},"data-object-fit":"cover","data-object-position":k}),v&&d&&(0,tt.createElement)("video",{className:so()("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:k},"data-object-fit":"cover","data-object-position":k}),(0,tt.createElement)("div",{className:"wp-block-cover__inner-container"},(0,tt.createElement)(JH.Content,null)))},edit:r1,deprecated:v0},l1=({blockSupportsResponsive:e,showEditButton:t,themeSupportsResponsive:n,allowResponsive:r,getResponsiveHelp:o,toggleResponsive:a,switchBackToURLInput:i})=>(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,null,(0,tt.createElement)(eb,null,t&&(0,tt.createElement)(qg,{className:"components-toolbar__control",label:er("Edit URL"),icon:Qq,onClick:i}))),n&&e&&(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("Media settings"),className:"blocks-responsive"},(0,tt.createElement)(KN,{label:er("Resize for smaller devices"),checked:r,help:o,onChange:a})))),c1=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z"})),u1=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z"})),d1=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),p1=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z"})),m1={foreground:"#1da1f2",src:(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(co,null,(0,tt.createElement)(uo,{d:"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z"})))},h1={foreground:"#ff0000",src:(0,tt.createElement)(mo,{viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"}))},f1={foreground:"#3b5998",src:(0,tt.createElement)(mo,{viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"}))},g1=(0,tt.createElement)(mo,{viewBox:"0 0 24 24"},(0,tt.createElement)(co,null,(0,tt.createElement)(uo,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"}))),b1={foreground:"#0073AA",src:(0,tt.createElement)(mo,{viewBox:"0 0 24 24"},(0,tt.createElement)(co,null,(0,tt.createElement)(uo,{d:"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"})))},y1={foreground:"#1db954",src:(0,tt.createElement)(mo,{viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325"}))},v1=(0,tt.createElement)(mo,{viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z"})),_1={foreground:"#1ab7ea",src:(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(co,null,(0,tt.createElement)(uo,{d:"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z"})))},M1=(0,tt.createElement)(mo,{viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M22 11.816c0-1.256-1.02-2.277-2.277-2.277-.593 0-1.122.24-1.526.613-1.48-.965-3.455-1.594-5.647-1.69l1.17-3.702 3.18.75c.01 1.027.847 1.86 1.877 1.86 1.035 0 1.877-.84 1.877-1.877 0-1.035-.842-1.877-1.877-1.877-.77 0-1.43.466-1.72 1.13L13.55 3.92c-.204-.047-.4.067-.46.26l-1.35 4.27c-2.317.037-4.412.67-5.97 1.67-.402-.355-.917-.58-1.493-.58C3.02 9.54 2 10.56 2 11.815c0 .814.433 1.523 1.078 1.925-.037.222-.06.445-.06.673 0 3.292 4.01 5.97 8.94 5.97s8.94-2.678 8.94-5.97c0-.214-.02-.424-.052-.632.687-.39 1.154-1.12 1.154-1.964zm-3.224-7.422c.606 0 1.1.493 1.1 1.1s-.493 1.1-1.1 1.1-1.1-.494-1.1-1.1.493-1.1 1.1-1.1zm-16 7.422c0-.827.673-1.5 1.5-1.5.313 0 .598.103.838.27-.85.675-1.477 1.478-1.812 2.36-.32-.274-.525-.676-.525-1.13zm9.183 7.79c-4.502 0-8.165-2.33-8.165-5.193S7.457 9.22 11.96 9.22s8.163 2.33 8.163 5.193-3.663 5.193-8.164 5.193zM20.635 13c-.326-.89-.948-1.7-1.797-2.383.247-.186.55-.3.882-.3.827 0 1.5.672 1.5 1.5 0 .482-.23.91-.586 1.184zm-11.64 1.704c-.76 0-1.397-.616-1.397-1.376 0-.76.636-1.397 1.396-1.397.76 0 1.376.638 1.376 1.398 0 .76-.616 1.376-1.376 1.376zm7.405-1.376c0 .76-.615 1.376-1.375 1.376s-1.4-.616-1.4-1.376c0-.76.64-1.397 1.4-1.397.76 0 1.376.638 1.376 1.398zm-1.17 3.38c.15.152.15.398 0 .55-.675.674-1.728 1.002-3.22 1.002l-.01-.002-.012.002c-1.492 0-2.544-.328-3.218-1.002-.152-.152-.152-.398 0-.55.152-.152.4-.15.55 0 .52.52 1.394.775 2.67.775l.01.002.01-.002c1.276 0 2.15-.253 2.67-.775.15-.152.398-.152.55 0z"})),k1={foreground:"#35465c",src:(0,tt.createElement)(mo,{viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z"}))},w1=(0,tt.createElement)(mo,{viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z"}),(0,tt.createElement)(uo,{d:"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z"}),(0,tt.createElement)(uo,{d:"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z"})),E1=(0,tt.createElement)(mo,{viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",fill:"#4bc7ee"}),(0,tt.createElement)(uo,{d:"m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z",fill:"#d4cdcb"}),(0,tt.createElement)(uo,{d:"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",fill:"#c3d82e"}),(0,tt.createElement)(uo,{d:"m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",fill:"#e4ecb0"}),(0,tt.createElement)(uo,{d:"m.0206909 21 19.5468091-9.063 1.6621 2.8344z",fill:"#209dbd"}),(0,tt.createElement)(uo,{d:"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",fill:"#7cb3c9"})),L1=(0,tt.createElement)(mo,{viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"m12.1479 18.5957c-2.4949 0-4.28131-1.7558-4.28131-4.0658 0-2.2176 1.78641-4.0965 4.09651-4.0965 2.2793 0 4.0349 1.7864 4.0349 4.1581 0 2.2794-1.7556 4.0042-3.8501 4.0042zm8.3521-18.5957-4.5329 1v7c-1.1088-1.41691-2.8028-1.8787-4.8049-1.8787-2.09443 0-3.97329.76993-5.5133 2.27917-1.72483 1.66323-2.6489 3.78863-2.6489 6.16033 0 2.5873.98562 4.8049 2.89526 6.499 1.44763 1.2936 3.17251 1.9402 5.17454 1.9402 1.9713 0 3.4498-.5236 4.8973-1.9402v1.9402h4.5329c0-7.6359 0-15.3641 0-23z",fill:"#333436"})),A1=()=>(0,tt.createElement)("div",{className:"wp-block-embed is-loading"},(0,tt.createElement)(cq,null),(0,tt.createElement)("p",null,er("Embedding…"))),S1=({icon:e,label:t,value:n,onSubmit:r,onChange:o,cannotEmbed:a,fallback:i,tryAgain:s})=>(0,tt.createElement)(yH,{icon:(0,tt.createElement)(MB,{icon:e,showColors:!0}),label:t,className:"wp-block-embed",instructions:er("Paste a link to the content you want to display on your site.")},(0,tt.createElement)("form",{onSubmit:r},(0,tt.createElement)("input",{type:"url",value:n||"",className:"components-placeholder__input","aria-label":t,placeholder:er("Enter URL to embed here…"),onChange:o}),(0,tt.createElement)(wf,{variant:"primary",type:"submit"},tr("Embed","button label"))),(0,tt.createElement)("div",{className:"components-placeholder__learn-more"},(0,tt.createElement)(CA,{href:er("https://wordpress.org/support/article/embeds/")},er("Learn more about embeds"))),a&&(0,tt.createElement)("div",{className:"components-placeholder__error"},(0,tt.createElement)("div",{className:"components-placeholder__instructions"},er("Sorry, this content could not be embedded.")),(0,tt.createElement)(wf,{variant:"secondary",onClick:s},tr("Try again","button label"))," ",(0,tt.createElement)(wf,{variant:"secondary",onClick:i},tr("Convert to link","button label"))));function C1({iframeRef:e,...t}){const n=(0,tt.useRef)(),r=Rm([e,n]);return(0,tt.useEffect)((()=>{const e=n.current,{ownerDocument:t}=e,{defaultView:r}=t;function o(){t.activeElement===e&&e.focus()}return r.addEventListener("blur",o),()=>{r.removeEventListener("blur",o)}}),[]),(0,tt.createElement)("iframe",ot({ref:r},t))}function T1({html:e="",title:t="",type:n,styles:r=[],scripts:o=[],onFocus:a}){const i=(0,tt.useRef)(),[s,l]=(0,tt.useState)(0),[c,u]=(0,tt.useState)(0);function d(a=!1){if(!function(){try{return!!i.current.contentDocument.body}catch(e){return!1}}())return;const{contentDocument:s,ownerDocument:l}=i.current,{body:c}=s;if(!a&&null!==c.getAttribute("data-resizable-iframe-connected"))return;const u=(0,tt.createElement)("html",{lang:l.documentElement.lang,className:n},(0,tt.createElement)("head",null,(0,tt.createElement)("title",null,t),(0,tt.createElement)("style",{dangerouslySetInnerHTML:{__html:"\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div,\n\tbody > div iframe {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n"}}),r.map(((e,t)=>(0,tt.createElement)("style",{key:t,dangerouslySetInnerHTML:{__html:e}})))),(0,tt.createElement)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:n},(0,tt.createElement)("div",{dangerouslySetInnerHTML:{__html:e}}),(0,tt.createElement)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:"\n\t( function() {\n\t\tvar observer;\n\n\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfunction sendResize() {\n\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\twindow.parent.postMessage( {\n\t\t\t\taction: 'resize',\n\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\theight: clientBoundingRect.height,\n\t\t\t}, '*' );\n\t\t}\n\n\t\tobserver = new MutationObserver( sendResize );\n\t\tobserver.observe( document.body, {\n\t\t\tattributes: true,\n\t\t\tattributeOldValue: false,\n\t\t\tcharacterData: true,\n\t\t\tcharacterDataOldValue: false,\n\t\t\tchildList: true,\n\t\t\tsubtree: true\n\t\t} );\n\n\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t// the iframe root and interfere with our mechanism for\n\t\t// determining the unconstrained page bounds.\n\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\tif( ruleOrNode.style ) {\n\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t} );\n\n\t\tdocument.body.style.position = 'absolute';\n\t\tdocument.body.style.width = '100%';\n\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\n\t\tsendResize();\n\n\t\t// Resize events can change the width of elements with 100% width, but we don't\n\t\t// get an DOM mutations for that, so do the resize when the window is resized, too.\n\t\twindow.addEventListener( 'resize', sendResize, true );\n} )();"}}),o.map((e=>(0,tt.createElement)("script",{key:e,src:e})))));s.open(),s.write(""+ei(u)),s.close()}return(0,tt.useEffect)((()=>{function e(){d(!1)}function t(e){const t=i.current;if(!t||t.contentWindow!==e.source)return;let n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}"resize"===n.action&&(l(n.width),u(n.height))}d();const{ownerDocument:n}=i.current,{defaultView:r}=n;return i.current.addEventListener("load",e,!1),r.addEventListener("message",t),()=>{var n;null===(n=i.current)||void 0===n||n.removeEventListener("load",e,!1),r.addEventListener("message",t)}}),[]),(0,tt.useEffect)((()=>{d()}),[t,n,r,o]),(0,tt.useEffect)((()=>{d(!0)}),[e]),(0,tt.createElement)(C1,{iframeRef:i,title:t,className:"components-sandbox",sandbox:"allow-scripts allow-same-origin allow-presentation",onFocus:a,width:Math.ceil(s),height:Math.ceil(c)})}function x1({html:e}){const t=(0,tt.useRef)();(0,tt.useEffect)((()=>{const{ownerDocument:e}=t.current,{defaultView:n}=e;function r({data:{secret:t,message:n,value:r}={}}){[t,n,r].some((e=>!e))||"height"!==n||e.querySelectorAll(`iframe[data-secret="${t}"`).forEach((e=>{+e.height!==r&&(e.height=r)}))}function o(){const{activeElement:n}=e;"IFRAME"===n.tagName&&n.parentNode===t.current&&n.focus()}return n.addEventListener("message",r),n.addEventListener("blur",o),()=>{n.removeEventListener("message",r),n.removeEventListener("blur",o)}}),[]);const n=(0,tt.useMemo)((()=>{const t=(new window.DOMParser).parseFromString(e,"text/html"),n=t.querySelector("iframe");n&&n.removeAttribute("style");const r=t.querySelector("blockquote");return r&&(r.style.display="none"),t.body.innerHTML}),[e]);return(0,tt.createElement)("div",{ref:t,className:"wp-block-embed__wrapper",dangerouslySetInnerHTML:{__html:n}})}class z1 extends tt.Component{constructor(){super(...arguments),this.hideOverlay=this.hideOverlay.bind(this),this.state={interactive:!1}}static getDerivedStateFromProps(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}hideOverlay(){this.setState({interactive:!0})}render(){const{preview:e,previewable:t,url:n,type:r,caption:o,onCaptionChange:a,isSelected:i,className:s,icon:l,label:c,insertBlocksAfter:u}=this.props,{scripts:d}=e,{interactive:p}=this.state,m="photo"===r?(e=>{const t=e.thumbnail_url||e.url,n=(0,tt.createElement)("p",null,(0,tt.createElement)("img",{src:t,alt:e.title,width:"100%"}));return ei(n)})(e):e.html,h=new URL(n).host.split("."),f=h.splice(h.length-2,h.length-1).join("."),g=pn(er("Embedded content from %s"),f),b=NG()(r,s,"wp-block-embed__wrapper"),y="wp-embed"===r?(0,tt.createElement)(x1,{html:m}):(0,tt.createElement)("div",{className:"wp-block-embed__wrapper"},(0,tt.createElement)(T1,{html:m,scripts:d,title:g,type:b,onFocus:this.hideOverlay}),!p&&(0,tt.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}));return(0,tt.createElement)("figure",{className:NG()(s,"wp-block-embed",{"is-type-video":"video"===r})},t?y:(0,tt.createElement)(yH,{icon:(0,tt.createElement)(MB,{icon:l,showColors:!0}),label:c},(0,tt.createElement)("p",{className:"components-placeholder__error"},(0,tt.createElement)("a",{href:n},n)),(0,tt.createElement)("p",{className:"components-placeholder__error"},pn(er("Embedded content from %s can't be previewed in the editor."),f))),(!Cj.isEmpty(o)||i)&&(0,tt.createElement)(Cj,{tagName:"figcaption",placeholder:er("Add caption"),value:o,onChange:a,inlineToolbar:!0,__unstableOnSplitAtEnd:()=>u(Ho("core/paragraph"))}))}}const O1=z1;function N1(e){return er(e?"This embed will preserve its aspect ratio when the browser is resized.":"This embed may not preserve its aspect ratio when the browser is resized.")}const D1=e=>{const{attributes:{providerNameSlug:t,previewable:n,responsive:r,url:o},attributes:a,isSelected:i,onReplace:s,setAttributes:l,insertBlocksAfter:c,onFocus:u}=e,d={title:tr("Embed","block title"),icon:c1},{icon:p,title:m}=(e=>{var t;return null===(t=Yo(DG))||void 0===t?void 0:t.find((({name:t})=>t===e))})(t)||d,[h,f]=(0,tt.useState)(o),[g,b]=(0,tt.useState)(!1),{invalidateResolution:y}=sd(yd),{preview:v,fetching:_,themeSupportsResponsive:M,cannotEmbed:k}=Cl((e=>{var t;const{getEmbedPreview:n,isPreviewEmbedFallback:r,isRequestingEmbedPreview:a,getThemeSupports:i}=e(yd);if(!o)return{fetching:!1,cannotEmbed:!1};const s=n(o),l=r(o),c=!1===(null==s?void 0:s.html)&&void 0===(null==s?void 0:s.type),u=404===(null==s||null===(t=s.data)||void 0===t?void 0:t.status),d=!!s&&!c&&!u;return{preview:d?s:void 0,fetching:a(o),themeSupportsResponsive:i()["responsive-embeds"],cannotEmbed:!d||l}}),[o]),w=()=>{const{allowResponsive:e,className:t}=a;return{...a,...WG(v,m,t,r,e)}};(0,tt.useEffect)((()=>{if(null==v||!v.html||!k||_)return;const e=o.replace(/\/$/,"");f(e),b(!1),l({url:e})}),[null==v?void 0:v.html,o]),(0,tt.useEffect)((()=>{if(v&&!g&&(l(w()),s)){const t=IG(e,w());t&&s(t)}}),[v,g]);const E=VR();if(_)return(0,tt.createElement)(mZ,E,(0,tt.createElement)(A1,null));const L=pn(er("%s URL"),m);if(!v||k||g)return(0,tt.createElement)(mZ,E,(0,tt.createElement)(S1,{icon:p,label:L,onFocus:u,onSubmit:e=>{e&&e.preventDefault(),b(!1),l({url:h})},value:h,cannotEmbed:k,onChange:e=>f(e.target.value),fallback:()=>function(e,t){const n=(0,tt.createElement)("a",{href:e},e);t(Ho("core/paragraph",{content:ei(n)}))}(h,s),tryAgain:()=>{y("getEmbedPreview",[h])}}));const{caption:A,type:S,allowResponsive:C,className:T}=w(),x=so()(T,e.className);return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(l1,{showEditButton:v&&!k,themeSupportsResponsive:M,blockSupportsResponsive:r,allowResponsive:C,getResponsiveHelp:N1,toggleResponsive:()=>{const{allowResponsive:e,className:t}=a,{html:n}=v,o=!e;l({allowResponsive:o,className:RG(n,t,r&&o)})},switchBackToURLInput:()=>b(!0)}),(0,tt.createElement)(mZ,E,(0,tt.createElement)(O1,{preview:v,previewable:n,className:x,url:h,type:S,caption:A,onCaptionChange:e=>l({caption:e}),isSelected:i,icon:p,label:L,insertBlocksAfter:c})))};const{name:B1}={apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},I1={from:[{type:"raw",isMatch:e=>{var t,n;return"P"===e.nodeName&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)&&1===(null===(t=e.textContent)||void 0===t||null===(n=t.match(/https/gi))||void 0===n?void 0:n.length)},transform:e=>Ho(B1,{url:e.textContent.trim()})}],to:[{type:"block",blocks:["core/paragraph"],isMatch:({url:e})=>!!e,transform:({url:e,caption:t})=>{let n=`${e}`;return null!=t&&t.trim()&&(n+=`
${t}`),Ho("core/paragraph",{content:n})}}]},P1=[{name:"twitter",title:"Twitter",icon:m1,keywords:["tweet",er("social")],description:er("Embed a tweet."),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i],attributes:{providerNameSlug:"twitter",responsive:!0}},{name:"youtube",title:"YouTube",icon:h1,keywords:[er("music"),er("video")],description:er("Embed a YouTube video."),patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i],attributes:{providerNameSlug:"youtube",responsive:!0}},{name:"facebook",title:"Facebook",icon:f1,keywords:[er("social")],description:er("Embed a Facebook post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}},{name:"instagram",title:"Instagram",icon:g1,keywords:[er("image"),er("social")],description:er("Embed an Instagram post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"instagram",responsive:!0}},{name:"wordpress",title:"WordPress",icon:b1,keywords:[er("post"),er("blog")],description:er("Embed a WordPress post."),attributes:{providerNameSlug:"wordpress"}},{name:"soundcloud",title:"SoundCloud",icon:u1,keywords:[er("music"),er("audio")],description:er("Embed SoundCloud content."),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],attributes:{providerNameSlug:"soundcloud",responsive:!0}},{name:"spotify",title:"Spotify",icon:y1,keywords:[er("music"),er("audio")],description:er("Embed Spotify content."),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i],attributes:{providerNameSlug:"spotify",responsive:!0}},{name:"flickr",title:"Flickr",icon:v1,keywords:[er("image")],description:er("Embed Flickr content."),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i],attributes:{providerNameSlug:"flickr",responsive:!0}},{name:"vimeo",title:"Vimeo",icon:_1,keywords:[er("video")],description:er("Embed a Vimeo video."),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i],attributes:{providerNameSlug:"vimeo",responsive:!0}},{name:"animoto",title:"Animoto",icon:E1,description:er("Embed an Animoto video."),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],attributes:{providerNameSlug:"animoto",responsive:!0}},{name:"cloudup",title:"Cloudup",icon:c1,description:er("Embed Cloudup content."),patterns:[/^https?:\/\/cloudup\.com\/.+/i],attributes:{providerNameSlug:"cloudup",responsive:!0}},{name:"collegehumor",title:"CollegeHumor",icon:p1,description:er("Embed CollegeHumor content."),scope:["block"],patterns:[],attributes:{providerNameSlug:"collegehumor",responsive:!0}},{name:"crowdsignal",title:"Crowdsignal",icon:c1,keywords:["polldaddy",er("survey")],description:er("Embed Crowdsignal (formerly Polldaddy) content."),patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.survey\.fm)\/.+/i],attributes:{providerNameSlug:"crowdsignal",responsive:!0}},{name:"dailymotion",title:"Dailymotion",icon:L1,keywords:[er("video")],description:er("Embed a Dailymotion video."),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],attributes:{providerNameSlug:"dailymotion",responsive:!0}},{name:"imgur",title:"Imgur",icon:d1,description:er("Embed Imgur content."),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i],attributes:{providerNameSlug:"imgur",responsive:!0}},{name:"issuu",title:"Issuu",icon:c1,description:er("Embed Issuu content."),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i],attributes:{providerNameSlug:"issuu",responsive:!0}},{name:"kickstarter",title:"Kickstarter",icon:c1,description:er("Embed Kickstarter content."),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i],attributes:{providerNameSlug:"kickstarter",responsive:!0}},{name:"meetup-com",title:"Meetup.com",icon:c1,description:er("Embed Meetup.com content."),patterns:[/^https?:\/\/(www\.)?meetu(\.ps|p\.com)\/.+/i],attributes:{providerNameSlug:"meetup-com",responsive:!0}},{name:"mixcloud",title:"Mixcloud",icon:u1,keywords:[er("music"),er("audio")],description:er("Embed Mixcloud content."),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],attributes:{providerNameSlug:"mixcloud",responsive:!0}},{name:"reddit",title:"Reddit",icon:M1,description:er("Embed a Reddit thread."),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i],attributes:{providerNameSlug:"reddit",responsive:!0}},{name:"reverbnation",title:"ReverbNation",icon:u1,description:er("Embed ReverbNation content."),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],attributes:{providerNameSlug:"reverbnation",responsive:!0}},{name:"screencast",title:"Screencast",icon:p1,description:er("Embed Screencast content."),patterns:[/^https?:\/\/(www\.)?screencast\.com\/.+/i],attributes:{providerNameSlug:"screencast",responsive:!0}},{name:"scribd",title:"Scribd",icon:c1,description:er("Embed Scribd content."),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i],attributes:{providerNameSlug:"scribd",responsive:!0}},{name:"slideshare",title:"Slideshare",icon:c1,description:er("Embed Slideshare content."),patterns:[/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i],attributes:{providerNameSlug:"slideshare",responsive:!0}},{name:"smugmug",title:"SmugMug",icon:d1,description:er("Embed SmugMug content."),patterns:[/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],attributes:{providerNameSlug:"smugmug",previewable:!1,responsive:!0}},{name:"speaker-deck",title:"Speaker Deck",icon:c1,description:er("Embed Speaker Deck content."),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],attributes:{providerNameSlug:"speaker-deck",responsive:!0}},{name:"tiktok",title:"TikTok",icon:p1,keywords:[er("video")],description:er("Embed a TikTok video."),patterns:[/^https?:\/\/(www\.)?tiktok\.com\/.+/i],attributes:{providerNameSlug:"tiktok",responsive:!0}},{name:"ted",title:"TED",icon:p1,description:er("Embed a TED video."),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],attributes:{providerNameSlug:"ted",responsive:!0}},{name:"tumblr",title:"Tumblr",icon:k1,keywords:[er("social")],description:er("Embed a Tumblr post."),patterns:[/^https?:\/\/(www\.)?tumblr\.com\/.+/i],attributes:{providerNameSlug:"tumblr",responsive:!0}},{name:"videopress",title:"VideoPress",icon:p1,keywords:[er("video")],description:er("Embed a VideoPress video."),patterns:[/^https?:\/\/videopress\.com\/.+/i],attributes:{providerNameSlug:"videopress",responsive:!0}},{name:"wordpress-tv",title:"WordPress.tv",icon:p1,description:er("Embed a WordPress.tv video."),patterns:[/^https?:\/\/wordpress\.tv\/.+/i],attributes:{providerNameSlug:"wordpress-tv",responsive:!0}},{name:"amazon-kindle",title:"Amazon Kindle",icon:w1,keywords:[er("ebook")],description:er("Embed Amazon Kindle content."),patterns:[/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,/^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i],attributes:{providerNameSlug:"amazon-kindle"}}];P1.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.providerNameSlug===t.providerNameSlug)}));const R1=P1,{attributes:W1}={apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},Y1=[{attributes:W1,save({attributes:{url:e,caption:t,type:n,providerNameSlug:r}}){if(!e)return null;const o=so()("wp-block-embed",{[`is-type-${n}`]:n,[`is-provider-${r}`]:r});return(0,tt.createElement)("figure",{className:o},`\n${e}\n`,!Cj.isEmpty(t)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",value:t}))}}],H1={apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1},previewable:{type:"boolean",default:!0}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},{name:q1}=H1,j1={icon:c1,edit:D1,save:function({attributes:e}){const{url:t,caption:n,type:r,providerNameSlug:o}=e;if(!t)return null;const a=NG()("wp-block-embed",{[`is-type-${r}`]:r,[`is-provider-${o}`]:o,[`wp-block-embed-${o}`]:o});return(0,tt.createElement)("figure",VR.save({className:a}),(0,tt.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${t}\n`),!Cj.isEmpty(n)&&(0,tt.createElement)(Cj.Content,{tagName:"figcaption",value:n}))},transforms:I1,variations:R1,deprecated:Y1},F1=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z"}));function V1({hrefs:e,openInNewWindow:t,showDownloadButton:n,changeLinkDestinationOption:r,changeOpenInNewWindow:o,changeShowDownloadButton:a,displayPreview:i,changeDisplayPreview:s,previewHeight:l,changePreviewHeight:c}){const{href:u,textLinkHref:d,attachmentPage:p}=e;let m=[{value:u,label:er("URL")}];return p&&(m=[{value:u,label:er("Media file")},{value:p,label:er("Attachment page")}]),(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(FA,null,u.endsWith(".pdf")&&(0,tt.createElement)(BA,{title:er("PDF settings")},(0,tt.createElement)(KN,{label:er("Show inline embed"),help:i?er("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!i,onChange:s}),(0,tt.createElement)(rT,{label:er("Height in pixels"),min:$1,max:Math.max(K1,l),value:l,onChange:c})),(0,tt.createElement)(BA,{title:er("Text link settings")},(0,tt.createElement)(KS,{label:er("Link to"),value:d,options:m,onChange:r}),(0,tt.createElement)(KN,{label:er("Open in new tab"),checked:t,onChange:o})),(0,tt.createElement)(BA,{title:er("Download button settings")},(0,tt.createElement)(KN,{label:er("Show download button"),checked:n,onChange:a}))))}const X1=()=>!(window.navigator.userAgent.indexOf("Mobi")>-1)&&(!(window.navigator.userAgent.indexOf("Android")>-1)&&(!(window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2)&&!((window.ActiveXObject||"ActiveXObject"in window)&&!U1("AcroPDF.PDF")&&!U1("PDF.PdfCtrl")))),U1=e=>{let t;try{t=new window.ActiveXObject(e)}catch(e){t=void 0}return t},$1=200,K1=2e3;function G1({text:e,disabled:t}){const{createNotice:n}=sd(UI),r=zI(e,(()=>{n("info",er("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,tt.createElement)(qg,{className:"components-clipboard-toolbar-button",ref:r,disabled:t},er("Copy URL"))}const J1=YK((function({attributes:e,isSelected:t,setAttributes:n,noticeUI:r,noticeOperations:o}){const{id:a,fileName:i,href:s,textLinkHref:l,textLinkTarget:c,showDownloadButton:u,downloadButtonText:d,displayPreview:p,previewHeight:m}=e,[h,f]=(0,tt.useState)(!1),{media:g,mediaUpload:b}=Cl((e=>({media:void 0===a?void 0:e(yd).getMedia(a),mediaUpload:e(nk).getSettings().mediaUpload})),[a]),{toggleSelection:y}=sd(nk);function v(e){if(e&&e.url){f(!1);const t=e.url.endsWith(".pdf");n({href:e.url,fileName:e.title,textLinkHref:e.url,id:e.id,displayPreview:!!t||void 0,previewHeight:t?600:void 0})}}function _(e){f(!0),o.removeAllNotices(),o.createErrorNotice(e)}function M(e){n({downloadButtonText:e.replace(/<\/?a[^>]*>/g,"")})}(0,tt.useEffect)((()=>{if(Js(s)){const e=Ks(s);b({filesList:[e],onFileChange:([e])=>v(e),onError:e=>{f(!0),o.createErrorNotice(e)}}),Gs(s)}void 0===d&&M(tr("Download","button label"))}),[]);const k=g&&g.link,w=VR({className:so()(Js(s)&&ph({type:"loading"}),{"is-transient":Js(s)})}),E=X1()&&p;return!s||h?(0,tt.createElement)("div",w,(0,tt.createElement)(oj,{icon:(0,tt.createElement)(MB,{icon:F1}),labels:{title:er("File"),instructions:er("Upload a file or pick one from your media library.")},onSelect:v,notices:r,onError:_,accept:"*"})):(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(V1,{hrefs:{href:s,textLinkHref:l,attachmentPage:k},openInNewWindow:!!c,showDownloadButton:u,changeLinkDestinationOption:function(e){n({textLinkHref:e})},changeOpenInNewWindow:function(e){n({textLinkTarget:!!e&&"_blank"})},changeShowDownloadButton:function(e){n({showDownloadButton:e})},displayPreview:p,changeDisplayPreview:function(e){n({displayPreview:e})},previewHeight:m,changePreviewHeight:function(e){const t=Math.max(parseInt(e,10),$1);n({previewHeight:t})}}),(0,tt.createElement)(lk,{group:"other"},(0,tt.createElement)(Jq,{mediaId:a,mediaURL:s,accept:"*",onSelect:v,onError:_}),(0,tt.createElement)(G1,{text:s,disabled:Js(s)})),(0,tt.createElement)("div",w,E&&(0,tt.createElement)(LG,{size:{height:m},minHeight:$1,maxHeight:K1,minWidth:"100%",grid:[10,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>y(!1),onResizeStop:function(e,t,r,o){y(!0);const a=parseInt(m+o.height,10);n({previewHeight:a})},showHandle:t},(0,tt.createElement)("object",{className:"wp-block-file__preview",data:s,type:"application/pdf","aria-label":er("Embed of the selected PDF file.")}),!t&&(0,tt.createElement)("div",{className:"wp-block-file__preview-overlay"})),(0,tt.createElement)("div",{className:"wp-block-file__content-wrapper"},(0,tt.createElement)(Cj,{tagName:"a",value:i,placeholder:er("Write file name…"),withoutInteractiveFormatting:!0,onChange:e=>n({fileName:e}),href:l}),u&&(0,tt.createElement)("div",{className:"wp-block-file__button-richtext-wrapper"},(0,tt.createElement)(Cj,{tagName:"div","aria-label":er("Download button text"),className:"wp-block-file__button",value:d,withoutInteractiveFormatting:!0,placeholder:er("Add text…"),onChange:e=>M(e)})))))}));const Z1={from:[{type:"files",isMatch:e=>e.length>0,priority:15,transform:e=>{const t=[];return e.forEach((e=>{const n=$s(e);t.push(Ho("core/file",{href:n,fileName:e.name,textLinkHref:n}))})),t}},{type:"block",blocks:["core/audio"],transform:e=>Ho("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],transform:e=>Ho("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],transform:e=>Ho("core/file",{href:e.url,fileName:e.caption,textLinkHref:e.url,id:e.id,anchor:e.anchor})}],to:[{type:"block",blocks:["core/audio"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=tn(yd),n=t(e);return!!n&&(0,at.includes)(n.mime_type,"audio")},transform:e=>Ho("core/audio",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=tn(yd),n=t(e);return!!n&&(0,at.includes)(n.mime_type,"video")},transform:e=>Ho("core/video",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],isMatch:({id:e})=>{if(!e)return!1;const{getMedia:t}=tn(yd),n=t(e);return!!n&&(0,at.includes)(n.mime_type,"image")},transform:e=>Ho("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]},Q1={apiVersion:2,name:"core/file",title:"File",category:"media",description:"Add a link to a downloadable file.",keywords:["document","pdf","download"],textdomain:"default",attributes:{id:{type:"number"},href:{type:"string"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},viewScript:"file:./view.min.js",editorStyle:"wp-block-file-editor",style:"wp-block-file"},{name:e2}=Q1,t2={icon:F1,example:{attributes:{href:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",fileName:tr("Armstrong_Small_Step","Name of the file")}},transforms:Z1,edit:J1,save:function({attributes:e}){const{href:t,fileName:n,textLinkHref:r,textLinkTarget:o,showDownloadButton:a,downloadButtonText:i,displayPreview:s,previewHeight:l}=e,c=Cj.isEmpty(n)?er("PDF embed"):pn(er("Embed of %s."),n);return t&&(0,tt.createElement)("div",VR.save(),s&&(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${l}px`},"aria-label":c})),!Cj.isEmpty(n)&&(0,tt.createElement)("a",{href:r,target:o,rel:o?"noreferrer noopener":void 0},(0,tt.createElement)(Cj.Content,{value:n})),a&&(0,tt.createElement)("a",{href:t,className:"wp-block-file__button",download:!0},(0,tt.createElement)(Cj.Content,{value:i})))}},n2=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"}));const r2={from:[{type:"block",blocks:["core/code"],transform:({content:e})=>Ho("core/html",{content:e})}]},o2={apiVersion:2,name:"core/html",title:"Custom HTML",category:"widgets",description:"Add custom HTML code and preview it as you edit.",keywords:["embed"],textdomain:"default",attributes:{content:{type:"string",source:"html"}},supports:{customClassName:!1,className:!1,html:!1},editorStyle:"wp-block-html-editor"},{name:a2}=o2,i2={icon:n2,example:{attributes:{content:""+er("Welcome to the wonderful world of blocks…")+""}},edit:function({attributes:e,setAttributes:t,isSelected:n}){const[r,o]=(0,tt.useState)(),a=Cl((e=>["\n\t\t\thtml,body,:root {\n\t\t\t\tmargin: 0 !important;\n\t\t\t\tpadding: 0 !important;\n\t\t\t\toverflow: visible !important;\n\t\t\t\tmin-height: auto !important;\n\t\t\t}\n\t\t",...tV(e(nk).getSettings().styles)]),[]);return(0,tt.createElement)("div",VR({className:"block-library-html__edit"}),(0,tt.createElement)(lk,null,(0,tt.createElement)(eb,null,(0,tt.createElement)(qg,{className:"components-tab-button",isPressed:!r,onClick:function(){o(!1)}},(0,tt.createElement)("span",null,"HTML")),(0,tt.createElement)(qg,{className:"components-tab-button",isPressed:r,onClick:function(){o(!0)}},(0,tt.createElement)("span",null,er("Preview"))))),(0,tt.createElement)(jP.Consumer,null,(o=>r||o?(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(T1,{html:e.content,styles:a}),!n&&(0,tt.createElement)("div",{className:"block-library-html__preview-overlay"})):(0,tt.createElement)(zj,{value:e.content,onChange:e=>t({content:e}),placeholder:er("Write HTML…"),"aria-label":er("HTML")}))))},save:function({attributes:e}){return(0,tt.createElement)(Ia,null,e.content)},transforms:r2},s2=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M3 18h8V6H3v12zM14 7.5V9h7V7.5h-7zm0 5.3h7v-1.5h-7v1.5zm0 3.7h7V15h-7v1.5z"})),l2=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M18 2l2 4h-2l-2-4h-3l2 4h-2l-2-4h-1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V2zm2 12H10V4.4L11.8 8H20z"}),(0,tt.createElement)(uo,{d:"M14 20H4V10h3V8H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3h-2z"}),(0,tt.createElement)(uo,{d:"M5 19h8l-1.59-2H9.24l-.84 1.1L7 16.3 5 19z"})),c2=["image","video"];function u2(e,t){return e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${100*t.x}% ${100*t.y}%`:"50% 50%"}:{}}const d2=(0,tt.forwardRef)((({isSelected:e,isStackedOnMobile:t,...n},r)=>{const o=Gp("small","<");return(0,tt.createElement)(LG,ot({ref:r,showHandle:e&&(!o||!t)},n))}));function p2({mediaId:e,mediaUrl:t,onSelectMedia:n}){return(0,tt.createElement)(lk,{group:"other"},(0,tt.createElement)(Jq,{mediaId:e,mediaURL:t,allowedTypes:c2,accept:"image/*,video/*",onSelect:n}))}function m2({className:e,noticeOperations:t,noticeUI:n,mediaUrl:r,onSelectMedia:o}){return(0,tt.createElement)(oj,{icon:(0,tt.createElement)(MB,{icon:l2}),labels:{title:er("Media area")},className:e,onSelect:o,accept:"image/*,video/*",allowedTypes:c2,notices:n,onError:e=>{t.removeAllNotices(),t.createErrorNotice(e)},disableMediaButtons:r})}const h2=YK((0,tt.forwardRef)((function(e,t){const{className:n,commitWidthChange:r,focalPoint:o,imageFill:a,isSelected:i,isStackedOnMobile:s,mediaAlt:l,mediaId:c,mediaPosition:u,mediaType:d,mediaUrl:p,mediaWidth:m,onSelectMedia:h,onWidthChange:f}=e,g=!c&&Js(p),{toggleSelection:b}=sd(nk);if(p){const y=()=>{b(!1)},v=(e,t,n)=>{f(parseInt(n.style.width))},_=(e,t,n)=>{b(!0),r(parseInt(n.style.width))},M={right:"left"===u,left:"right"===u},k="image"===d&&a?u2(p,o):{},w={image:()=>(0,tt.createElement)("img",{src:p,alt:l}),video:()=>(0,tt.createElement)("video",{controls:!0,src:p})};return(0,tt.createElement)(d2,{as:"figure",className:so()(n,"editor-media-container__resizer",{"is-transient":g}),style:k,size:{width:m+"%"},minWidth:"10%",maxWidth:"100%",enable:M,onResizeStart:y,onResize:v,onResizeStop:_,axis:"x",isSelected:i,isStackedOnMobile:s,ref:t},(0,tt.createElement)(p2,{onSelectMedia:h,mediaUrl:p,mediaId:c}),(w[d]||at.noop)(),g&&(0,tt.createElement)(cq,null),(0,tt.createElement)(m2,e))}return(0,tt.createElement)(m2,e)}))),f2=e=>{if(!e.customBackgroundColor)return e;const t={color:{background:e.customBackgroundColor}};return{...(0,at.omit)(e,["customBackgroundColor"]),style:t}},g2={align:{type:"string",default:"wide"},backgroundColor:{type:"string"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!0}},b2=[{attributes:{...g2,customBackgroundColor:{type:"string"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:f2,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:r,mediaAlt:o,mediaPosition:a,mediaType:i,mediaUrl:s,mediaWidth:l,mediaId:c,verticalAlignment:u,imageFill:d,focalPoint:p,linkClass:m,href:h,linkTarget:f,rel:g}=e,b=(0,at.isEmpty)(g)?void 0:g;let y=(0,tt.createElement)("img",{src:s,alt:o,className:c&&"image"===i?`wp-image-${c}`:null});h&&(y=(0,tt.createElement)("a",{className:m,href:h,target:f,rel:b},y));const v={image:()=>y,video:()=>(0,tt.createElement)("video",{controls:!0,src:s})},_=mC("background-color",t),M=so()({"has-media-on-the-right":"right"===a,"has-background":_||n,[_]:_,"is-stacked-on-mobile":r,[`is-vertically-aligned-${u}`]:u,"is-image-fill":d}),k=d?u2(s,p):{};let w;50!==l&&(w="right"===a?`auto ${l}%`:`${l}% auto`);const E={backgroundColor:_?void 0:n,gridTemplateColumns:w};return(0,tt.createElement)("div",{className:M,style:E},(0,tt.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[i]||at.noop)()),(0,tt.createElement)("div",{className:"wp-block-media-text__content"},(0,tt.createElement)(JH.Content,null)))}},{attributes:{...g2,customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:f2,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:r,mediaAlt:o,mediaPosition:a,mediaType:i,mediaUrl:s,mediaWidth:l,mediaId:c,verticalAlignment:u,imageFill:d,focalPoint:p}=e,m={image:()=>(0,tt.createElement)("img",{src:s,alt:o,className:c&&"image"===i?`wp-image-${c}`:null}),video:()=>(0,tt.createElement)("video",{controls:!0,src:s})},h=mC("background-color",t),f=so()({"has-media-on-the-right":"right"===a,[h]:h,"is-stacked-on-mobile":r,[`is-vertically-aligned-${u}`]:u,"is-image-fill":d}),g=d?u2(s,p):{};let b;50!==l&&(b="right"===a?`auto ${l}%`:`${l}% auto`);const y={backgroundColor:h?void 0:n,gridTemplateColumns:b};return(0,tt.createElement)("div",{className:f,style:y},(0,tt.createElement)("figure",{className:"wp-block-media-text__media",style:g},(m[i]||at.noop)()),(0,tt.createElement)("div",{className:"wp-block-media-text__content"},(0,tt.createElement)(JH.Content,null)))}},{attributes:{...g2,customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"}},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:r,mediaAlt:o,mediaPosition:a,mediaType:i,mediaUrl:s,mediaWidth:l}=e,c={image:()=>(0,tt.createElement)("img",{src:s,alt:o}),video:()=>(0,tt.createElement)("video",{controls:!0,src:s})},u=mC("background-color",t),d=so()({"has-media-on-the-right":"right"===a,[u]:u,"is-stacked-on-mobile":r});let p;50!==l&&(p="right"===a?`auto ${l}%`:`${l}% auto`);const m={backgroundColor:u?void 0:n,gridTemplateColumns:p};return(0,tt.createElement)("div",{className:d,style:m},(0,tt.createElement)("figure",{className:"wp-block-media-text__media"},(c[i]||at.noop)()),(0,tt.createElement)("div",{className:"wp-block-media-text__content"},(0,tt.createElement)(JH.Content,null)))}}],y2=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})),v2=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})),_2="full",M2=[["core/paragraph",{fontSize:"large",placeholder:tr("Content…","content placeholder")}]],k2=e=>Math.max(15,Math.min(e,85));function w2(e,t){var n,r,o;return null==e||null===(n=e.media_details)||void 0===n||null===(r=n.sizes)||void 0===r||null===(o=r[t])||void 0===o?void 0:o.source_url}const E2=function({attributes:e,isSelected:t,setAttributes:n}){const{focalPoint:r,href:o,imageFill:a,isStackedOnMobile:i,linkClass:s,linkDestination:l,linkTarget:c,mediaAlt:u,mediaId:d,mediaPosition:p,mediaType:m,mediaUrl:h,mediaWidth:f,rel:g,verticalAlignment:b}=e,y=e.mediaSizeSlug||_2,v=Cl((e=>d&&t?e(yd).getMedia(d):null),[t,d]),_=(0,tt.useRef)(),M=e=>{const{style:t}=_.current.resizable,{x:n,y:r}=e;t.backgroundPosition=`${100*n}% ${100*r}%`},[k,w]=(0,tt.useState)(null),E=function({attributes:{linkDestination:e,href:t},setAttributes:n}){return r=>{let o,a;var i,s,l,c,u;o=r.media_type?"image"===r.media_type?"image":"video":r.type,"image"===o&&(a=(null===(i=r.sizes)||void 0===i||null===(s=i.large)||void 0===s?void 0:s.url)||(null===(l=r.media_details)||void 0===l||null===(c=l.sizes)||void 0===c||null===(u=c.large)||void 0===u?void 0:u.source_url));let d=t;"media"===e&&(d=r.url),"attachment"===e&&(d=r.link),n({mediaAlt:r.alt,mediaId:r.id,mediaType:o,mediaUrl:a||r.url,mediaLink:r.link||void 0,href:d,focalPoint:void 0})}}({attributes:e,setAttributes:n}),L=e=>{n({mediaWidth:k2(e)}),w(k2(e))},A=so()({"has-media-on-the-right":"right"===p,"is-selected":t,"is-stacked-on-mobile":i,[`is-vertically-aligned-${b}`]:b,"is-image-fill":a}),S=`${k||f}%`,C="right"===p?`1fr ${S}`:`${S} 1fr`,T={gridTemplateColumns:C,msGridColumns:C},x=Cl((e=>{const t=e(nk).getSettings();return null==t?void 0:t.imageSizes})),z=(0,at.map)((0,at.filter)(x,(({slug:e})=>w2(v,e))),(({name:e,slug:t})=>({value:t,label:e}))),O=(0,tt.createElement)(BA,{title:er("Media & Text settings")},(0,tt.createElement)(KN,{label:er("Stack on mobile"),checked:i,onChange:()=>n({isStackedOnMobile:!i})}),"image"===m&&(0,tt.createElement)(KN,{label:er("Crop image to fill entire column"),checked:a,onChange:()=>n({imageFill:!a})}),a&&h&&"image"===m&&(0,tt.createElement)(U0,{label:er("Focal point picker"),url:h,value:r,onChange:e=>n({focalPoint:e}),onDragStart:M,onDrag:M}),"image"===m&&(0,tt.createElement)(XK,{label:er("Alt text (alternative text)"),value:u,onChange:e=>{n({mediaAlt:e})},help:(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(CA,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},er("Describe the purpose of the image")),er("Leave empty if the image is purely decorative."))}),"image"===m&&(0,tt.createElement)(qH,{onChangeImage:e=>{const t=w2(v,e);if(!t)return null;n({mediaUrl:t,mediaSizeSlug:e})},slug:y,imageSizeOptions:z,isResizable:!1}),h&&(0,tt.createElement)(rT,{label:er("Media width"),value:k||f,onChange:L,min:15,max:85})),N=VR({className:A,style:T}),D=GH({className:"wp-block-media-text__content"},{template:M2});return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(FA,null,O),(0,tt.createElement)(lk,{group:"block"},(0,tt.createElement)(RH,{onChange:e=>{n({verticalAlignment:e})},value:b}),(0,tt.createElement)(qg,{icon:y2,title:er("Show media on left"),isActive:"left"===p,onClick:()=>n({mediaPosition:"left"})}),(0,tt.createElement)(qg,{icon:v2,title:er("Show media on right"),isActive:"right"===p,onClick:()=>n({mediaPosition:"right"})}),"image"===m&&(0,tt.createElement)(qj,{url:o||"",onChangeUrl:e=>{n(e)},linkDestination:l,mediaType:m,mediaUrl:v&&v.source_url,mediaLink:v&&v.link,linkTarget:c,linkClass:s,rel:g})),(0,tt.createElement)("div",N,(0,tt.createElement)(h2,{className:"wp-block-media-text__media",onSelectMedia:E,onWidthChange:e=>{w(k2(e))},commitWidthChange:L,ref:_,focalPoint:r,imageFill:a,isSelected:t,isStackedOnMobile:i,mediaAlt:u,mediaId:d,mediaPosition:p,mediaType:m,mediaUrl:h,mediaWidth:f}),(0,tt.createElement)("div",D)))};const L2={from:[{type:"block",blocks:["core/image"],transform:({alt:e,url:t,id:n,anchor:r})=>Ho("core/media-text",{mediaAlt:e,mediaId:n,mediaUrl:t,mediaType:"image",anchor:r})},{type:"block",blocks:["core/video"],transform:({src:e,id:t,anchor:n})=>Ho("core/media-text",{mediaId:t,mediaUrl:e,mediaType:"video",anchor:n})}],to:[{type:"block",blocks:["core/image"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"image"===e,transform:({mediaAlt:e,mediaId:t,mediaUrl:n,anchor:r})=>Ho("core/image",{alt:e,id:t,url:n,anchor:r})},{type:"block",blocks:["core/video"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"video"===e,transform:({mediaId:e,mediaUrl:t,anchor:n})=>Ho("core/video",{id:e,src:t,anchor:n})}]},A2={apiVersion:2,name:"core/media-text",title:"Media & Text",category:"media",description:"Set media and words side-by-side for a richer layout.",keywords:["image","video"],textdomain:"default",attributes:{align:{type:"string",default:"wide"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},mediaSizeSlug:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},editorStyle:"wp-block-media-text-editor",style:"wp-block-media-text"},{name:S2}=A2,C2={icon:s2,example:{attributes:{mediaType:"image",mediaUrl:"https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:er("The wren
Earns his living
Noiselessly.")}},{name:"core/paragraph",attributes:{content:er("— Kobayashi Issa (一茶)")}}]},transforms:L2,edit:E2,save:function({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:r,mediaType:o,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:h}=e,f=e.mediaSizeSlug||_2,g=(0,at.isEmpty)(h)?void 0:h,b=so()({[`wp-image-${s}`]:s&&"image"===o,[`size-${f}`]:s&&"image"===o});let y=(0,tt.createElement)("img",{src:a,alt:n,className:b||null});p&&(y=(0,tt.createElement)("a",{className:d,href:p,target:m,rel:g},y));const v={image:()=>y,video:()=>(0,tt.createElement)("video",{controls:!0,src:a})},_=so()({"has-media-on-the-right":"right"===r,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),M=c?u2(a,u):{};let k;50!==i&&(k="right"===r?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return(0,tt.createElement)("div",VR.save({className:_,style:w}),(0,tt.createElement)("figure",{className:"wp-block-media-text__media",style:M},(v[o]||at.noop)()),(0,tt.createElement)("div",{className:"wp-block-media-text__content"},(0,tt.createElement)(JH.Content,null)))},deprecated:b2},T2=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"}));function x2({clientId:e,__experimentalFeatures:t}){const n=Cl((t=>t(nk).__unstableGetClientIdsTree(e)),[e]);return(0,tt.createElement)(fH,{blocks:n,showAppender:!0,showBlockMovers:!0,showNestedBlocks:!0,__experimentalFeatures:t})}function z2(){const{menus:e,isResolvingMenus:t,hasResolvedMenus:n}=Cl((e=>{const{getMenus:t,isResolving:n,hasFinishedResolution:r}=e(yd),o=[{per_page:-1}];return{menus:t(...o),isResolvingMenus:n("getMenus",o),hasResolvedMenus:r("getMenus",o)}}),[]);return{menus:e,isResolvingMenus:t,hasResolvedMenus:n,hasMenus:!(!n||null==e||!e.length)}}function O2(e){const{menuItems:t,hasResolvedMenuItems:n}=Cl((t=>{const{getMenuItems:n,hasFinishedResolution:r}=t(yd),o=void 0!==e,a=o?[{menus:e,per_page:-1}]:void 0;return{menuItems:o?n(...a):void 0,hasResolvedMenuItems:!!o&&r("getMenuItems",a)}}),[e]);return{menuItems:t,hasResolvedMenuItems:n}}function N2(){const{pages:e,isResolvingPages:t,hasResolvedPages:n}=Cl((e=>{const{getEntityRecords:t,isResolving:n,hasFinishedResolution:r}=e(yd),o=["postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1}];return{pages:t(...o)||null,isResolvingPages:n("getEntityRecords",o),hasResolvedPages:r("getEntityRecords",o)}}),[]);return{pages:e,isResolvingPages:t,hasResolvedPages:n,hasPages:!(!n||null==e||!e.length)}}const D2=()=>(0,tt.createElement)("ul",{className:"wp-block-navigation-placeholder__preview wp-block-navigation__container"},(0,tt.createElement)("li",{className:"wp-block-navigation-link"},"​"),(0,tt.createElement)("li",{className:"wp-block-navigation-link"},"​"),(0,tt.createElement)("li",{className:"wp-block-navigation-link"},"​"),(0,tt.createElement)($L,{icon:bP}));function B2(e){if(!e)return null;return I2(function(e,t="id",n="parent"){const r=Object.create(null),o=[];for(const n of e)r[n[t]]={...n,children:[]};for(const a of e)a[n]?r[a[n]].children.push(r[a[t]]):o.push(r[a[t]]);return o}(e))}function I2(e){let t={};return{innerBlocks:(0,at.sortBy)(e,"menu_order").map((e=>{var n;if("block"===e.type){const[t]=ts(e.content.raw);return t||Ho("core/freeform",{content:e.content})}const r=function({title:e,xfn:t,classes:n,attr_title:r,object:o,object_id:a,description:i,url:s,type:l,target:c}){var u;o&&"post_tag"===o&&(o="tag");return{label:(null==e?void 0:e.rendered)||"",...(null===(u=o)||void 0===u?void 0:u.length)&&{type:o},kind:(null==l?void 0:l.replace("_","-"))||"custom",url:s||"",...(null==t?void 0:t.length)&&t.join(" ").trim()&&{rel:t.join(" ").trim()},...(null==n?void 0:n.length)&&n.join(" ").trim()&&{className:n.join(" ").trim()},...(null==r?void 0:r.length)&&{title:r},...a&&"custom"!==o&&{id:a},...(null==i?void 0:i.length)&&{description:i},..."_blank"===c&&{opensInNewTab:!0}}}(e),{innerBlocks:o=[],mapping:a={}}=null!==(n=e.children)&&void 0!==n&&n.length?I2(e.children):{};t={...t,...a};const i=Ho("core/navigation-link",r,o);return t[e.id]=i.clientId,i})),mapping:t}}const P2=(0,tt.forwardRef)((function({onCreate:e},t){const[n,r]=(0,tt.useState)(),[o,a]=(0,tt.useState)(!1),{isResolvingPages:i,menus:s,isResolvingMenus:l,menuItems:c,hasResolvedMenuItems:u,hasPages:d,hasMenus:p}=(m=n,{...N2(),...z2(),...O2(m)});var m;const h=i||l,f=(0,tt.useCallback)((()=>{const{innerBlocks:t}=B2(c);e(t,!0)}));return(0,tt.useEffect)((()=>{o&&u&&(f(),a(!1))}),[o,u]),(0,tt.createElement)(yH,{className:"wp-block-navigation-placeholder"},(0,tt.createElement)(D2,null),(0,tt.createElement)("div",{className:"wp-block-navigation-placeholder__controls"},h&&(0,tt.createElement)("div",{ref:t},(0,tt.createElement)(cq,null)),!h&&(0,tt.createElement)("div",{ref:t,className:"wp-block-navigation-placeholder__actions"},(0,tt.createElement)("div",{className:"wp-block-navigation-placeholder__actions__indicator"},(0,tt.createElement)($L,{icon:T2})," ",er("Navigation")),p?(0,tt.createElement)(Zg,{text:er("Add existing menu"),icon:OA,toggleProps:{variant:"primary",className:"wp-block-navigation-placeholder__actions__dropdown"}},(({onClose:e})=>(0,tt.createElement)(ON,null,s.map((t=>(0,tt.createElement)(zB,{onClick:()=>{r(t.id),u?f():a(!0)},onClose:e,key:t.id},t.name)))))):void 0,d?(0,tt.createElement)(wf,{variant:p?"tertiary":"primary",onClick:()=>{const t=[Ho("core/page-list")];e(t,!0)}},er("Add all pages")):void 0,(0,tt.createElement)(wf,{variant:"tertiary",onClick:()=>{e([])}},er("Start empty")))))}));function R2({children:e,id:t,isOpen:n,isResponsive:r,onToggle:o}){if(!r)return e;const a=so()("wp-block-navigation__responsive-container",{"is-menu-open":n}),i=`${t}-modal`;return(0,tt.createElement)(tt.Fragment,null,!n&&(0,tt.createElement)(wf,{"aria-haspopup":"true","aria-expanded":n,"aria-label":er("Open menu"),className:"wp-block-navigation__responsive-container-open",onClick:()=>o(!0)},(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",role:"img","aria-hidden":"true",focusable:"false"},(0,tt.createElement)(po,{x:"4",y:"7.5",width:"16",height:"1.5"}),(0,tt.createElement)(po,{x:"4",y:"15",width:"16",height:"1.5"}))),(0,tt.createElement)("div",{className:a,id:i,"aria-hidden":!n},(0,tt.createElement)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1"},(0,tt.createElement)("div",{className:"wp-block-navigation__responsive-dialog",role:"dialog","aria-modal":"true","aria-labelledby":`${i}-title`},(0,tt.createElement)(wf,{className:"wp-block-navigation__responsive-container-close","aria-label":er("Close menu"),onClick:()=>o(!1)},(0,tt.createElement)($L,{icon:Ym})),(0,tt.createElement)("div",{className:"wp-block-navigation__responsive-container-content",id:`${i}-content`},e)))))}const W2=["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link"],Y2={type:"default",alignments:[]};function H2(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function q2(e,t,n){if(!e)return;t(H2(e).color);let r=e,o=H2(r).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&r.parentNode&&r.parentNode.nodeType===r.parentNode.ELEMENT_NODE;)r=r.parentNode,o=H2(r).backgroundColor;n(o)}const j2=lS([ZI(((e,{clientId:t})=>{var n;const r=e(nk).getBlocks(t),{getClientIdsOfDescendants:o,hasSelectedInnerBlock:a,getSelectedBlockClientId:i}=e(nk),s=a(t,!1),l=i();return{isImmediateParentOfSelectedBlock:s,selectedBlockHasDescendants:!(null===(n=o([l]))||void 0===n||!n.length),hasExistingNavItems:!!r.length,isSelected:l===t}})),eP(((e,{clientId:t})=>({updateInnerBlocks(n){if(0===(null==n?void 0:n.length))return!1;e(nk).replaceInnerBlocks(t,n,!0)}}))),cD({textColor:"color"},{backgroundColor:"color"},{overlayBackgroundColor:"color"},{overlayTextColor:"color"})])((function({selectedBlockHasDescendants:e,attributes:t,setAttributes:n,clientId:r,hasExistingNavItems:o,isImmediateParentOfSelectedBlock:a,isSelected:i,updateInnerBlocks:s,className:l,backgroundColor:c,setBackgroundColor:u,textColor:d,setTextColor:p,overlayBackgroundColor:m,setOverlayBackgroundColor:h,overlayTextColor:f,setOverlayTextColor:g,hasSubmenuIndicatorSetting:b=!0,hasItemJustificationControls:y=!0,hasColorSettings:v=!0}){const[_,M]=(0,tt.useState)(!o),[k,w]=(0,tt.useState)(!1),{selectBlock:E}=sd(nk),L=(0,tt.useRef)(),A=VR({ref:L,className:so()(l,{[`items-justified-${t.itemsJustification}`]:t.itemsJustification,"is-vertical":"vertical"===t.orientation,"is-responsive":t.isResponsive,"has-text-color":!!d.color||!(null==d||!d.class),[mC("color",null==d?void 0:d.slug)]:!(null==d||!d.slug),"has-background":!!c.color||c.class,[mC("background-color",null==c?void 0:c.slug)]:!(null==c||!c.slug)}),style:{color:!(null!=d&&d.slug)&&(null==d?void 0:d.color),backgroundColor:!(null!=c&&c.slug)&&(null==c?void 0:c.color)}}),{navigatorToolbarButton:S,navigatorModal:C}=function(e,t){const[n,r]=(0,tt.useState)(!1);return{navigatorToolbarButton:(0,tt.createElement)(qg,{className:"components-toolbar__control",label:er("Open block navigation"),onClick:()=>r(!0),icon:kB}),navigatorModal:n&&(0,tt.createElement)(sR,{title:er("Navigation"),closeLabel:er("Close"),onRequestClose:()=>{r(!1)}},(0,tt.createElement)(x2,{clientId:e,__experimentalFeatures:t}))}}(r),T=(0,tt.useMemo)((()=>(0,tt.createElement)(D2,null)),[]),x=GH({className:"wp-block-navigation__container"},{allowedBlocks:W2,orientation:t.orientation||"horizontal",renderAppender:!!(a&&!e||i)&&JH.DefaultAppender,__experimentalAppenderTagName:"li",__experimentalCaptureToolbars:!0,templateLock:!1,__experimentalLayout:Y2,placeholder:T}),z="web"===vb.OS,[O,N]=(0,tt.useState)(),[D,B]=(0,tt.useState)(),[I,P]=(0,tt.useState)(),[R,W]=(0,tt.useState)();if((0,tt.useEffect)((()=>{if(!z)return;q2(L.current,B,N);const e=L.current.querySelector('[data-type="core/navigation-link"] [data-type="core/navigation-link"]');e&&q2(e,W,P)})),_)return(0,tt.createElement)("div",A,(0,tt.createElement)(P2,{onCreate:(e,t)=>{M(!1),s(e),t&&E(r)}}));const Y="vertical"===t.orientation?["left","center","right"]:["left","center","right","space-between"];return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,null,y&&(0,tt.createElement)(aq,{value:t.itemsJustification,allowedControls:Y,onChange:e=>n({itemsJustification:e}),popoverProps:{position:"bottom right",isAlternate:!0}}),(0,tt.createElement)(eb,null,S)),C,(0,tt.createElement)(FA,null,b&&(0,tt.createElement)(BA,{title:er("Display settings")},(0,tt.createElement)(KN,{checked:t.showSubmenuIcon,onChange:e=>{n({showSubmenuIcon:e})},label:er("Show submenu indicator icons")}),(0,tt.createElement)(KN,{checked:t.isResponsive,onChange:e=>{n({isResponsive:e})},label:er("Enable responsive menu")})),v&&(0,tt.createElement)(aj,{title:er("Color"),initialOpen:!1,colorSettings:[{value:d.color,onChange:p,label:er("Text")},{value:c.color,onChange:u,label:er("Background")},{value:f.color,onChange:g,label:er("Overlay text")},{value:m.color,onChange:h,label:er("Overlay background")}]},z&&(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(YT,{backgroundColor:O,textColor:D}),(0,tt.createElement)(YT,{backgroundColor:I,textColor:R})))),(0,tt.createElement)("nav",A,(0,tt.createElement)(R2,{id:r,onToggle:w,isOpen:k,isResponsive:t.isResponsive},(0,tt.createElement)("div",x))))}));const F2={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"},V2=[{attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},save:()=>(0,tt.createElement)(JH.Content,null),isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in F2){const n=e.style.typography[t];if(n&&n.startsWith(F2[t]))return!0}return!1},migrate:e=>({...e,style:{...e.style,typography:(0,at.mapValues)(e.style.typography,((e,t)=>{const n=F2[t];if(n&&e.startsWith(n)){const r=e.slice(n.length);return"textDecoration"===t&&"strikethrough"===r?"line-through":r}return e}))}})},{attributes:{className:{type:"string"},textColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean"}},isEligible:e=>e.rgbTextColor||e.rgbBackgroundColor,supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0},migrate:e=>({...(0,at.omit)(e,["rgbTextColor","rgbBackgroundColor"]),customTextColor:e.textColor?void 0:e.rgbTextColor,customBackgroundColor:e.backgroundColor?void 0:e.rgbBackgroundColor}),save:()=>(0,tt.createElement)(JH.Content,null)}],X2=[{name:"horizontal",isDefault:!0,title:er("Navigation (horizontal)"),description:er("Links shown in a row."),attributes:{orientation:"horizontal"},scope:["inserter","transform"]},{name:"vertical",title:er("Navigation (vertical)"),description:er("Links shown in a column."),attributes:{orientation:"vertical"},scope:["inserter","transform"]}],U2={apiVersion:2,name:"core/navigation",title:"Navigation",category:"theme",description:"A collection of blocks that allow visitors to get around your site.",keywords:["menu","navigation","links"],textdomain:"default",attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},isResponsive:{type:"boolean",default:!1},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},providesContext:{textColor:"textColor",customTextColor:"customTextColor",backgroundColor:"backgroundColor",customBackgroundColor:"customBackgroundColor",overlayTextColor:"overlayTextColor",customOverlayTextColor:"customOverlayTextColor",overlayBackgroundColor:"overlayBackgroundColor",customOverlayBackgroundColor:"customOverlayBackgroundColor",fontSize:"fontSize",customFontSize:"customFontSize",showSubmenuIcon:"showSubmenuIcon",style:"style",orientation:"orientation"},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0}},viewScript:"file:./view.min.js",editorStyle:"wp-block-navigation-editor",style:"wp-block-navigation"},{name:$2}=U2,K2={icon:T2,variations:X2,example:{innerBlocks:[{name:"core/navigation-link",attributes:{label:er("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:er("About"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:er("Contact"),url:"https://make.wordpress.org/"}}]},edit:j2,save:function(){return(0,tt.createElement)(JH.Content,null)},deprecated:V2},G2=(0,tt.createElement)(mo,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z"})),J2=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"})),Z2=()=>(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},(0,tt.createElement)(uo,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})),{name:Q2}={apiVersion:2,name:"core/navigation-link",title:"Custom Link",category:"design",parent:["core/navigation"],description:"Add a page, link, or another item to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelLink:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style"],supports:{reusable:!1,html:!1},editorStyle:"wp-block-navigation-link-editor",style:"wp-block-navigation-link"},e3=["core/navigation-link"];function t3(e,t){switch(e){case"post":case"page":return{type:"post",subtype:e};case"category":return{type:"term",subtype:"category"};case"tag":return{type:"term",subtype:"post_tag"};case"post_format":return{type:"post-format"};default:return"taxonomy"===t?{type:"term",subtype:e}:"post-type"===t?{type:"post",subtype:e}:{}}}function n3(e,t){var n,r;const{textColor:o,customTextColor:a,backgroundColor:i,customBackgroundColor:s,overlayTextColor:l,customOverlayTextColor:c,overlayBackgroundColor:u,customOverlayBackgroundColor:d,style:p}=e,m={};return t&&c?m.customTextColor=c:t&&l?m.textColor=l:a?m.customTextColor=a:o?m.textColor=o:null!=p&&null!==(n=p.color)&&void 0!==n&&n.text&&(m.customTextColor=p.color.text),t&&d?m.customBackgroundColor=d:t&&u?m.backgroundColor=u:s?m.customBackgroundColor=s:i?m.backgroundColor=i:null!=p&&null!==(r=p.color)&&void 0!==r&&r.background&&(m.customTextColor=p.color.background),m}const r3=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M4 14.5h16V16H4zM4 18.5h9V20H4zM4 4h3c2 0 3 .86 3 2.583 0 .891-.253 1.554-.76 1.988-.505.435-1.24.652-2.204.652H5.542V12H4V4zm2.855 4c.53 0 .924-.114 1.18-.343.266-.228.398-.579.398-1.051 0-.473-.132-.82-.397-1.04-.265-.229-.67-.343-1.217-.343H5.542V8h1.313z"})),o3=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"})),a3=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"})),i3=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"})),s3=[{name:"link",isDefault:!0,title:er("Custom Link"),description:er("A link to a custom URL."),attributes:{}},{name:"post",icon:r3,title:er("Post Link"),description:er("A link to a post."),attributes:{type:"post",kind:"post-type"}},{name:"page",icon:o3,title:er("Page Link"),description:er("A link to a page."),attributes:{type:"page",kind:"post-type"}},{name:"category",icon:CQ,title:er("Category Link"),description:er("A link to a category."),attributes:{type:"category",kind:"taxonomy"}},{name:"tag",icon:a3,title:er("Tag Link"),description:er("A link to a tag."),attributes:{type:"tag",kind:"taxonomy"}}];s3.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));const l3=s3;function c3(e){switch(e){case"post":return r3;case"page":return o3;case"tag":return a3;case"category":return CQ;default:return i3}}const u3={apiVersion:2,name:"core/navigation-link",title:"Custom Link",category:"design",parent:["core/navigation"],description:"Add a page, link, or another item to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelLink:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style"],supports:{reusable:!1,html:!1},editorStyle:"wp-block-navigation-link-editor",style:"wp-block-navigation-link"},{name:d3}=u3,p3={icon:G2,__experimentalLabel:({label:e})=>e,merge:(e,{label:t=""})=>({...e,label:e.label+t}),edit:function({attributes:e,isSelected:t,setAttributes:n,insertBlocksAfter:r,mergeBlocks:o,onReplace:a,context:i,clientId:s}){const{label:l,type:c,opensInNewTab:u,url:d,description:p,rel:m,title:h,kind:f}=e,g={url:d,opensInNewTab:u},{showSubmenuIcon:b}=i,{saveEntityRecord:y}=sd(yd),{insertBlock:v}=sd(nk),[_,M]=(0,tt.useState)(!1),k=(0,tt.useRef)(null),w=(e=>{const[t,n]=(0,tt.useState)(!1);return(0,tt.useEffect)((()=>{const{ownerDocument:t}=e.current;function r(e){a(e)}function o(){n(!1)}function a(t){e.current.contains(t.target)?n(!0):n(!1)}return t.addEventListener("dragstart",r),t.addEventListener("dragend",o),t.addEventListener("dragenter",a),()=>{t.removeEventListener("dragstart",r),t.removeEventListener("dragend",o),t.removeEventListener("dragenter",a)}}),[]),t})(k),E=er("Add link…"),L=(0,tt.useRef)(),{isAtMaxNesting:A,isTopLevelLink:S,isParentOfSelectedBlock:C,isImmediateParentOfSelectedBlock:T,hasDescendants:x,selectedBlockHasDescendants:z,numberOfDescendants:O,userCanCreatePages:N,userCanCreatePosts:D}=Cl((e=>{var t;const{getClientIdsOfDescendants:n,hasSelectedInnerBlock:r,getSelectedBlockClientId:o,getBlockParentsByBlockName:a}=e(nk),i=o(),l=n([s]).length;return{isAtMaxNesting:a(s,Q2).length>=5,isTopLevelLink:0===a(s,Q2).length,isParentOfSelectedBlock:r(s,!0),isImmediateParentOfSelectedBlock:r(s,!1),hasDescendants:!!l,selectedBlockHasDescendants:!(null===(t=n([i]))||void 0===t||!t.length),numberOfDescendants:l,userCanCreatePages:e(yd).canUser("create","pages"),userCanCreatePosts:e(yd).canUser("create","posts")}}),[s]);(0,tt.useEffect)((()=>n({isTopLevelLink:S})),[S]),(0,tt.useEffect)((()=>{d||M(!0)}),[]),(0,tt.useEffect)((()=>{t||M(!1)}),[t]),(0,tt.useEffect)((()=>{_&&d&&(hq(xq(l))&&/^.+\.[a-z]+/.test(l)?function(){L.current.focus();const{ownerDocument:e}=L.current,{defaultView:t}=e,n=t.getSelection(),r=e.createRange();r.selectNodeContents(L.current),n.removeAllRanges(),n.addRange(r)}():LR(L.current,!0))}),[d]);let B=!1;c&&"page"!==c?"post"===c&&(B=D):B=N;const{textColor:I,customTextColor:P,backgroundColor:R,customBackgroundColor:W}=n3(i,!S),Y=VR({ref:k,className:so()({"is-editing":t||C,"is-dragging-within":w,"has-link":!!d,"has-child":x,"has-text-color":!!I||!!P,[mC("color",I)]:!!I,"has-background":!!R||W,[mC("background-color",R)]:!!R}),style:{color:!I&&P,backgroundColor:!R&&W}});d||(Y.onClick=()=>M(!0));const H=n3(i,!0),q=GH({className:so()("wp-block-navigation-link__container",{"is-parent-of-selected-block":C,"has-text-color":!(!H.textColor&&!H.customTextColor),[`has-${H.textColor}-color`]:!!H.textColor,"has-background":!(!H.backgroundColor&&!H.customBackgroundColor),[`has-${H.backgroundColor}-background-color`]:!!H.backgroundColor}),style:{color:H.customTextColor,backgroundColor:H.customBackgroundColor}},{allowedBlocks:e3,renderAppender:!!(t&&x||T&&!z||x)&&JH.DefaultAppender}),j=so()("wp-block-navigation-link__content",{"wp-block-navigation-link__placeholder":!d});let F="";switch(c){case"post":F=er("Select post");break;case"page":F=er("Select page");break;case"category":F=er("Select category");break;case"tag":F=er("Select tag");break;default:F=er("Add link")}return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,null,(0,tt.createElement)(eb,null,(0,tt.createElement)(aS,{bindGlobal:!0,shortcuts:{[hm.primary("k")]:()=>M(!0)}}),(0,tt.createElement)(qg,{name:"link",icon:dT,title:er("Link"),shortcut:gm.primary("k"),onClick:()=>M(!0)}),!A&&(0,tt.createElement)(qg,{name:"submenu",icon:J2,title:er("Add submenu"),onClick:function(){const e=O,t=Ho("core/navigation-link");v(t,e,s)}}))),(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("Link settings")},(0,tt.createElement)(XK,{value:p||"",onChange:e=>{n({description:e})},label:er("Description"),help:er("The description will be displayed in the menu if the current theme supports it.")}),(0,tt.createElement)(LA,{value:h||"",onChange:e=>{n({title:e})},label:er("Link title"),autoComplete:"off"}),(0,tt.createElement)(LA,{value:m||"",onChange:e=>{n({rel:e})},label:er("Link rel"),autoComplete:"off"}))),(0,tt.createElement)("div",Y,(0,tt.createElement)("a",{className:j},d?(0,tt.createElement)(Cj,{ref:L,identifier:"label",className:"wp-block-navigation-link__label",value:l,onChange:e=>n({label:e}),onMerge:o,onReplace:a,__unstableOnSplitAtEnd:()=>r(Ho("core/navigation-link")),"aria-label":er("Navigation link text"),placeholder:E,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"],onClick:()=>{d||M(!0)}}):(0,tt.createElement)("div",{className:"wp-block-navigation-link__placeholder-text"},(0,tt.createElement)(aS,{shortcuts:{enter:()=>t&&M(!0)}}),F),_&&(0,tt.createElement)(yh,{position:"bottom center",onClose:()=>M(!1),anchorRef:k.current},(0,tt.createElement)(aS,{bindGlobal:!0,shortcuts:{escape:()=>M(!1)}}),(0,tt.createElement)(Vq,{className:"wp-block-navigation-link__inline-link-input",value:g,showInitialSuggestions:!0,withCreateSuggestion:B,createSuggestion:async function(e){const t=c||"page",n=await y("postType",t,{title:e,status:"draft"});return{id:n.id,type:t,title:n.title.rendered,url:n.link,kind:"post-type"}},createSuggestionButtonText:e=>{let t;return t=er("post"===c?"Create draft post: %s":"Create draft page: %s"),TP(pn(t,e),{mark:(0,tt.createElement)("mark",null)})},noDirectEntry:!!c,noURLSuggestion:!!c,suggestionsQuery:t3(c,f),onChange:t=>((e={},t,n={})=>{const{label:r="",kind:o="",type:a=""}=n,{title:i="",url:s="",opensInNewTab:l,id:c,kind:u=o,type:d=a}=e,p=i.replace(/http(s?):\/\//gi,""),m=s.replace(/http(s?):\/\//gi,""),h=""!==i&&p!==m&&r!==i?(0,at.escape)(i):r||(0,at.escape)(m),f="post_tag"===d?"tag":d.replace("-","_"),g=["post","page","tag","category"].indexOf(f)>-1,b=!u&&!g||"custom"===u?"custom":u;t({...s&&{url:encodeURI(vq(s))},...h&&{label:h},...void 0!==l&&{opensInNewTab:l},...c&&Number.isInteger(c)&&{id:c},...b&&{kind:b},...f&&"URL"!==f&&{type:f}})})(t,n,e)})),x&&b&&(0,tt.createElement)("span",{className:"wp-block-navigation-link__submenu-icon"},(0,tt.createElement)(Z2,null))),(0,tt.createElement)("div",q)))},save:function(){return(0,tt.createElement)(JH.Content,null)},example:{attributes:{label:tr("Example Link","navigation link preview example"),url:"https://example.com"}},deprecated:[{isEligible:e=>e.nofollow,attributes:{label:{type:"string"},type:{type:"string"},nofollow:{type:"boolean"},description:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"}},migrate:({nofollow:e,...t})=>({rel:e?"nofollow":"",...t}),save:()=>(0,tt.createElement)(JH.Content,null)}]};In("blocks.registerBlockType","core/navigation-link",(function(e,t){if("core/navigation-link"!==t)return e;if(!e.variations)return{...e,variations:l3};if(e.variations){const t=(e,t)=>e.type===t.type,n=e.variations.map((e=>({...e,...!e.icon&&{icon:c3(e.name)},...!e.isActive&&{isActive:t}})));return{...e,variations:n}}return e}));const m3=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),h3=e=>e.preventDefault();const f3={apiVersion:2,name:"core/home-link",category:"design",parent:["core/navigation"],title:"Home Link",description:"Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.",textdomain:"default",attributes:{label:{type:"string"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","fontSize","customFontSize","style"],supports:{reusable:!1,html:!1},editorStyle:"wp-block-home-link-editor",style:"wp-block-home-link"},{name:g3}=f3,b3={icon:m3,edit:function({attributes:e,setAttributes:t,context:n,clientId:r}){var o,a,i,s;const{homeUrl:l}=Cl((e=>{var t;const{getUnstableBase:n}=e(yd);return{homeUrl:null===(t=n())||void 0===t?void 0:t.home}}),[r]),{textColor:c,backgroundColor:u,style:d}=n,p=VR({className:so()({"has-text-color":!!c||!(null==d||null===(o=d.color)||void 0===o||!o.text),[`has-${c}-color`]:!!c,"has-background":!!u||!(null==d||null===(a=d.color)||void 0===a||!a.background),[`has-${u}-background-color`]:!!u}),style:{color:null==d||null===(i=d.color)||void 0===i?void 0:i.text,backgroundColor:null==d||null===(s=d.color)||void 0===s?void 0:s.background}}),{label:m}=e;return(0,tt.useEffect)((()=>{void 0===m&&t({label:er("Home")})}),[r,m]),(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)("div",p,(0,tt.createElement)("a",{className:"wp-block-home-link__content",href:l,onClick:h3},(0,tt.createElement)(Cj,{identifier:"label",className:"wp-block-home-link__label",value:m,onChange:e=>{t({label:e})},"aria-label":er("Home link text"),placeholder:er("Add home link"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))))},save:function(){return(0,tt.createElement)(JH.Content,null)},example:{attributes:{label:tr("Home Link","block example")}}},y3=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"}));const v3={apiVersion:2,name:"core/latest-comments",title:"Latest Comments",category:"widgets",description:"Display a list of your most recent comments.",keywords:["recent comments"],textdomain:"default",attributes:{commentsToShow:{type:"number",default:5,minimum:1,maximum:100},displayAvatar:{type:"boolean",default:!0},displayDate:{type:"boolean",default:!0},displayExcerpt:{type:"boolean",default:!0}},supports:{align:!0,html:!1},editorStyle:"wp-block-latest-comments-editor",style:"wp-block-latest-comments"},{name:_3}=v3,M3={icon:y3,example:{},edit:function({attributes:e,setAttributes:t}){const{commentsToShow:n,displayAvatar:r,displayDate:o,displayExcerpt:a}=e;return(0,tt.createElement)("div",VR(),(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("Latest comments settings")},(0,tt.createElement)(KN,{label:er("Display avatar"),checked:r,onChange:()=>t({displayAvatar:!r})}),(0,tt.createElement)(KN,{label:er("Display date"),checked:o,onChange:()=>t({displayDate:!o})}),(0,tt.createElement)(KN,{label:er("Display excerpt"),checked:a,onChange:()=>t({displayExcerpt:!a})}),(0,tt.createElement)(rT,{label:er("Number of comments"),value:n,onChange:e=>t({commentsToShow:e}),min:1,max:100,required:!0}))),(0,tt.createElement)(jP,null,(0,tt.createElement)(WZ,{block:"core/latest-comments",attributes:e})))}},k3=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 11h2V9H7v2zm0 4h2v-2H7v2zm3-4h7V9h-7v2zm0 4h7v-2h-7v2z"})),{attributes:w3}={apiVersion:2,name:"core/latest-posts",title:"Latest Posts",category:"widgets",description:"Display a list of your most recent posts.",keywords:["recent posts"],textdomain:"default",attributes:{categories:{type:"array",items:{type:"object"}},selectedAuthor:{type:"number"},postsToShow:{type:"number",default:5},displayPostContent:{type:"boolean",default:!1},displayPostContentRadio:{type:"string",default:"excerpt"},excerptLength:{type:"number",default:55},displayAuthor:{type:"boolean",default:!1},displayPostDate:{type:"boolean",default:!1},postLayout:{type:"string",default:"list"},columns:{type:"number",default:3},order:{type:"string",default:"desc"},orderBy:{type:"string",default:"date"},displayFeaturedImage:{type:"boolean",default:!1},featuredImageAlign:{type:"string",enum:["left","center","right"]},featuredImageSizeSlug:{type:"string",default:"thumbnail"},featuredImageSizeWidth:{type:"number",default:null},featuredImageSizeHeight:{type:"number",default:null},addLinkToFeaturedImage:{type:"boolean",default:!1}},supports:{align:!0,html:!1},editorStyle:"wp-block-latest-posts-editor",style:"wp-block-latest-posts"},E3=[{attributes:{...w3,categories:{type:"string"}},supports:{align:!0,html:!1},migrate:e=>({...e,categories:[{id:Number(e.categories)}]}),isEligible:({categories:e})=>e&&"string"==typeof e,save:()=>null}];function L3({label:e,className:t,selected:n,help:r,onChange:o,hideLabelFromVision:a,options:i=[],...s}){const l=`inspector-radio-control-${Zk(L3)}`,c=e=>o(e.target.value);return!(0,at.isEmpty)(i)&&(0,tt.createElement)(EA,{label:e,id:l,hideLabelFromVision:a,help:r,className:so()(t,"components-radio-control")},i.map(((e,t)=>(0,tt.createElement)("div",{key:`${l}-${t}`,className:"components-radio-control__option"},(0,tt.createElement)("input",ot({id:`${l}-${t}`,className:"components-radio-control__input",type:"radio",name:l,value:e.value,onChange:c,checked:e.value===n,"aria-describedby":r?`${l}__help`:void 0},s)),(0,tt.createElement)("label",{htmlFor:`${l}-${t}`},e.label)))))}function A3(e){const t=e.map((e=>({children:[],parent:null,...e}))),n=(0,at.groupBy)(t,"parent");if(n.null&&n.null.length)return t;const r=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?r(t):[]}}));return r(n[0]||[])}function S3(e,t=0){return(0,at.flatMap)(e,(e=>[{value:e.id,label:(0,at.repeat)(" ",3*t)+(0,at.unescape)(e.name)},...S3(e.children||[],t+1)]))}function C3({label:e,noOptionLabel:t,onChange:n,selectedId:r,tree:o,...a}){const i=(0,tt.useMemo)((()=>(0,at.compact)([t&&{value:"",label:t},...S3(o)])),[t,o]);return(0,tt.createElement)(KS,ot({label:e,options:i,onChange:n,value:r},a))}function T3({label:e,noOptionLabel:t,categoriesList:n,selectedCategoryId:r,onChange:o,...a}){const i=(0,tt.useMemo)((()=>A3(n)),[n]);return(0,tt.createElement)(C3,ot({label:e,noOptionLabel:t,onChange:o,tree:i,selectedId:r},a))}function x3({value:e,status:t,title:n,displayTransform:r,isBorderless:o=!1,disabled:a=!1,onClickRemove:i=at.noop,onMouseEnter:s,onMouseLeave:l,messages:c,termPosition:u,termsCount:d}){const p=Zk(x3),m=so()("components-form-token-field__token",{"is-error":"error"===t,"is-success":"success"===t,"is-validating":"validating"===t,"is-borderless":o,"is-disabled":a}),h=r(e),f=pn(er("%1$s (%2$s of %3$s)"),h,u,d);return(0,tt.createElement)("span",{className:m,onMouseEnter:s,onMouseLeave:l,title:n},(0,tt.createElement)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${p}`},(0,tt.createElement)(Mf,{as:"span"},f),(0,tt.createElement)("span",{"aria-hidden":"true"},h)),(0,tt.createElement)(wf,{className:"components-form-token-field__remove-token",icon:gP,onClick:!a&&(()=>i({value:e})),label:c.remove,"aria-describedby":`components-form-token-field__token-text-${p}`}))}class z3 extends tt.Component{constructor(){super(...arguments),this.onChange=this.onChange.bind(this),this.bindInput=this.bindInput.bind(this)}focus(){this.input.focus()}hasFocus(){return this.input===this.input.ownerDocument.activeElement}bindInput(e){this.input=e}onChange(e){this.props.onChange({value:e.target.value})}render(){const{value:e,isExpanded:t,instanceId:n,selectedSuggestionIndex:r,className:o,...a}=this.props,i=e?e.length+1:0;return(0,tt.createElement)("input",ot({ref:this.bindInput,id:`components-form-token-input-${n}`,type:"text"},a,{value:e||"",onChange:this.onChange,size:i,className:so()(o,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":t,"aria-autocomplete":"list","aria-owns":t?`components-form-token-suggestions-${n}`:void 0,"aria-activedescendant":-1!==r?`components-form-token-suggestions-${n}-${r}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${n}`}))}}const O3=z3;class N3 extends tt.Component{constructor(){super(...arguments),this.handleMouseDown=this.handleMouseDown.bind(this),this.bindList=this.bindList.bind(this)}componentDidUpdate(){this.props.selectedIndex>-1&&this.props.scrollIntoView&&this.list.children[this.props.selectedIndex]&&(this.scrollingIntoView=!0,YR()(this.list.children[this.props.selectedIndex],this.list,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100))}bindList(e){this.list=e}handleHover(e){return()=>{this.scrollingIntoView||this.props.onHover(e)}}handleClick(e){return()=>{this.props.onSelect(e)}}handleMouseDown(e){e.preventDefault()}computeSuggestionMatch(e){const t=this.props.displayTransform(this.props.match||"").toLocaleLowerCase();if(0===t.length)return null;const n=(e=this.props.displayTransform(e)).toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:e.substring(0,n),suggestionMatch:e.substring(n,n+t.length),suggestionAfterMatch:e.substring(n+t.length)}}render(){return(0,tt.createElement)("ul",{ref:this.bindList,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${this.props.instanceId}`,role:"listbox"},(0,at.map)(this.props.suggestions,((e,t)=>{const n=this.computeSuggestionMatch(e),r=so()("components-form-token-field__suggestion",{"is-selected":t===this.props.selectedIndex});return(0,tt.createElement)("li",{id:`components-form-token-suggestions-${this.props.instanceId}-${t}`,role:"option",className:r,key:null!=e&&e.value?e.value:this.props.displayTransform(e),onMouseDown:this.handleMouseDown,onClick:this.handleClick(e),onMouseEnter:this.handleHover(e),"aria-selected":t===this.props.selectedIndex},n?(0,tt.createElement)("span",{"aria-label":this.props.displayTransform(e)},n.suggestionBeforeMatch,(0,tt.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch):this.props.displayTransform(e))})))}}N3.defaultProps={match:"",onHover:()=>{},onSelect:()=>{},suggestions:Object.freeze([])};const D3=mq(N3),B3={incompleteTokenValue:"",inputOffsetFromEnd:0,isActive:!1,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1};class I3 extends tt.Component{constructor(){super(...arguments),this.state=B3,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.deleteTokenBeforeInput=this.deleteTokenBeforeInput.bind(this),this.deleteTokenAfterInput=this.deleteTokenAfterInput.bind(this),this.addCurrentToken=this.addCurrentToken.bind(this),this.onContainerTouched=this.onContainerTouched.bind(this),this.renderToken=this.renderToken.bind(this),this.onTokenClickRemove=this.onTokenClickRemove.bind(this),this.onSuggestionHovered=this.onSuggestionHovered.bind(this),this.onSuggestionSelected=this.onSuggestionSelected.bind(this),this.onInputChange=this.onInputChange.bind(this),this.bindInput=this.bindInput.bind(this),this.bindTokensAndInput=this.bindTokensAndInput.bind(this),this.updateSuggestions=this.updateSuggestions.bind(this)}componentDidUpdate(e){this.state.isActive&&!this.input.hasFocus()&&this.input.focus();const{suggestions:t,value:n}=this.props,r=!ti(t,e.suggestions);(r||n!==e.value)&&this.updateSuggestions(r)}static getDerivedStateFromProps(e,t){return e.disabled&&t.isActive?{isActive:!1,incompleteTokenValue:""}:null}bindInput(e){this.input=e}bindTokensAndInput(e){this.tokensAndInput=e}onFocus(e){const{__experimentalExpandOnFocus:t}=this.props;this.input.hasFocus()||e.target===this.tokensAndInput?this.setState({isActive:!0,isExpanded:!!t||this.state.isExpanded}):this.setState({isActive:!1}),"function"==typeof this.props.onFocus&&this.props.onFocus(e)}onBlur(){this.inputHasValidValue()?this.setState({isActive:!1}):this.setState(B3)}onKeyDown(e){let t=!1;if(!e.defaultPrevented){switch(e.keyCode){case tm:t=this.handleDeleteKey(this.deleteTokenBeforeInput);break;case nm:t=this.addCurrentToken();break;case om:t=this.handleLeftArrowKey();break;case am:t=this.handleUpArrowKey();break;case im:t=this.handleRightArrowKey();break;case sm:t=this.handleDownArrowKey();break;case lm:t=this.handleDeleteKey(this.deleteTokenAfterInput);break;case 32:this.props.tokenizeOnSpace&&(t=this.addCurrentToken());break;case rm:t=this.handleEscapeKey(e)}t&&e.preventDefault()}}onKeyPress(e){let t=!1;switch(e.charCode){case 44:t=this.handleCommaKey()}t&&e.preventDefault()}onContainerTouched(e){e.target===this.tokensAndInput&&this.state.isActive&&e.preventDefault()}onTokenClickRemove(e){this.deleteToken(e.value),this.input.focus()}onSuggestionHovered(e){const t=this.getMatchingSuggestions().indexOf(e);t>=0&&this.setState({selectedSuggestionIndex:t,selectedSuggestionScroll:!1})}onSuggestionSelected(e){this.addNewToken(e)}onInputChange(e){const t=e.value,n=this.props.tokenizeOnSpace?/[ ,\t]+/:/[,\t]+/,r=t.split(n),o=(0,at.last)(r)||"";r.length>1&&this.addNewTokens(r.slice(0,-1)),this.setState({incompleteTokenValue:o},this.updateSuggestions),this.props.onInputChange(o)}handleDeleteKey(e){let t=!1;return this.input.hasFocus()&&this.isInputEmpty()&&(e(),t=!0),t}handleLeftArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputBeforePreviousToken(),e=!0),e}handleRightArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputAfterNextToken(),e=!0),e}handleUpArrowKey(){return this.setState(((e,t)=>({selectedSuggestionIndex:(0===e.selectedSuggestionIndex?this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length:e.selectedSuggestionIndex)-1,selectedSuggestionScroll:!0}))),!0}handleDownArrowKey(){return this.setState(((e,t)=>({selectedSuggestionIndex:(e.selectedSuggestionIndex+1)%this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length,selectedSuggestionScroll:!0}))),!0}handleEscapeKey(e){return this.setState({incompleteTokenValue:e.target.value,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1}),!0}handleCommaKey(){return this.inputHasValidValue()&&this.addNewToken(this.state.incompleteTokenValue),!0}moveInputToIndex(e){this.setState(((t,n)=>({inputOffsetFromEnd:n.value.length-Math.max(e,-1)-1})))}moveInputBeforePreviousToken(){this.setState(((e,t)=>({inputOffsetFromEnd:Math.min(e.inputOffsetFromEnd+1,t.value.length)})))}moveInputAfterNextToken(){this.setState((e=>({inputOffsetFromEnd:Math.max(e.inputOffsetFromEnd-1,0)})))}deleteTokenBeforeInput(){const e=this.getIndexOfInput()-1;e>-1&&this.deleteToken(this.props.value[e])}deleteTokenAfterInput(){const e=this.getIndexOfInput();e!this.valueContainsToken(e))));if(t.length>0){const e=(0,at.clone)(this.props.value);e.splice.apply(e,[this.getIndexOfInput(),0].concat(t)),this.props.onChange(e)}}addNewToken(e){const{__experimentalExpandOnFocus:t,__experimentalValidateInput:n}=this.props;n(e)?(this.addNewTokens([e]),this.props.speak(this.props.messages.added,"assertive"),this.setState({incompleteTokenValue:"",selectedSuggestionIndex:-1,selectedSuggestionScroll:!1,isExpanded:!t}),this.state.isActive&&this.input.focus()):this.props.speak(this.props.messages.__experimentalInvalid,"assertive")}deleteToken(e){const t=this.props.value.filter((t=>this.getTokenValue(t)!==this.getTokenValue(e)));this.props.onChange(t),this.props.speak(this.props.messages.removed,"assertive")}getTokenValue(e){return"object"==typeof e?e.value:e}getMatchingSuggestions(e=this.state.incompleteTokenValue,t=this.props.suggestions,n=this.props.value,r=this.props.maxSuggestions,o=this.props.saveTransform){let a=o(e);const i=[],s=[];return 0===a.length?t=(0,at.difference)(t,n):(a=a.toLocaleLowerCase(),(0,at.each)(t,(e=>{const t=e.toLocaleLowerCase().indexOf(a);-1===n.indexOf(e)&&(0===t?i.push(e):t>0&&s.push(e))})),t=i.concat(s)),(0,at.take)(t,r)}getSelectedSuggestion(){if(-1!==this.state.selectedSuggestionIndex)return this.getMatchingSuggestions()[this.state.selectedSuggestionIndex]}valueContainsToken(e){return(0,at.some)(this.props.value,(t=>this.getTokenValue(e)===this.getTokenValue(t)))}getIndexOfInput(){return this.props.value.length-this.state.inputOffsetFromEnd}isInputEmpty(){return 0===this.state.incompleteTokenValue.length}inputHasValidValue(){return this.props.saveTransform(this.state.incompleteTokenValue).length>0}updateSuggestions(e=!0){const{__experimentalExpandOnFocus:t}=this.props,{incompleteTokenValue:n}=this.state,r=n.trim().length>1,o=this.getMatchingSuggestions(n),a=o.length>0,i={isExpanded:t||r&&a};if(e&&(i.selectedSuggestionIndex=-1,i.selectedSuggestionScroll=!1),this.setState(i),r){const{debouncedSpeak:e}=this.props;e(a?pn(nr("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",o.length),o.length):er("No results."),"assertive")}}renderTokensAndInput(){const e=(0,at.map)(this.props.value,this.renderToken);return e.splice(this.getIndexOfInput(),0,this.renderInput()),e}renderToken(e,t,n){const r=this.getTokenValue(e),o=e.status?e.status:void 0,a=t+1,i=n.length;return(0,tt.createElement)(x3,{key:"token-"+r,value:r,status:o,title:e.title,displayTransform:this.props.displayTransform,onClickRemove:this.onTokenClickRemove,isBorderless:e.isBorderless||this.props.isBorderless,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,disabled:"error"!==o&&this.props.disabled,messages:this.props.messages,termsCount:i,termPosition:a})}renderInput(){const{autoCapitalize:e,autoComplete:t,maxLength:n,placeholder:r,value:o,instanceId:a}=this.props;let i={instanceId:a,autoCapitalize:e,autoComplete:t,placeholder:0===o.length?r:"",ref:this.bindInput,key:"input",disabled:this.props.disabled,value:this.state.incompleteTokenValue,onBlur:this.onBlur,isExpanded:this.state.isExpanded,selectedSuggestionIndex:this.state.selectedSuggestionIndex};return n&&o.length>=n||(i={...i,onChange:this.onInputChange}),(0,tt.createElement)(O3,i)}render(){const{disabled:e,label:t=er("Add item"),instanceId:n,className:r,__experimentalShowHowTo:o}=this.props,{isExpanded:a}=this.state,i=so()(r,"components-form-token-field__input-container",{"is-active":this.state.isActive,"is-disabled":e});let s={className:"components-form-token-field",tabIndex:"-1"};const l=this.getMatchingSuggestions();return e||(s=Object.assign({},s,{onKeyDown:this.onKeyDown,onKeyPress:this.onKeyPress,onFocus:this.onFocus})),(0,tt.createElement)("div",s,(0,tt.createElement)("label",{htmlFor:`components-form-token-input-${n}`,className:"components-form-token-field__label"},t),(0,tt.createElement)("div",{ref:this.bindTokensAndInput,className:i,tabIndex:"-1",onMouseDown:this.onContainerTouched,onTouchStart:this.onContainerTouched},this.renderTokensAndInput(),a&&(0,tt.createElement)(D3,{instanceId:n,match:this.props.saveTransform(this.state.incompleteTokenValue),displayTransform:this.props.displayTransform,suggestions:l,selectedIndex:this.state.selectedSuggestionIndex,scrollIntoView:this.state.selectedSuggestionScroll,onHover:this.onSuggestionHovered,onSelect:this.onSuggestionSelected})),o&&(0,tt.createElement)("p",{id:`components-form-token-suggestions-howto-${n}`,className:"components-form-token-field__help"},this.props.tokenizeOnSpace?er("Separate with commas, spaces, or the Enter key."):er("Separate with commas or the Enter key.")))}}I3.defaultProps={suggestions:Object.freeze([]),maxSuggestions:100,value:Object.freeze([]),displayTransform:at.identity,saveTransform:e=>e.trim(),onChange:()=>{},onInputChange:()=>{},isBorderless:!1,disabled:!1,tokenizeOnSpace:!1,messages:{added:er("Item added."),removed:er("Item removed."),remove:er("Remove item"),__experimentalInvalid:er("Invalid item")},__experimentalExpandOnFocus:!1,__experimentalValidateInput:()=>!0,__experimentalShowHowTo:!0};const P3=pq(cS(I3));function R3({label:e,noOptionLabel:t,authorList:n,selectedAuthorId:r,onChange:o}){if(!n)return null;const a=A3(n);return(0,tt.createElement)(C3,{label:e,noOptionLabel:t,onChange:o,tree:a,selectedId:r})}function W3({authorList:e,selectedAuthorId:t,categoriesList:n,selectedCategoryId:r,categorySuggestions:o,selectedCategories:a,numberOfItems:i,order:s,orderBy:l,maxItems:c=100,minItems:u=1,onCategoryChange:d,onAuthorChange:p,onNumberOfItemsChange:m,onOrderChange:h,onOrderByChange:f}){return[h&&f&&(0,tt.createElement)(KS,{key:"query-controls-order-select",label:er("Order by"),value:`${l}/${s}`,options:[{label:er("Newest to oldest"),value:"date/desc"},{label:er("Oldest to newest"),value:"date/asc"},{label:er("A → Z"),value:"title/asc"},{label:er("Z → A"),value:"title/desc"}],onChange:e=>{const[t,n]=e.split("/");n!==s&&h(n),t!==l&&f(t)}}),n&&d&&(0,tt.createElement)(T3,{key:"query-controls-category-select",categoriesList:n,label:er("Category"),noOptionLabel:er("All"),selectedCategoryId:r,onChange:d}),o&&d&&(0,tt.createElement)(P3,{key:"query-controls-categories-select",label:er("Categories"),value:a&&a.map((e=>({id:e.id,value:e.name||e.value}))),suggestions:Object.keys(o),onChange:d,maxSuggestions:20}),p&&(0,tt.createElement)(R3,{key:"query-controls-author-select",authorList:e,label:er("Author"),noOptionLabel:er("All"),selectedAuthorId:t,onChange:p}),m&&(0,tt.createElement)(rT,{key:"query-controls-range-control",label:er("Number of items"),value:i,onChange:m,min:u,max:c,required:!0})]}const Y3=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})),H3={per_page:-1,context:"view"},q3={per_page:-1,has_published_posts:["post"],context:"view"};const j3={apiVersion:2,name:"core/latest-posts",title:"Latest Posts",category:"widgets",description:"Display a list of your most recent posts.",keywords:["recent posts"],textdomain:"default",attributes:{categories:{type:"array",items:{type:"object"}},selectedAuthor:{type:"number"},postsToShow:{type:"number",default:5},displayPostContent:{type:"boolean",default:!1},displayPostContentRadio:{type:"string",default:"excerpt"},excerptLength:{type:"number",default:55},displayAuthor:{type:"boolean",default:!1},displayPostDate:{type:"boolean",default:!1},postLayout:{type:"string",default:"list"},columns:{type:"number",default:3},order:{type:"string",default:"desc"},orderBy:{type:"string",default:"date"},displayFeaturedImage:{type:"boolean",default:!1},featuredImageAlign:{type:"string",enum:["left","center","right"]},featuredImageSizeSlug:{type:"string",default:"thumbnail"},featuredImageSizeWidth:{type:"number",default:null},featuredImageSizeHeight:{type:"number",default:null},addLinkToFeaturedImage:{type:"boolean",default:!1}},supports:{align:!0,html:!1},editorStyle:"wp-block-latest-posts-editor",style:"wp-block-latest-posts"},{name:F3}=j3,V3={icon:k3,example:{},edit:function({attributes:e,setAttributes:t}){var n;const{postsToShow:r,order:o,orderBy:a,categories:i,selectedAuthor:s,displayFeaturedImage:l,displayPostContentRadio:c,displayPostContent:u,displayPostDate:d,displayAuthor:p,postLayout:m,columns:h,excerptLength:f,featuredImageAlign:g,featuredImageSizeSlug:b,featuredImageSizeWidth:y,featuredImageSizeHeight:v,addLinkToFeaturedImage:_}=e,{imageSizeOptions:M,latestPosts:k,defaultImageWidth:w,defaultImageHeight:E,categoriesList:L,authorList:A}=Cl((e=>{const{getEntityRecords:t,getMedia:n,getUsers:l}=e(yd),{getSettings:c}=e(nk),{imageSizes:u,imageDimensions:d}=c(),p=i&&i.length>0?i.map((e=>e.id)):[],m=t("postType","post",(0,at.pickBy)({categories:p,author:s,order:o,orderby:a,per_page:r},(e=>!(0,at.isUndefined)(e))));return{defaultImageWidth:(0,at.get)(d,[b,"width"],0),defaultImageHeight:(0,at.get)(d,[b,"height"],0),imageSizeOptions:u.filter((({slug:e})=>"full"!==e)).map((({name:e,slug:t})=>({value:t,label:e}))),latestPosts:Array.isArray(m)?m.map((e=>{if(!e.featured_media)return e;const t=n(e.featured_media);let r=(0,at.get)(t,["media_details","sizes",b,"source_url"],null);r||(r=(0,at.get)(t,"source_url",null));const o={url:r,alt:null==t?void 0:t.alt_text};return{...e,featuredImageInfo:o}})):m,categoriesList:t("taxonomy","category",H3),authorList:l(q3)}}),[b,r,o,a,i,s]),S=null!==(n=null==L?void 0:L.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==n?n:{},C=!(null==k||!k.length),T=(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("Post content settings")},(0,tt.createElement)(KN,{label:er("Post content"),checked:u,onChange:e=>t({displayPostContent:e})}),u&&(0,tt.createElement)(L3,{label:er("Show:"),selected:c,options:[{label:er("Excerpt"),value:"excerpt"},{label:er("Full post"),value:"full_post"}],onChange:e=>t({displayPostContentRadio:e})}),u&&"excerpt"===c&&(0,tt.createElement)(rT,{label:er("Max number of words in excerpt"),value:f,onChange:e=>t({excerptLength:e}),min:10,max:100})),(0,tt.createElement)(BA,{title:er("Post meta settings")},(0,tt.createElement)(KN,{label:er("Display author name"),checked:p,onChange:e=>t({displayAuthor:e})}),(0,tt.createElement)(KN,{label:er("Display post date"),checked:d,onChange:e=>t({displayPostDate:e})})),(0,tt.createElement)(BA,{title:er("Featured image settings")},(0,tt.createElement)(KN,{label:er("Display featured image"),checked:l,onChange:e=>t({displayFeaturedImage:e})}),l&&(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(qH,{onChange:e=>{const n={};e.hasOwnProperty("width")&&(n.featuredImageSizeWidth=e.width),e.hasOwnProperty("height")&&(n.featuredImageSizeHeight=e.height),t(n)},slug:b,width:y,height:v,imageWidth:w,imageHeight:E,imageSizeOptions:M,onChangeImage:e=>t({featuredImageSizeSlug:e,featuredImageSizeWidth:void 0,featuredImageSizeHeight:void 0})}),(0,tt.createElement)(EA,{className:"block-editor-image-alignment-control__row"},(0,tt.createElement)(EA.VisualLabel,null,er("Image alignment")),(0,tt.createElement)(dA,{value:g,onChange:e=>t({featuredImageAlign:e}),controls:["left","center","right"],isCollapsed:!1})),(0,tt.createElement)(KN,{label:er("Add link to featured image"),checked:_,onChange:e=>t({addLinkToFeaturedImage:e})}))),(0,tt.createElement)(BA,{title:er("Sorting and filtering")},(0,tt.createElement)(W3,{order:o,orderBy:a,numberOfItems:r,onOrderChange:e=>t({order:e}),onOrderByChange:e=>t({orderBy:e}),onNumberOfItemsChange:e=>t({postsToShow:e}),categorySuggestions:S,onCategoryChange:e=>{if(e.some((e=>"string"==typeof e&&!S[e])))return;const n=e.map((e=>"string"==typeof e?S[e]:e));if((0,at.includes)(n,null))return!1;t({categories:n})},selectedCategories:i,onAuthorChange:e=>t({selectedAuthor:""!==e?Number(e):void 0}),authorList:null!=A?A:[],selectedAuthorId:s}),"grid"===m&&(0,tt.createElement)(rT,{label:er("Columns"),value:h,onChange:e=>t({columns:e}),min:2,max:C?Math.min(6,k.length):6,required:!0}))),x=VR({className:so()({"wp-block-latest-posts__list":!0,"is-grid":"grid"===m,"has-dates":d,"has-author":p,[`columns-${h}`]:"grid"===m})});if(!C)return(0,tt.createElement)("div",x,T,(0,tt.createElement)(yH,{icon:TQ,label:er("Latest Posts")},Array.isArray(k)?er("No posts found."):(0,tt.createElement)(cq,null)));const z=k.length>r?k.slice(0,r):k,O=[{icon:Y3,title:er("List view"),onClick:()=>t({postLayout:"list"}),isActive:"list"===m},{icon:MH,title:er("Grid view"),onClick:()=>t({postLayout:"grid"}),isActive:"grid"===m}],N=dV().formats.date;return(0,tt.createElement)("div",null,T,(0,tt.createElement)(lk,null,(0,tt.createElement)(eb,{controls:O})),(0,tt.createElement)("ul",x,z.map(((e,t)=>{const n=(0,at.invoke)(e,["title","rendered","trim"]);let r=e.excerpt.rendered;const o=null==A?void 0:A.find((t=>t.id===e.author)),a=document.createElement("div");a.innerHTML=r,r=a.textContent||a.innerText||"";const{featuredImageInfo:{url:i,alt:s}={}}=e,m=so()({"wp-block-latest-posts__featured-image":!0,[`align${g}`]:!!g}),h=l&&i,b=h&&(0,tt.createElement)("img",{src:i,alt:s,style:{maxWidth:y,maxHeight:v}}),M=ft({displayLoginAsForm:!n})}),(0,tt.createElement)(KN,{label:er("Redirect to current URL"),checked:r,onChange:()=>t({redirectToCurrent:!r})}))),(0,tt.createElement)("div",VR({className:"logged-in"}),(0,tt.createElement)("a",{href:"#login-pseudo-link"},er("Log out"))))}},G3=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})),J3=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),Z3=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z"})),Q3=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z"})),e4=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z"})),t4=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"})),n4=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z"})),r4=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z"})),o4=({setAttributes:e,reversed:t,start:n})=>(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("Ordered list settings")},(0,tt.createElement)(LA,{label:er("Start value"),type:"number",onChange:t=>{const n=parseInt(t,10);e({start:isNaN(n)?void 0:n})},value:Number.isInteger(n)?n.toString(10):"",step:"1"}),(0,tt.createElement)(KN,{label:er("Reverse list numbering"),checked:t||!1,onChange:t=>{e({reversed:t||void 0})}})));function a4({phrasingContentSchema:e}){const t={...e,ul:{},ol:{attributes:["type","start","reversed"]}};return["ul","ol"].forEach((e=>{t[e].children={li:{children:t}}})),t}const i4={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph","core/heading"],transform:e=>Ho("core/list",{values:u_({value:Gv(e.map((({content:t})=>{const n=Ov({html:t});return e.length>1?n:n_(n,/\n/g,Cv)})),Cv),multilineTag:"li"}),anchor:e.anchor})},{type:"block",blocks:["core/quote","core/pullquote"],transform:({value:e,anchor:t})=>Ho("core/list",{values:u_({value:Ov({html:e,multilineTag:"p"}),multilineTag:"li"}),anchor:t})},{type:"raw",selector:"ol,ul",schema:e=>({ol:a4(e).ol,ul:a4(e).ul}),transform(e){const t={ordered:"OL"===e.nodeName,anchor:""===e.id?void 0:e.id};if(t.ordered){const n=e.getAttribute("type");n&&(t.type=n),null!==e.getAttribute("reversed")&&(t.reversed=!0);const r=parseInt(e.getAttribute("start"),10);isNaN(r)||1===r&&!t.reversed||(t.start=r)}return Ho("core/list",{...Ki("core/list",e.outerHTML),...t})}},...["*","-"].map((e=>({type:"prefix",prefix:e,transform:e=>Ho("core/list",{values:`
  • ${e}
  • `})}))),...["1.","1)"].map((e=>({type:"prefix",prefix:e,transform:e=>Ho("core/list",{ordered:!0,values:`
  • ${e}
  • `})})))],to:[{type:"block",blocks:["core/paragraph"],transform:({values:e})=>o_(Ov({html:e,multilineTag:"li",multilineWrapperTags:["ul","ol"]}),Cv).map((e=>Ho("core/paragraph",{content:u_({value:e})})))},{type:"block",blocks:["core/heading"],transform:({values:e})=>o_(Ov({html:e,multilineTag:"li",multilineWrapperTags:["ul","ol"]}),Cv).map((e=>Ho("core/heading",{content:u_({value:e})})))},{type:"block",blocks:["core/quote"],transform:({values:e,anchor:t})=>Ho("core/quote",{value:u_({value:Ov({html:e,multilineTag:"li",multilineWrapperTags:["ul","ol"]}),multilineTag:"p"}),anchor:t})},{type:"block",blocks:["core/pullquote"],transform:({values:e,anchor:t})=>Ho("core/pullquote",{value:u_({value:Ov({html:e,multilineTag:"li",multilineWrapperTags:["ul","ol"]}),multilineTag:"p"}),anchor:t})}]},s4={apiVersion:2,name:"core/list",title:"List",category:"text",description:"Create a bulleted or numbered list.",keywords:["bullet list","ordered list","numbered list"],textdomain:"default",attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0},color:{gradients:!0,link:!0},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul"},editorStyle:"wp-block-list-editor",style:"wp-block-list"},{name:l4}=s4,c4={icon:Y3,example:{attributes:{values:"
  • Alice.
  • The White Rabbit.
  • The Cheshire Cat.
  • The Mad Hatter.
  • The Queen of Hearts.
  • "}},transforms:i4,merge(e,t){const{values:n}=t;return n&&"
  • "!==n?{...e,values:e.values+n}:e},edit:function({attributes:e,setAttributes:t,mergeBlocks:n,onReplace:r,style:o}){const{ordered:a,values:i,type:s,reversed:l,start:c,placeholder:u}=e,d=a?"ol":"ul",p=VR({style:o});return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(Cj,ot({identifier:"values",multiline:"li",tagName:d,onChange:e=>t({values:e}),value:i,"aria-label":er("List text"),placeholder:u||er("List"),onMerge:n,onSplit:t=>Ho(l4,{...e,values:t}),__unstableOnSplitMiddle:()=>Ho("core/paragraph"),onReplace:r,onRemove:()=>r([]),start:c,reversed:l,type:s},p),(({value:e,onChange:n,onFocus:r})=>(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(Oj,{type:"primary",character:"[",onUse:()=>{n(L_(e))}}),(0,tt.createElement)(Oj,{type:"primary",character:"]",onUse:()=>{n(w_(e,{type:d}))}}),(0,tt.createElement)(Oj,{type:"primary",character:"m",onUse:()=>{n(w_(e,{type:d}))}}),(0,tt.createElement)(Oj,{type:"primaryShift",character:"m",onUse:()=>{n(L_(e))}}),(0,tt.createElement)(lk,{group:"block"},(0,tt.createElement)(qg,{icon:rr()?G3:J3,title:er("Unordered"),describedBy:er("Convert to unordered list"),isActive:Xv(e,"ul",d),onClick:()=>{n(A_(e,{type:"ul"})),r(),Vv(e)&&t({ordered:!1})}}),(0,tt.createElement)(qg,{icon:rr()?Z3:Q3,title:er("Ordered"),describedBy:er("Convert to ordered list"),isActive:Xv(e,"ol",d),onClick:()=>{n(A_(e,{type:"ol"})),r(),Vv(e)&&t({ordered:!0})}}),(0,tt.createElement)(qg,{icon:rr()?e4:t4,title:er("Outdent"),describedBy:er("Outdent list item"),shortcut:tr("Backspace","keyboard key"),isDisabled:!k_(e),onClick:()=>{n(L_(e)),r()}}),(0,tt.createElement)(qg,{icon:rr()?n4:r4,title:er("Indent"),describedBy:er("Indent list item"),shortcut:tr("Space","keyboard key"),isDisabled:!M_(e),onClick:()=>{n(w_(e,{type:d})),r()}}))))),a&&(0,tt.createElement)(o4,{setAttributes:t,ordered:a,reversed:l,start:c,placeholder:u}))},save:function({attributes:e}){const{ordered:t,values:n,type:r,reversed:o,start:a}=e,i=t?"ol":"ul";return(0,tt.createElement)(i,VR.save({type:r,reversed:o,start:a}),(0,tt.createElement)(Cj.Content,{value:n,multiline:"li"}))}};const u4=eP(((e,{clientId:t,attributes:n})=>{const{replaceBlock:r}=e(nk);return{convertToHTML(){r(t,Ho("core/html",{content:n.originalUndelimitedContent}))}}}))((function({attributes:e,convertToHTML:t}){const{originalName:n,originalUndelimitedContent:r}=e,o=!!r,a=Bo("core/html"),i=[];let s;return o&&a?(s=pn(er('Your site doesn’t include support for the "%s" block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely.'),n),i.push((0,tt.createElement)(wf,{key:"convert",onClick:t,variant:"primary"},er("Keep as HTML")))):s=pn(er('Your site doesn’t include support for the "%s" block. You can leave this block intact or remove it entirely.'),n),(0,tt.createElement)("div",VR({className:"has-warning"}),(0,tt.createElement)(cR,{actions:i},s),(0,tt.createElement)(Ia,null,VP(r)))}));const d4={apiVersion:2,name:"core/missing",title:"Unsupported",category:"text",description:"Your site doesn’t include support for this block.",textdomain:"default",attributes:{originalName:{type:"string"},originalUndelimitedContent:{type:"string"},originalContent:{type:"string",source:"html"}},supports:{className:!1,customClassName:!1,inserter:!1,html:!1,reusable:!1}},{name:p4}=d4,m4={name:p4,__experimentalLabel(e,{context:t}){if("accessibility"===t){const{originalName:t}=e,n=t?Bo(t):void 0;return n?n.settings.title||t:""}},edit:u4,save:function({attributes:e}){return(0,tt.createElement)(Ia,null,e.originalContent)}},h4=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"})),f4=er("Read more");const g4={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/more"===e.dataset.block,transform(e){const{customText:t,noTeaser:n}=e.dataset,r={};return t&&(r.customText=t),""===n&&(r.noTeaser=!0),Ho("core/more",r)}}]},b4={apiVersion:2,name:"core/more",title:"More",category:"design",description:"Content before this block will be shown in the excerpt on your archives page.",keywords:["read more"],textdomain:"default",attributes:{customText:{type:"string"},noTeaser:{type:"boolean",default:!1}},supports:{customClassName:!1,className:!1,html:!1,multiple:!1},editorStyle:"wp-block-more-editor"},{name:y4}=b4,v4={icon:h4,example:{},__experimentalLabel(e,{context:t}){if("accessibility"===t)return e.customText},transforms:g4,edit:function({attributes:{customText:e,noTeaser:t},insertBlocksAfter:n,setAttributes:r}){const o={width:`${(e||f4).length+1.2}em`};return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,null,(0,tt.createElement)(KN,{label:er("Hide the excerpt on the full content page"),checked:!!t,onChange:()=>r({noTeaser:!t}),help:e=>er(e?"The excerpt is hidden.":"The excerpt is visible.")}))),(0,tt.createElement)("div",VR(),(0,tt.createElement)("div",{className:"wp-block-more"},(0,tt.createElement)("input",{"aria-label":er("Read more link text"),type:"text",value:e,placeholder:f4,onChange:e=>{r({customText:""!==e.target.value?e.target.value:void 0})},onKeyDown:({keyCode:e})=>{e===nm&&n([Ho(Do())])},style:o}))))},save:function({attributes:{customText:e,noTeaser:t}}){const n=e?`\x3c!--more ${e}--\x3e`:"\x3c!--more--\x3e",r=t?"\x3c!--noteaser--\x3e":"";return(0,tt.createElement)(Ia,null,(0,at.compact)([n,r]).join("\n"))}},_4=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M7.8 6c0-.7.6-1.2 1.2-1.2h6c.7 0 1.2.6 1.2 1.2v3h1.5V6c0-1.5-1.2-2.8-2.8-2.8H9C7.5 3.2 6.2 4.5 6.2 6v3h1.5V6zm8.4 11c0 .7-.6 1.2-1.2 1.2H9c-.7 0-1.2-.6-1.2-1.2v-3H6.2v3c0 1.5 1.2 2.8 2.8 2.8h6c1.5 0 2.8-1.2 2.8-2.8v-3h-1.5v3zM4 11v1h16v-1H4z"}));const M4={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/nextpage"===e.dataset.block,transform:()=>Ho("core/nextpage",{})}]},k4={apiVersion:2,name:"core/nextpage",title:"Page Break",category:"design",description:"Separate your content into a multi-page experience.",keywords:["next page","pagination"],parent:["core/post-content"],textdomain:"default",supports:{customClassName:!1,className:!1,html:!1},editorStyle:"wp-block-nextpage-editor"},{name:w4}=k4,E4={icon:_4,example:{},transforms:M4,edit:function(){return(0,tt.createElement)("div",VR(),(0,tt.createElement)("div",{className:"wp-block-nextpage"},(0,tt.createElement)("span",null,er("Page break"))))},save:function(){return(0,tt.createElement)(Ia,null,"\x3c!--nextpage--\x3e")}},L4=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M7 13.8h6v-1.5H7v1.5zM18 16V4c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2zM5.5 16V4c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zM7 10.5h8V9H7v1.5zm0-3.3h8V5.8H7v1.4zM20.2 6v13c0 .7-.6 1.2-1.2 1.2H8v1.5h11c1.5 0 2.7-1.2 2.7-2.8V6h-1.5z"})),A4=["id","title","link","type","parent"],S4=({pages:e,clientId:t,replaceBlock:n,createBlock:r})=>()=>{if(!e)return;const o={},a=[];e.forEach((({id:e,title:t,link:n,type:i,parent:s})=>{var l,c;const u=null!==(l=null===(c=o[e])||void 0===c?void 0:c.innerBlocks)&&void 0!==l?l:[];if(o[e]=r("core/navigation-link",{id:e,label:t.rendered,url:n,type:i,kind:"post-type"},u),s){o[s]||(o[s]={innerBlocks:[]});o[s].innerBlocks.push(o[e])}else a.push(o[e])})),n(t,a)};function C4({onClose:e,clientId:t}){const{pages:n,pagesFinished:r}=Cl((e=>{const{getEntityRecords:t,hasFinishedResolution:n}=e(yd),r=["postType","page",{per_page:100,_fields:A4,orderby:"menu_order",order:"asc"}];return{pages:t(...r),pagesFinished:n("getEntityRecords",r)}}),[t]),{replaceBlock:o}=sd(nk);return(0,tt.createElement)(sR,{closeLabel:er("Close"),onRequestClose:e,title:er("Convert to links"),className:"wp-block-page-list-modal",aria:{describedby:"wp-block-page-list-modal__description"}},(0,tt.createElement)("p",{id:"wp-block-page-list-modal__description"},er("To edit this navigation menu, convert it to single page links. This allows you to add, re-order, remove items, or edit their labels.")),(0,tt.createElement)("p",null,er("Note: if you add new pages to your site, you'll need to add them to your navigation menu.")),(0,tt.createElement)("div",{className:"wp-block-page-list-modal-buttons"},(0,tt.createElement)(wf,{variant:"tertiary",onClick:e},er("Cancel")),(0,tt.createElement)(wf,{variant:"primary",disabled:!r,onClick:S4({pages:n,replaceBlock:o,clientId:t,createBlock:Ho})},er("Convert"))))}const T4={apiVersion:2,name:"core/page-list",title:"Page List",category:"widgets",description:"Display a list of all pages.",keywords:["menu","navigation"],textdomain:"default",attributes:{textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style"],supports:{reusable:!1,html:!1},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"},{name:x4}=T4,z4={icon:L4,example:{},edit:function({context:e,clientId:t,attributes:n,setAttributes:r}){(0,tt.useEffect)((()=>{const{textColor:t,customTextColor:n,backgroundColor:o,customBackgroundColor:a,overlayTextColor:i,customOverlayTextColor:s,overlayBackgroundColor:l,customOverlayBackgroundColor:c}=e;r({textColor:t,customTextColor:n,backgroundColor:o,customBackgroundColor:a,overlayTextColor:i,customOverlayTextColor:s,overlayBackgroundColor:l,customOverlayBackgroundColor:c})}),[e.textColor,e.customTextColor,e.backgroundColor,e.customBackgroundColor,e.overlayTextColor,e.customOverlayTextColor,e.overlayBackgroundColor,e.customOverlayBackgroundColor]);const{textColor:o,backgroundColor:a,showSubmenuIcon:i,style:s}=e||{},[l,c]=(0,tt.useState)(!1),u=VR({className:so()({"has-text-color":!!o,[mC("color",o)]:!!o,"has-background":!!a,[mC("background-color",a)]:!!a,"show-submenu-icons":!!i}),style:{...null==s?void 0:s.color}}),d=Cl((e=>{const{getBlockParentsByBlockName:n}=e(nk);return n(t,"core/navigation").length>0}),[t]);(0,tt.useEffect)((()=>{d?Ql({path:Il("/wp/v2/pages",{per_page:1,_fields:["id"]}),parse:!1}).then((e=>{c(e.headers.get("X-WP-Total")<=100)})):c(!1)}),[d]);const[p,m]=(0,tt.useState)(!1);return(0,tt.createElement)(tt.Fragment,null,l&&(0,tt.createElement)(lk,{group:"other"},(0,tt.createElement)(qg,{title:er("Edit"),onClick:()=>m(!0)},er("Edit"))),l&&p&&(0,tt.createElement)(C4,{onClose:()=>m(!1),clientId:t}),(0,tt.createElement)("div",u,(0,tt.createElement)(WZ,{block:"core/page-list",attributes:n})))}},O4=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z"}));const N4={from:[{type:"block",blocks:["core/code","core/paragraph"],transform:({content:e,anchor:t})=>Ho("core/preformatted",{content:e,anchor:t})},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&!(1===e.children.length&&"CODE"===e.firstChild.nodeName),schema:({phrasingContentSchema:e})=>({pre:{children:e}})}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>Ho("core/paragraph",e)},{type:"block",blocks:["core/code"],transform:e=>Ho("core/code",e)}]},D4={apiVersion:2,name:"core/preformatted",title:"Preformatted",category:"text",description:"Add text that respects your spacing and tabs, and also allows styling.",textdomain:"default",attributes:{content:{type:"string",source:"html",selector:"pre",default:"",__unstablePreserveWhiteSpace:!0,__experimentalRole:"content"}},supports:{anchor:!0,color:{gradients:!0},typography:{fontSize:!0}},style:"wp-block-preformatted"},{name:B4}=D4,I4={icon:O4,example:{attributes:{content:er("EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;")}},transforms:N4,edit:function({attributes:e,mergeBlocks:t,setAttributes:n,onRemove:r}){const{content:o}=e,a=VR();return(0,tt.createElement)(Cj,ot({tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:o,onChange:e=>{n({content:e})},onRemove:r,"aria-label":er("Preformatted text"),placeholder:er("Write preformatted text…"),onMerge:t},a,{__unstablePastePlainText:!0}))},save:function({attributes:e}){const{content:t}=e;return(0,tt.createElement)("pre",VR.save(),(0,tt.createElement)(Cj.Content,{value:t}))},merge:(e,t)=>({content:e.content+t.content})},P4=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z"})),R4="is-style-solid-color",W4={value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}};function Y4(e){if(!e)return;const t=e.match(/border-color:([^;]+)[;]?/);return t&&t[1]?t[1]:void 0}const H4=[{attributes:{...W4},save({attributes:e}){const{mainColor:t,customMainColor:n,customTextColor:r,textColor:o,value:a,citation:i,className:s}=e;let l,c;if((0,at.includes)(s,R4)){const e=mC("background-color",t);l=so()({"has-background":e||n,[e]:e}),c={backgroundColor:e?void 0:n}}else n&&(c={borderColor:n});const u=mC("color",o),d=so()({"has-text-color":o||r,[u]:u}),p=u?void 0:{color:r};return(0,tt.createElement)("figure",VR.save({className:l,style:c}),(0,tt.createElement)("blockquote",{className:d,style:p},(0,tt.createElement)(Cj.Content,{value:a,multiline:!0}),!Cj.isEmpty(i)&&(0,tt.createElement)(Cj.Content,{tagName:"cite",value:i})))},migrate({className:e,mainColor:t,customMainColor:n,customTextColor:r,...o}){const a=(0,at.includes)(e,R4);let i;return n&&(i=a?{color:{background:n}}:{border:{color:n}}),r&&i&&(i.color={...i.color,text:r}),{className:e,backgroundColor:a?t:void 0,borderColor:a?void 0:t,textAlign:a?"left":void 0,style:i,...o}}},{attributes:{...W4,figureStyle:{source:"attribute",selector:"figure",attribute:"style"}},save({attributes:e}){const{mainColor:t,customMainColor:n,textColor:r,customTextColor:o,value:a,citation:i,className:s,figureStyle:l}=e;let c,u;if((0,at.includes)(s,R4)){const e=mC("background-color",t);c=so()({"has-background":e||n,[e]:e}),u={backgroundColor:e?void 0:n}}else if(n)u={borderColor:n};else if(t){u={borderColor:Y4(l)}}const d=mC("color",r),p=(r||o)&&so()("has-text-color",{[d]:d}),m=d?void 0:{color:o};return(0,tt.createElement)("figure",{className:c,style:u},(0,tt.createElement)("blockquote",{className:p,style:m},(0,tt.createElement)(Cj.Content,{value:a,multiline:!0}),!Cj.isEmpty(i)&&(0,tt.createElement)(Cj.Content,{tagName:"cite",value:i})))},migrate({className:e,figureStyle:t,mainColor:n,customMainColor:r,customTextColor:o,...a}){const i=(0,at.includes)(e,R4);let s;if(r&&(s=i?{color:{background:r}}:{border:{color:r}}),o&&s&&(s.color={...s.color,text:o}),!i&&n&&t){const n=Y4(t);if(n)return{...a,className:e,style:{border:{color:n}}}}return{className:e,backgroundColor:i?n:void 0,borderColor:i?void 0:n,textAlign:i?"left":void 0,style:s,...a}}},{attributes:W4,save({attributes:e}){const{mainColor:t,customMainColor:n,textColor:r,customTextColor:o,value:a,citation:i,className:s}=e;let l,c;if((0,at.includes)(s,R4))l=mC("background-color",t),l||(c={backgroundColor:n});else if(n)c={borderColor:n};else if(t){const e=(0,at.get)(tn(nk).getSettings(),["colors"],[]);c={borderColor:dC(e,t).color}}const u=mC("color",r),d=r||o?so()("has-text-color",{[u]:u}):void 0,p=u?void 0:{color:o};return(0,tt.createElement)("figure",{className:l,style:c},(0,tt.createElement)("blockquote",{className:d,style:p},(0,tt.createElement)(Cj.Content,{value:a,multiline:!0}),!Cj.isEmpty(i)&&(0,tt.createElement)(Cj.Content,{tagName:"cite",value:i})))},migrate({className:e,mainColor:t,customMainColor:n,customTextColor:r,...o}){const a=(0,at.includes)(e,R4);let i={};return n&&(i=a?{color:{background:n}}:{border:{color:n}}),r&&i&&(i.color={...i.color,text:r}),{className:e,backgroundColor:a?t:void 0,borderColor:a?void 0:t,textAlign:a?"left":void 0,style:i,...o}}},{attributes:{...W4},save({attributes:e}){const{value:t,citation:n}=e;return(0,tt.createElement)("blockquote",null,(0,tt.createElement)(Cj.Content,{value:t,multiline:!0}),!Cj.isEmpty(n)&&(0,tt.createElement)(Cj.Content,{tagName:"cite",value:n}))}},{attributes:{...W4,citation:{type:"string",source:"html",selector:"footer"},align:{type:"string",default:"none"}},save({attributes:e}){const{value:t,citation:n,align:r}=e;return(0,tt.createElement)("blockquote",{className:`align${r}`},(0,tt.createElement)(Cj.Content,{value:t,multiline:!0}),!Cj.isEmpty(n)&&(0,tt.createElement)(Cj.Content,{tagName:"footer",value:n}))}}];const q4=function({attributes:e,setAttributes:t,isSelected:n,insertBlocksAfter:r}){const{textAlign:o,citation:a,value:i}=e,s=VR({className:so()({[`has-text-align-${o}`]:o})}),l=!Cj.isEmpty(a)||n;return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,{group:"block"},(0,tt.createElement)(gD,{value:o,onChange:e=>{t({textAlign:e})}})),(0,tt.createElement)("figure",s,(0,tt.createElement)("blockquote",null,(0,tt.createElement)(Cj,{identifier:"value",multiline:!0,value:i,onChange:e=>t({value:e}),"aria-label":er("Pullquote text"),placeholder:er("Add quote"),textAlign:"center"}),l&&(0,tt.createElement)(Cj,{identifier:"citation",value:a,"aria-label":er("Pullquote citation text"),placeholder:er("Add citation"),onChange:e=>t({citation:e}),className:"wp-block-pullquote__citation",__unstableMobileNoFocusOnMount:!0,textAlign:"center",__unstableOnSplitAtEnd:()=>r(Ho("core/paragraph"))}))))};const j4={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>Ho("core/pullquote",{value:u_({value:Gv(e.map((({content:e})=>Ov({html:e}))),"\u2028"),multilineTag:"p"}),anchor:e.anchor})},{type:"block",blocks:["core/heading"],transform:({content:e,anchor:t})=>Ho("core/pullquote",{value:`

    ${e}

    `,anchor:t})}],to:[{type:"block",blocks:["core/paragraph"],transform:({value:e,citation:t})=>{const n=[];return e&&"

    "!==e&&n.push(...o_(Ov({html:e,multilineTag:"p"}),"\u2028").map((e=>Ho("core/paragraph",{content:u_({value:e})})))),t&&"

    "!==t&&n.push(Ho("core/paragraph",{content:t})),0===n.length?Ho("core/paragraph",{content:""}):n}},{type:"block",blocks:["core/heading"],transform:({value:e,citation:t,...n})=>{if("

    "===e)return Ho("core/heading",{content:t});const r=o_(Ov({html:e,multilineTag:"p"}),"\u2028"),o=Ho("core/heading",{content:u_({value:r[0]})});if(!t&&1===r.length)return o;return[o,Ho("core/pullquote",{...n,citation:t,value:u_({value:r.slice(1).length?Gv(r.slice(1),"\u2028"):Ov(),multilineTag:"p"})})]}}]},F4={apiVersion:2,name:"core/pullquote",title:"Pullquote",category:"text",description:"Give special visual emphasis to a quote from your text.",textdomain:"default",attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",__experimentalRole:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",__experimentalRole:"content"},textAlign:{type:"string"}},supports:{anchor:!0,align:["left","right","wide","full"],color:{gradients:!0,background:!0,link:!0},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0}},editorStyle:"wp-block-pullquote-editor",style:"wp-block-pullquote"},{name:V4}=F4,X4={icon:P4,example:{attributes:{value:"

    "+er("One of the hardest things to do in technology is disrupt yourself.")+"

    ",citation:er("Matt Mullenweg")}},transforms:j4,edit:q4,save:function({attributes:e}){const{textAlign:t,citation:n,value:r}=e,o=!Cj.isEmpty(n);return(0,tt.createElement)("figure",VR.save({className:so()({[`has-text-align-${t}`]:t})}),(0,tt.createElement)("blockquote",null,(0,tt.createElement)(Cj.Content,{value:r,multiline:!0}),o&&(0,tt.createElement)(Cj.Content,{tagName:"cite",value:n})))},deprecated:H4};function*U4(e){yield function(e){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:e}}(e)}function*$4(e,t){yield function(e,t){return{type:"CONVERT_BLOCKS_TO_REUSABLE",clientIds:e,title:t}}(e,t)}function*K4(e){yield function(e){return{type:"DELETE_REUSABLE_BLOCK",id:e}}(e)}function G4(e,t){return{type:"SET_EDITING_REUSABLE_BLOCK",clientId:e,isEditing:t}}function J4(e,t){return e.isEditingReusableBlock[t]}const Z4=Jt("core/reusable-blocks",{actions:re,controls:{CONVERT_BLOCK_TO_STATIC:St((e=>({clientId:t})=>{const n=e.select(nk).getBlock(t),r=e.select("core").getEditedEntityRecord("postType","wp_block",n.attributes.ref),o=ts((0,at.isFunction)(r.content)?r.content(r):r.content);e.dispatch(nk).replaceBlocks(n.clientId,o)})),CONVERT_BLOCKS_TO_REUSABLE:St((e=>async function({clientIds:t,title:n}){const r={title:n||er("Untitled Reusable block"),content:fi(e.select(nk).getBlocksByClientId(t)),status:"publish"},o=Ho("core/block",{ref:(await e.dispatch("core").saveEntityRecord("postType","wp_block",r)).id});e.dispatch(nk).replaceBlocks(t,o),e.dispatch(Z4).__experimentalSetEditingReusableBlock(o.clientId,!0)})),DELETE_REUSABLE_BLOCK:St((e=>async function({id:t}){if(!e.select("core").getEditedEntityRecord("postType","wp_block",t))return;const n=e.select(nk).getBlocks().filter((e=>Wo(e)&&e.attributes.ref===t)).map((e=>e.clientId));n.length&&e.dispatch(nk).removeBlocks(n),await e.dispatch("core").deleteEntityRecord("postType","wp_block",t)}))},reducer:st()({isEditingReusableBlock:function(e={},t){return"SET_EDITING_REUSABLE_BLOCK"===(null==t?void 0:t.type)?{...e,[t.clientId]:t.isEditing}:e}}),selectors:oe});an(Z4);const Q4=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z"}));const e5={apiVersion:2,name:"core/block",title:"Reusable block",category:"reusable",description:"Create and save content to reuse across your site. Update the block, and the changes apply everywhere it’s used.",textdomain:"default",attributes:{ref:{type:"number"}},supports:{customClassName:!1,html:!1,inserter:!1},editorStyle:"wp-block-editor"},{name:t5}=e5,n5={edit:function({attributes:{ref:e},clientId:t}){const[n,r]=DF(e),{isMissing:o,hasResolved:a}=Cl((t=>{const n=t(yd).getEntityRecord("postType","wp_block",e),r=t(yd).hasFinishedResolution("getEntityRecord",["postType","wp_block",e]);return{hasResolved:r,isMissing:r&&!n}}),[e,t]),{__experimentalConvertBlockToStatic:i}=sd(Z4),[s,l,c]=md("postType","wp_block",{id:e}),[u,d]=pd("postType","wp_block","title",e),p=VR(),m=GH({},{value:s,onInput:l,onChange:c,renderAppender:null!=s&&s.length?void 0:JH.ButtonBlockAppender});return n?(0,tt.createElement)("div",p,(0,tt.createElement)(cR,null,er("Block cannot be rendered inside itself."))):o?(0,tt.createElement)("div",p,(0,tt.createElement)(cR,null,er("Block has been deleted or is unavailable."))):a?(0,tt.createElement)(r,null,(0,tt.createElement)("div",p,(0,tt.createElement)(lk,null,(0,tt.createElement)(eb,null,(0,tt.createElement)(qg,{onClick:()=>i(t),label:er("Convert to regular blocks"),icon:Q4,showTooltip:!0}))),(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,null,(0,tt.createElement)(LA,{label:er("Name"),value:u,onChange:d}))),(0,tt.createElement)(bB,{clientId:t,wrapperProps:m,className:"block-library-block__reusable-block-container"}))):(0,tt.createElement)("div",p,(0,tt.createElement)(yH,null,(0,tt.createElement)(cq,null)))}},r5=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(uo,{d:"M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z"}));const o5={apiVersion:2,name:"core/rss",title:"RSS",category:"widgets",description:"Display entries from any RSS or Atom feed.",keywords:["atom","feed"],textdomain:"default",attributes:{columns:{type:"number",default:2},blockLayout:{type:"string",default:"list"},feedURL:{type:"string",default:""},itemsToShow:{type:"number",default:5},displayExcerpt:{type:"boolean",default:!1},displayAuthor:{type:"boolean",default:!1},displayDate:{type:"boolean",default:!1},excerptLength:{type:"number",default:55}},supports:{align:!0,html:!1},editorStyle:"wp-block-rss-editor",style:"wp-block-rss"},{name:a5}=o5,i5={icon:r5,example:{attributes:{feedURL:"https://wordpress.org"}},edit:function({attributes:e,setAttributes:t}){const[n,r]=(0,tt.useState)(!e.feedURL),{blockLayout:o,columns:a,displayAuthor:i,displayDate:s,displayExcerpt:l,excerptLength:c,feedURL:u,itemsToShow:d}=e;function p(n){return()=>{const r=e[n];t({[n]:!r})}}const m=VR();if(n)return(0,tt.createElement)("div",m,(0,tt.createElement)(yH,{icon:r5,label:"RSS"},(0,tt.createElement)("form",{onSubmit:function(e){e.preventDefault(),u&&r(!1)},className:"wp-block-rss__placeholder-form"},(0,tt.createElement)(LA,{placeholder:er("Enter URL here…"),value:u,onChange:e=>t({feedURL:e}),className:"wp-block-rss__placeholder-input"}),(0,tt.createElement)(wf,{variant:"primary",type:"submit"},er("Use URL")))));const h=[{icon:Qq,title:er("Edit RSS URL"),onClick:()=>r(!0)},{icon:Y3,title:er("List view"),onClick:()=>t({blockLayout:"list"}),isActive:"list"===o},{icon:MH,title:er("Grid view"),onClick:()=>t({blockLayout:"grid"}),isActive:"grid"===o}];return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,null,(0,tt.createElement)(eb,{controls:h})),(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("RSS settings")},(0,tt.createElement)(rT,{label:er("Number of items"),value:d,onChange:e=>t({itemsToShow:e}),min:1,max:10,required:!0}),(0,tt.createElement)(KN,{label:er("Display author"),checked:i,onChange:p("displayAuthor")}),(0,tt.createElement)(KN,{label:er("Display date"),checked:s,onChange:p("displayDate")}),(0,tt.createElement)(KN,{label:er("Display excerpt"),checked:l,onChange:p("displayExcerpt")}),l&&(0,tt.createElement)(rT,{label:er("Max number of words in excerpt"),value:c,onChange:e=>t({excerptLength:e}),min:10,max:100,required:!0}),"grid"===o&&(0,tt.createElement)(rT,{label:er("Columns"),value:a,onChange:e=>t({columns:e}),min:2,max:6,required:!0}))),(0,tt.createElement)("div",m,(0,tt.createElement)(jP,null,(0,tt.createElement)(WZ,{block:"core/rss",attributes:e}))))}},s5=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(po,{x:"7",y:"10",width:"10",height:"4",rx:"1",fill:"currentColor"})),l5=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(po,{x:"4.75",y:"15.25",width:"6.5",height:"9.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,tt.createElement)(po,{x:"16",y:"10",width:"4",height:"4",rx:"1",fill:"currentColor"})),c5=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(po,{x:"4.75",y:"15.25",width:"6.5",height:"14.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,tt.createElement)(po,{x:"14",y:"10",width:"4",height:"4",rx:"1",fill:"currentColor"})),u5=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(po,{x:"4.75",y:"15.25",width:"6.5",height:"14.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",fill:"none",strokeWidth:"1.5"})),d5=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(po,{x:"4.75",y:"7.75",width:"14.5",height:"8.5",rx:"1.25",stroke:"currentColor",fill:"none",strokeWidth:"1.5"}),(0,tt.createElement)(po,{x:"8",y:"11",width:"8",height:"2",fill:"currentColor"})),p5=(0,tt.createElement)(mo,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,tt.createElement)(po,{x:"4.75",y:"17.25",width:"5.5",height:"14.5",transform:"rotate(-90 4.75 17.25)",stroke:"currentColor",fill:"none",strokeWidth:"1.5"}),(0,tt.createElement)(po,{x:"4",y:"7",width:"10",height:"2",fill:"currentColor"}));const m5=[{name:"default",isDefault:!0,attributes:{buttonText:er("Search"),label:er("Search")}}],h5={apiVersion:2,name:"core/search",title:"Search",category:"widgets",description:"Help visitors find your content.",keywords:["find"],textdomain:"default",attributes:{label:{type:"string",__experimentalRole:"content"},showLabel:{type:"boolean",default:!0},placeholder:{type:"string",default:"",__experimentalRole:"content"},width:{type:"number"},widthUnit:{type:"string"},buttonText:{type:"string",__experimentalRole:"content"},buttonPosition:{type:"string",default:"button-outside"},buttonUseIcon:{type:"boolean",default:!1}},supports:{align:["left","center","right"],color:{gradients:!0,__experimentalSkipSerialization:!0},__experimentalBorder:{color:!0,radius:!0,__experimentalSkipSerialization:!0},html:!1},editorStyle:"wp-block-search-editor",style:"wp-block-search"},{name:f5}=h5,g5={icon:bP,example:{},variations:m5,edit:function({className:e,attributes:t,setAttributes:n,toggleSelection:r,isSelected:o}){var a,i;const{label:s,showLabel:l,placeholder:c,width:u,widthUnit:d,align:p,buttonText:m,buttonPosition:h,buttonUseIcon:f,style:g}=t,b=null==g||null===(a=g.border)||void 0===a?void 0:a.radius,y=null==g||null===(i=g.border)||void 0===i?void 0:i.color,v=rD(t);"number"==typeof b&&(v.style.borderRadius=`${b}px`);const _=iD(t),M=`wp-block-search__width-${Zk(Bj)}`,k="button-inside"===h,w="button-outside"===h,E="no-button"===h,L="button-only"===h,A=Lk({availableUnits:["%","px"],defaultValues:{"%":50,px:350}}),S=[{role:"menuitemradio",title:er("Button outside"),isActive:"button-outside"===h,icon:l5,onClick:()=>{n({buttonPosition:"button-outside"})}},{role:"menuitemradio",title:er("Button inside"),isActive:"button-inside"===h,icon:c5,onClick:()=>{n({buttonPosition:"button-inside"})}},{role:"menuitemradio",title:er("No button"),isActive:"no-button"===h,icon:u5,onClick:()=>{n({buttonPosition:"no-button"})}}],C=()=>{const e=so()("wp-block-search__input",k?void 0:v.className),t=k?{borderRadius:b}:v.style;return(0,tt.createElement)("input",{className:e,style:t,"aria-label":er("Optional placeholder text"),placeholder:c?void 0:er("Optional placeholder…"),value:c,onChange:e=>n({placeholder:e.target.value})})},T=()=>{const e=so()("wp-block-search__button",_.className,k?void 0:v.className),t={..._.style,...k?{borderRadius:b}:v.style};return(0,tt.createElement)(tt.Fragment,null,f&&(0,tt.createElement)(wf,{icon:bP,className:e,style:t}),!f&&(0,tt.createElement)(Cj,{className:e,style:t,"aria-label":er("Button text"),placeholder:er("Add button text…"),withoutInteractiveFormatting:!0,value:m,onChange:e=>n({buttonText:e})}))},x=(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(lk,null,(0,tt.createElement)(eb,null,(0,tt.createElement)(qg,{title:er("Toggle search label"),icon:p5,onClick:()=>{n({showLabel:!l})},className:l?"is-pressed":void 0}),(0,tt.createElement)(ck,{icon:(()=>{switch(h){case"button-inside":return c5;case"button-outside":return l5;case"no-button":return u5;case"button-only":return s5}})(),label:er("Change button position"),controls:S}),!E&&(0,tt.createElement)(qg,{title:er("Use button with icon"),icon:d5,onClick:()=>{n({buttonUseIcon:!f})},className:f?"is-pressed":void 0}))),(0,tt.createElement)(FA,null,(0,tt.createElement)(BA,{title:er("Display Settings")},(0,tt.createElement)(EA,{label:er("Width"),id:M},(0,tt.createElement)(Bj,{id:M,min:"220px",onChange:e=>{const t="%"===d&&parseInt(e,10)>100?100:e;n({width:parseInt(t,10)})},onUnitChange:e=>{n({width:"%"===e?50:350,widthUnit:e})},style:{maxWidth:80},value:`${u}${d}`,unit:d,units:A}),(0,tt.createElement)(GA,{className:"wp-block-search__components-button-group","aria-label":er("Percentage Width")},[25,50,75,100].map((e=>(0,tt.createElement)(wf,{key:e,isSmall:!0,variant:`${e}%`==`${u}${d}`?0:void 0,onClick:()=>n({width:e,widthUnit:"%"})},e,"%")))))))),z=e=>e?`calc(${e} + 4px)`:void 0,O=VR({className:so()(e,k?void 0:v.className,k?"wp-block-search__button-inside":void 0,w?"wp-block-search__button-outside":void 0,E?"wp-block-search__no-button":void 0,L?"wp-block-search__button-only":void 0,f||E?void 0:"wp-block-search__text-button",f&&!E?"wp-block-search__icon-button":void 0)});return(0,tt.createElement)("div",O,x,l&&(0,tt.createElement)(Cj,{className:"wp-block-search__label","aria-label":er("Label text"),placeholder:er("Add label…"),withoutInteractiveFormatting:!0,value:s,onChange:e=>n({label:e})}),(0,tt.createElement)(LG,{size:{width:`${u}${d}`},className:so()("wp-block-search__inside-wrapper",k?v.className:void 0),style:(()=>{const e={borderColor:y},t=0!==parseInt(b,10);if(k&&t){if("object"==typeof b){const{topLeft:t,topRight:n,bottomLeft:r,bottomRight:o}=b;return{borderTopLeftRadius:z(t),borderTopRightRadius:z(n),borderBottomLeftRadius:z(r),borderBottomRightRadius:z(o),...e}}const t=Number.isInteger(b)?`${b}px`:b;e.borderRadius=`calc(${t} + 4px)`}return e})(),minWidth:220,enable:L?{}:{right:"right"!==p,left:"right"===p},onResizeStart:(e,t,o)=>{n({width:parseInt(o.offsetWidth,10),widthUnit:"px"}),r(!1)},onResizeStop:(e,t,o,a)=>{n({width:parseInt(u+a.width,10)}),r(!0)},showHandle:o},(k||w)&&(0,tt.createElement)(tt.Fragment,null,C(),T()),L&&T(),E&&C()))}},b5=(0,tt.createElement)(mo,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,tt.createElement)(uo,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"})),y5=e=>{if(e.tagName||(e={...e,tagName:"div"}),!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};return e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),{...(0,at.omit)(e,["customTextColor","customBackgroundColor"]),style:t}},v5=[{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:"string"}},supports:{align:["wide","full"],anchor:!0,color:{gradients:!0,link:!0},spacing:{padding:!0},__experimentalBorder:{radius:!0}},save({attributes:e}){const{tagName:t}=e;return(0,tt.createElement)(t,VR.save(),(0,tt.createElement)("div",{className:"wp-block-group__inner-container"},(0,tt.createElement)(JH.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:y5,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,textColor:r,customTextColor:o}=e,a=mC("background-color",t),i=mC("color",r),s=so()(a,i,{"has-text-color":r||o,"has-background":t||n}),l={backgroundColor:a?void 0:n,color:i?void 0:o};return(0,tt.createElement)("div",{className:s,style:l},(0,tt.createElement)("div",{className:"wp-block-group__inner-container"},(0,tt.createElement)(JH.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},migrate:y5,supports:{align:["wide","full"],anchor:!0,html:!1},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,textColor:r,customTextColor:o}=e,a=mC("background-color",t),i=mC("color",r),s=so()(a,{"has-text-color":r||o,"has-background":t||n}),l={backgroundColor:a?void 0:n,color:i?void 0:o};return(0,tt.createElement)("div",{className:s,style:l},(0,tt.createElement)("div",{className:"wp-block-group__inner-container"},(0,tt.createElement)(JH.Content,null)))}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:y5,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n}=e,r=mC("background-color",t),o=so()(r,{"has-background":t||n}),a={backgroundColor:r?void 0:n};return(0,tt.createElement)("div",{className:o,style:a},(0,tt.createElement)(JH.Content,null))}}];const _5=function({attributes:e,setAttributes:t,clientId:n}){const{hasInnerBlocks:r,themeSupportsLayout:o}=Cl((e=>{var t;const{getBlock:r,getSettings:o}=e(nk),a=r(n);return{hasInnerBlocks:!(!a||!a.innerBlocks.length),themeSupportsLayout:null===(t=o())||void 0===t?void 0:t.supportsLayout}}),[n]),a=JL("layout")||{},{tagName:i="div",templateLock:s,layout:l={}}=e,c=l&&l.inherit?a:l,u=VR(),d=GH(o?u:{className:"wp-block-group__inner-container"},{templateLock:s,renderAppender:r?void 0:JH.ButtonBlockAppender,__experimentalLayout:o?c:void 0});return(0,tt.createElement)(tt.Fragment,null,(0,tt.createElement)(YA,null,(0,tt.createElement)(KS,{label:er("HTML element"),options:[{label:er("Default (
    )"),value:"div"},{label:"
    ",value:"header"},{label:"
    ",value:"main"},{label:"
    ",value:"section"},{label:"
    ",value:"article"},{label:"