Version Description
Download this release
Release Info
Developer | zieladam |
Plugin | Gutenberg |
Version | 9.1.1 |
Comparing to | |
See all releases |
Code changes from version 9.1.0 to 9.1.1
- build/block-editor/index.asset.php +1 -1
- build/block-editor/index.js +4 -4
- build/edit-post/index.asset.php +1 -1
- build/edit-site/index.asset.php +1 -1
- build/edit-widgets/blocks/legacy-widget.php +100 -0
- build/edit-widgets/blocks/legacy-widget/block.json +25 -0
- build/edit-widgets/index.asset.php +1 -1
- build/edit-widgets/index.js +4 -4
- changelog.txt +10 -0
- gutenberg.php +3 -3
- lib/class-wp-rest-widget-utils-controller.php +2 -1
- readme.txt +3 -2
build/block-editor/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '453327616318b3d4c6ae91099faa7134');
|
build/block-editor/index.js
CHANGED
@@ -31,15 +31,15 @@ Object(h._n)("%d result found.","%d results found.",O.length),O.length);c(e)}),[
|
|
31 |
/* translators: %s: block pattern title. */
|
32 |
Object(h.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function zl(e){var t=e.pattern,n=e.onClick,r=t.content,o=t.viewportWidth,i=Object(d.useMemo)((function(){return Object(c.parse)(r)}),[r]),a=Object(m.useInstanceId)(zl),l="block-editor-block-patterns-list__item-description-".concat(a);return Object(d.createElement)("div",{className:"block-editor-block-patterns-list__item",role:"button",onClick:function(){return n(t,i)},onKeyDown:function(e){mt.ENTER!==e.keyCode&&mt.SPACE!==e.keyCode||n(t,i)},tabIndex:0,"aria-label":t.title,"aria-describedby":t.description?l:void 0},Object(d.createElement)(yl,{blocks:i,viewportWidth:o}),Object(d.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},t.title),!!t.description&&Object(d.createElement)(j.VisuallyHidden,{id:l},t.description))}function Ul(){return Object(d.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Gl=function(e){var t=e.blockPatterns,n=e.shownPatterns,r=e.onClickPattern;return t.map((function(e){return n.includes(e)?Object(d.createElement)(zl,{key:e.name,pattern:e,onClick:r}):Object(d.createElement)(Ul,{key:e.name})}))};function Wl(e){var t=e.filterValue,n=e.onInsert,r=Hl(n),o=Object(ae.a)(r,3),c=o[0],i=o[2],a=Object(d.useMemo)((function(){return Zn(c,t)}),[t,c]),l=Object(m.useAsyncList)(a);if(t)return a.length?Object(d.createElement)(Al,{title:Object(h.__)("Search Results")},Object(d.createElement)(Gl,{shownPatterns:l,blockPatterns:a,onClickPattern:i})):Object(d.createElement)(Ml,null)}function Kl(e){var t=e.onInsert,n=e.selectedCategory,r=e.onClickCategory,o=Hl(t),c=Object(ae.a)(o,3),i=c[0],a=c[1],l=c[2],s=Object(d.useMemo)((function(){return a.filter((function(e){return i.some((function(t){return t.categories.includes(e.name)}))}))}),[i,a]),u=n||s[0];Object(d.useEffect)((function(){i.some((function(e){return f(e)===1/0}))&&!s.find((function(e){return"uncategorized"===e.name}))&&s.push({name:"uncategorized",label:Object(h._x)("Uncategorized")})}),[s,i]);var f=Object(d.useCallback)((function(e){if(!e.categories||!e.categories.length)return 1/0;var t=Object(p.fromPairs)(s.map((function(e,t){return[e.name,t]})));return Math.min.apply(Math,ie(e.categories.map((function(e){return void 0!==t[e]?t[e]:1/0}))))}),[s]),b=Object(d.useMemo)((function(){return i.filter((function(e){return"uncategorized"===u.name?f(e)===1/0:e.categories&&e.categories.includes(u.name)}))}),[i,u]),v=Object(d.useMemo)((function(){return b.sort((function(e,t){return f(e)-f(t)}))}),[b,f]),g=Object(m.useAsyncList)(v);return Object(d.createElement)(d.Fragment,null,!!b.length&&Object(d.createElement)(Vl,{key:u.name,title:u.title,selectedCategory:u,patternCategories:s,onClickCategory:r},Object(d.createElement)(Gl,{shownPatterns:g,blockPatterns:b,onClickPattern:l})))}var ql=function(e){var t=e.onInsert,n=e.onClickCategory,r=e.filterValue,o=e.selectedCategory;return r?Object(d.createElement)(Wl,{onInsert:t,filterValue:r}):Object(d.createElement)(Kl,{selectedCategory:o,onInsert:t,onClickCategory:n})},$l=n(18);function Yl(e){var t=e.debouncedSpeak,n=e.filterValue,r=e.onHover,o=e.onInsert,c=e.rootClientId,i=er(c,o),a=Object(ae.a)(i,4),l=a[0],s=a[1],u=a[2],f=a[3],b=Object(d.useMemo)((function(){var e=l.filter((function(e){return"reusable"===e.category}));return n?Qn(e,s,u,n):e}),[n,l,s,u]);return Object(d.useEffect)((function(){var e=Object(h.sprintf)(
|
33 |
/* translators: %d: number of results. */
|
34 |
-
Object(h._n)("%d result found.","%d results found.",b.length),b.length);t(e)}),[n,t]),0===b.length?Object(d.createElement)(Ml,null):Object(d.createElement)(Al,{title:n?Object(h.__)("Search Results"):Object(h.__)("Reusable blocks")},Object(d.createElement)(xl,{items:b,onSelect:f,onHover:r,label:n?Object(h.__)("Search Results"):Object(h.__)("Reusable blocks")}))}var Xl=Object(j.withSpokenMessages)((function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.filterValue,c=e.debouncedSpeak;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(Yl,{debouncedSpeak:c,filterValue:o,onHover:r,onInsert:n,rootClientId:t}),Object(d.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(d.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object($l.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(h.__)("Manage all reusable blocks"))))}));function Ql(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Zl=function(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,i=e.selectBlockOnInsert,a=Object(g.useSelect)((function(e){var t,c=e("core/block-editor"),i=c.getSettings,a=c.getBlockRootClientId,l=c.getBlockSelectionEnd,s=n;if(!s&&!r&&!o){var d=l();d&&(s=a(d))}return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ql(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ql(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({hasPatterns:!!(null===(t=i().__experimentalBlockPatterns)||void 0===t?void 0:t.length),destinationRootClientId:s},Object(p.pick)(e("core/block-editor"),["getSelectedBlock","getBlockIndex","getBlockSelectionEnd","getBlockOrder"]))}),[o,r,n]),l
|
35 |
// translators: %d: the name of the block that has been added
|
36 |
-
var a=Object(h._n)("%d block added.","%d blocks added.",e.length);Object(Ge.speak)(a)}t&&t()},function(e){if(e){var t=
|
37 |
/* translators: Blocks tab title in the block inserter. */
|
38 |
title:Object(h.__)("Blocks")},es={name:"patterns",
|
39 |
/* translators: Patterns tab title in the block inserter. */
|
40 |
title:Object(h.__)("Patterns")},ts={name:"reusable",
|
41 |
/* translators: Reusable blocks tab title in the block inserter. */
|
42 |
-
title:Object(h.__)("Reusable")};var ns=function(e){var t=e.children,n=e.showPatterns,r=void 0!==n&&n,o=e.showReusableBlocks,c=void 0!==o&&o,i=e.onSelect,a=[Jl];return r&&a.push(es),c&&a.push(ts),Object(d.createElement)(j.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)},rs=function(e){return e.stopPropagation()};var os=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.__experimentalSelectBlockOnInsert,c=e.
|
43 |
/* translators: %d: number of results. */
|
44 |
Object(h._n)("%d result found.","%d results found.",e),e);i(t)}}),[s,i]),Object(d.createElement)("div",{className:b()("block-editor-inserter__quick-inserter",{"has-search":T,"has-expand":R}),onKeyPress:is,onKeyDown:cs},T&&Object(d.createElement)(_o,{value:s,onChange:function(e){u(e)},placeholder:Object(h.__)("Search for a block")}),Object(d.createElement)(as,{blockTypes:N,blockPatterns:P?D:[],onSelectBlockPattern:x,onSelectBlockType:S,onHover:O}),R&&Object(d.createElement)(j.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){M(A),setTimeout((function(){R(!0)}))},"aria-label":Object(h.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(h.__)("Browse all")))}));function ss(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rn(e);if(t){var o=rn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return nn(this,n)}}var us=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,i=e.hasSingleBlockType,a=e.toggleProps,l=void 0===a?{}:a;t=i?Object(h.sprintf)(// translators: %s: the name of the block when there is only one
|
45 |
Object(h._x)("Add %s","directly add the only allowed block"),c):Object(h._x)("Add block","Generic label for block inserter button");var u=l.onClick,f=Object(Ce.a)(l,["onClick"]);return Object(d.createElement)(j.Button,Object(s.a)({icon:go.a,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),u&&u(e)},className:"block-editor-inserter__toggle","aria-haspopup":!i&&"true","aria-expanded":!i&&o,disabled:r},f))},ds=function(e){en(n,e);var t=ss(n);function n(){var e;return Yt(this,n),(e=t.apply(this,arguments)).onToggle=e.onToggle.bind(Zt(e)),e.renderToggle=e.renderToggle.bind(Zt(e)),e.renderContent=e.renderContent.bind(Zt(e)),e}return Qt(n,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,r=this.props,o=r.disabled,c=r.blockTitle,i=r.hasSingleBlockType,a=r.toggleProps,l=r.hasItems,s=r.renderToggle,u=void 0===s?us:s;return u({onToggle:t,isOpen:n,disabled:o||!l,blockTitle:c,hasSingleBlockType:i,toggleProps:a})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,r=n.rootClientId,o=n.clientId,c=n.isAppender,i=n.showInserterHelpPanel,a=n.__experimentalSelectBlockOnInsert;return n.__experimentalIsQuick?Object(d.createElement)(ls,{onSelect:t,rootClientId:r,clientId:o,isAppender:c,selectBlockOnInsert:a}):Object(d.createElement)(os,{onSelect:t,rootClientId:r,clientId:o,isAppender:c,showInserterHelpPanel:i,__experimentalSelectBlockOnInsert:a})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.hasSingleBlockType,r=e.insertOnlyAllowedBlock,o=e.__experimentalIsQuick;return n?this.renderToggle({onToggle:r}):Object(d.createElement)(j.Dropdown,{className:"block-editor-inserter",contentClassName:b()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(h.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),n}(d.Component),fs=Object(m.compose)([Object(g.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),c=o.getBlockRootClientId,i=o.hasInserterItems,a=o.__experimentalGetAllowedBlocks,l=e("core/blocks").getBlockVariations,s=a(r=r||c(n)||void 0),u=1===Object(p.size)(s)&&0===Object(p.size)(l(s[0].name,"inserter")),d=!1;return u&&(d=s[0]),{hasItems:i(r),hasSingleBlockType:u,blockTitle:d?d.title:"",allowedBlockType:d,rootClientId:r}})),Object(g.withDispatch)((function(e,t,n){var r=n.select;return{insertOnlyAllowedBlock:function(){var n=t.rootClientId,o=t.clientId,i=t.isAppender,a=t.hasSingleBlockType,l=t.allowedBlockType,s=t.__experimentalSelectBlockOnInsert;if(a&&((0,e("core/block-editor").insertBlock)(Object(c.createBlock)(l.name),function(){var e=r("core/block-editor"),t=e.getBlockIndex,c=e.getBlockSelectionEnd,a=e.getBlockOrder;if(o)return t(o,n);var l=c();return!i&&l?t(l,n)+1:a(n).length}(),n,s),!s)){var u=Object(h.sprintf)(// translators: %s: the name of the block that has been added
|
@@ -80,4 +80,4 @@ children:Object(h.__)("Preview")};return Object(d.createElement)(j.DropdownMenu,
|
|
80 |
/* translators: %d: number of blocks */
|
81 |
Object(h._n)("%d block","%d blocks",t.length),t.length)),Object(d.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(h.sprintf)(
|
82 |
/* translators: %d: number of words */
|
83 |
-
Object(h._n)("%d word","%d words",n),n))))}));function yb(e){var t=e.blockName,n=Object(g.useSelect)((function(e){var n=e("core/block-editor").getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:Object(p.get)(n,["value",t]),onUpdatePreferredStyleVariations:Object(p.get)(n,["onChange"],null),styles:e("core/blocks").getBlockStyles(t)}}),[t]),r=n.preferredStyle,o=n.onUpdatePreferredStyleVariations,c=n.styles,i=Object(d.useMemo)((function(){return[{label:Object(h.__)("Not set"),value:""}].concat(ie(c.map((function(e){return{label:e.label,value:e.name}}))))}),[c]),a=Object(d.useCallback)((function(e){o(t,e)}),[t,o]);return o&&Object(d.createElement)(j.SelectControl,{options:i,value:r||"",label:Object(h.__)("Default Style"),onChange:a})}var _b=function(e){var t=e.slotName,n=e.bubblesVirtually,r=Object(j.__experimentalUseSlot)(t);return Boolean(r.fills&&r.fills.length)?Object(d.createElement)(j.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(h.__)("Advanced"),initialOpen:!1},Object(d.createElement)($.Slot,{bubblesVirtually:n})):null},Eb=Object(g.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getSelectedBlockCount,o=t.getBlockName,i=e("core/blocks").getBlockStyles,a=n(),l=a&&o(a),s=a&&Object(c.getBlockType)(l),u=a&&i(l);return{count:r(),hasBlockStyles:u&&u.length>0,selectedBlockName:l,selectedBlockClientId:a,blockType:s}}))((function(e){var t=e.blockType,n=e.count,r=e.hasBlockStyles,o=e.selectedBlockClientId,i=e.selectedBlockName,a=e.showNoBlockSelectedMessage,l=void 0===a||a,s=e.bubblesVirtually,u=void 0===s||s;if(n>1)return Object(d.createElement)("div",{className:"block-editor-block-inspector"},Object(d.createElement)(kb,null),Object(d.createElement)(Ze.Slot,{bubblesVirtually:u}));var f=i===Object(c.getUnregisteredTypeHandlerName)();return t&&o&&!f?Object(d.createElement)("div",{className:"block-editor-block-inspector"},Object(d.createElement)(Eo,{blockType:t}),r&&Object(d.createElement)("div",null,Object(d.createElement)(j.PanelBody,{title:Object(h.__)("Styles")},Object(d.createElement)(Rs,{clientId:o}),Object(c.hasBlockSupport)(t.name,"defaultStylePicker",!0)&&Object(d.createElement)(yb,{blockName:t.name}))),Object(d.createElement)(Ze.Slot,{bubblesVirtually:u}),Object(d.createElement)("div",null,Object(d.createElement)(_b,{slotName:$.slotName,bubblesVirtually:u})),Object(d.createElement)(hb,{key:"back"})):l?Object(d.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(h.__)("No block selected.")):null}));function Cb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rn(e);if(t){var o=rn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return nn(this,n)}}var Sb=function(e){en(n,e);var t=Cb(n);function n(){var e;return Yt(this,n),(e=t.apply(this,arguments)).bindContainer=e.bindContainer.bind(Zt(e)),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Zt(e)),e}return Qt(n,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearSelectionIfFocusTarget",value:function(e){var t=this.props,n=t.hasSelectedBlock,r=t.hasMultiSelection,o=t.clearSelectedBlock,c=n||r;e.target===this.container&&c&&o()}},{key:"render",value:function(){return Object(d.createElement)("div",Object(s.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(p.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),n}(d.Component),wb=Object(m.compose)([Object(g.withSelect)((function(e){var t=e("core/block-editor"),n=t.hasSelectedBlock,r=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:r()}})),Object(g.withDispatch)((function(e){return{clearSelectedBlock:e("core/block-editor").clearSelectedBlock}}))])(Sb),Ib=n(269),Bb=n.n(Ib),xb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Pb=function(e,t){t=t||{};var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function c(){var e={line:n,column:r};return function(t){return t.position=new i(e),b(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;var a=[];function l(o){var c=new Error(t.source+":"+n+":"+r+": "+o);if(c.reason=o,c.filename=t.source,c.line=n,c.column=r,c.source=e,!t.silent)throw c;a.push(c)}function s(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var t,n=[];for(b(),p(n);e.length&&"}"!==e.charAt(0)&&(t=C()||S());)!1!==t&&(n.push(t),p(n));return n}function f(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function b(){f(/^\s*/)}function p(e){var t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){var t=c();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return l("End of comment missing");var i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function v(){var e=f(/^([^{]+)/);if(e)return Tb(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 g(){var e=c(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=Tb(t[0]),!f(/^:\s*/))return l("property missing ':'");var n=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(xb,""),value:n?Tb(n[0]).replace(xb,""):""});return f(/^[;\s]*/),r}}function O(){var e,t=[];if(!s())return l("missing '{'");for(p(t);e=g();)!1!==e&&(t.push(e),p(t));return u()?t:l("missing '}'")}function h(){for(var e,t=[],n=c();e=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),f(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:O()})}var j,k=E("import"),y=E("charset"),_=E("namespace");function E(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=c(),r=f(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function C(){if("@"===e[0])return function(){var e=c(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=f(/^([-\w]+)\s*/)))return l("@keyframes missing name");var r,o=t[1];if(!s())return l("@keyframes missing '{'");for(var i=p();r=h();)i.push(r),i=i.concat(p());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):l("@keyframes missing '}'")}}()||function(){var e=c(),t=f(/^@media *([^{]+)/);if(t){var n=Tb(t[1]);if(!s())return l("@media missing '{'");var r=p().concat(d());return u()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}}()||function(){var e=c(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Tb(t[1]),media:Tb(t[2])})}()||function(){var e=c(),t=f(/^@supports *([^{]+)/);if(t){var n=Tb(t[1]);if(!s())return l("@supports missing '{'");var r=p().concat(d());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||k()||y()||_()||function(){var e=c(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var n=Tb(t[1]),r=Tb(t[2]);if(!s())return l("@document missing '{'");var o=p().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):l("@document missing '}'")}}()||function(){var e=c();if(f(/^@page */)){var t=v()||[];if(!s())return l("@page missing '{'");for(var n,r=p();n=g();)r.push(n),r=r.concat(p());return u()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}}()||function(){var e=c();if(f(/^@host\s*/)){if(!s())return l("@host missing '{'");var t=p().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=c();if(f(/^@font-face\s*/)){if(!s())return l("@font-face missing '{'");for(var t,n=p();t=g();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}function S(){var e=c(),t=v();return t?(p(),e({type:"rule",selectors:t,declarations:O()})):l("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type,o=r?t:n;for(var c in t){var i=t[c];Array.isArray(i)?i.forEach((function(t){e(t,o)})):i&&"object"===tn(i)&&e(i,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((j=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:j,parsingErrors:a}}))};function Tb(e){return e?e.replace(/^\s+|\s+$/g,""):""}var Nb=n(172),Db=n.n(Nb),Rb=Ab;function Ab(e){this.options=e||{}}Ab.prototype.emit=function(e){return e},Ab.prototype.visit=function(e){return this[e.type](e)},Ab.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n};var Mb=Lb;function Lb(e){Rb.call(this,e)}Db()(Lb,Rb),Lb.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Lb.prototype.comment=function(e){return this.emit("",e.position)},Lb.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Lb.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Lb.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Lb.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Lb.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Lb.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Lb.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Lb.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Lb.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Lb.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Lb.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Lb.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Lb.prototype.rule=function(e){var t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Lb.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Fb=Vb;function Vb(e){e=e||{},Rb.call(this,e),this.indentation=e.indent}Db()(Vb,Rb),Vb.prototype.compile=function(e){return this.stylesheet(e)},Vb.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Vb.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Vb.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Vb.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Vb.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Vb.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Vb.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Vb.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Vb.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Vb.prototype.keyframe=function(e){var t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Vb.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Vb.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Vb.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Vb.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Vb.prototype.rule=function(e){var t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Vb.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Vb.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var Hb=function(e,t){try{var n=Pb(e),r=Bb.a.map(n,(function(e){if(!e)return e;var n=t(e);return this.update(n)}));return o=r,((c=c||{}).compress?new Mb(c):new Fb(c)).compile(o)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var o,c};function zb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ub(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zb(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gb(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function Wb(e,t){return new URL(e,t).toString()}var Kb=function(e){return function(t){if("declaration"===t.type){var n=function(e){for(var t,n=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g,r=[];null!==(t=n.exec(e));){var o={source:t[0],before:t[1],quote:t[2],value:t[3],after:t[4]};Gb(o)&&r.push(o)}return r}(t.value).map((c=e,function(e){return Ub(Ub({},e),{},{newUrl:"url("+e.before+e.quote+Wb(e.value,c)+e.quote+e.after+")"})}));return Ub(Ub({},t),{},{value:(r=t.value,o=n,o.forEach((function(e){r=r.replace(e.source,e.newUrl)})),r)})}var r,o,c;return t}};function qb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qb(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yb=/^(body|html|:root).*$/,Xb=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?$b($b({},n),{},{selectors:n.selectors.map((function(n){return t.includes(n.trim())?n:n.match(Yb)?n.replace(/^(body|html|:root)/,e):e+" "+n}))}):n}},Qb=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(p.map)(e,(function(e){var n=e.css,r=e.baseURL,o=[];return t&&o.push(Xb(t)),r&&o.push(Kb(r)),o.length?Hb(n,Object(m.compose)(o)):n}))};var Zb=function(e){var t=e.styles;return Object(d.useEffect)((function(){var e=Qb(t,".editor-styles-wrapper"),n=Object(p.map)(Object(p.compact)(e),(function(e){var t=document.createElement("style");return t.innerHTML=e,document.body.appendChild(t),t}));return function(){return n.forEach((function(e){return document.body.removeChild(e)}))}}),[t]),null};var Jb=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.showInserterHelpPanel,c=e.showMostUsedBlocks,i=void 0!==c&&c,a=e.__experimentalSelectBlockOnInsert,l=e.onSelect,s=void 0===l?p.noop:l,u=Object(g.useSelect)((function(e){var r=e("core/block-editor").getBlockRootClientId;return t||r(n)||void 0}),[n,t]);return Object(d.createElement)(os,{onSelect:s,rootClientId:u,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalSelectBlockOnInsert:a})};function ep(){var e=Object(g.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientIds,r=t.getBlockOrder,o=t.getBlockRootClientId,c=n(),i=Object(ae.a)(c,1)[0];return{clientIds:c,rootBlocksClientIds:r(),rootClientId:o(i)}}),[]),t=e.clientIds,n=e.rootBlocksClientIds,r=e.rootClientId,o=Object(g.useDispatch)("core/block-editor"),c=o.duplicateBlocks,i=o.removeBlocks,a=o.insertAfterBlock,s=o.insertBeforeBlock,u=o.multiSelect,f=o.clearSelectedBlock,b=o.moveBlocksUp,m=o.moveBlocksDown;return Object(l.useShortcut)("core/block-editor/move-up",Object(d.useCallback)((function(e){e.preventDefault(),b(t,r)}),[t,b]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/move-down",Object(d.useCallback)((function(e){e.preventDefault(),m(t,r)}),[t,m]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/duplicate",Object(d.useCallback)((function(e){e.preventDefault(),c(t)}),[t,c]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/remove",Object(d.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/insert-after",Object(d.useCallback)((function(e){e.preventDefault(),a(Object(p.last)(t))}),[t,a]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/insert-before",Object(d.useCallback)((function(e){e.preventDefault(),s(Object(p.first)(t))}),[t,s]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/delete-multi-selection",Object(d.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{isDisabled:t.length<2}),Object(l.useShortcut)("core/block-editor/select-all",Object(d.useCallback)((function(e){e.preventDefault(),u(Object(p.first)(n),Object(p.last)(n))}),[n,u])),Object(l.useShortcut)("core/block-editor/unselect",Object(d.useCallback)((function(e){e.preventDefault(),f(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges()}),[t,f]),{isDisabled:t.length<2}),null}ep.Register=function(){var e=Object(g.useDispatch)("core/keyboard-shortcuts").registerShortcut;return Object(d.useEffect)((function(){e({name:"core/block-editor/duplicate",category:"block",description:Object(h.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(h.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(h.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:Object(h.__)("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:Object(h.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(h.__)("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:Object(h.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(h.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(h.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(h.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var tp=ep;function np(){var e=Object(g.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockSelectionEnd,r=t.hasMultiSelection,o=t.isMultiSelecting;return{selectionEnd:n(),isMultiSelection:r(),isMultiSelecting:o()}}),[]),t=e.isMultiSelection,n=e.selectionEnd,r=e.isMultiSelecting;return Object(d.useEffect)((function(){if(n&&!r&&t){var e=Je(n);if(e){var o=Object(Tr.getScrollContainer)(e);o&&cf()(e,o,{onlyScrollIfNeeded:!0})}}}),[t,n,r]),null}var rp=[mt.UP,mt.RIGHT,mt.DOWN,mt.LEFT,mt.ENTER,mt.BACKSPACE];var op=Object(m.withSafeTimeout)((function(e){var t=e.children,n=e.setTimeout,r=Object(d.useRef)(),o=Object(d.useRef)(),c=Object(g.useSelect)((function(e){return e("core/block-editor").isTyping()})),i=Object(g.useDispatch)("core/block-editor"),a=i.startTyping,l=i.stopTyping;function s(e){var t=e?"addEventListener":"removeEventListener";r.current.ownerDocument[t]("selectionchange",f),r.current.ownerDocument[t]("mousemove",u),document[t]("mousemove",u)}function u(e){var t=e.clientX,n=e.clientY;if(o.current){var r=o.current,c=r.clientX,i=r.clientY;c===t&&i===n||l()}o.current={clientX:t,clientY:n}}function f(e){var t=e.target.defaultView.getSelection();t.rangeCount>0&&t.getRangeAt(0).collapsed||l()}function b(e){var t=e.type,n=e.target;!c&&Object(Tr.isTextField)(n)&&r.current.contains(n)&&("keydown"!==t||function(e){var t=e.keyCode;return!e.shiftKey&&rp.includes(t)}(e))&&a()}return Object(d.useEffect)((function(){return s(c),function(){return s(!1)}}),[c]),Object(d.createElement)("div",{ref:r,onFocus:function(e){var t=e.target;n((function(){c&&!Object(Tr.isTextField)(t)&&l()}))},onKeyPress:b,onKeyDown:Object(p.over)([b,function(e){!c||e.keyCode!==mt.ESCAPE&&e.keyCode!==mt.TAB||l()}])},t)}));function cp(){return bo()("PreserveScrollInReorder component",{hint:"This behavior is now built-in the block list"}),null}function ip(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rn(e);if(t){var o=rn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return nn(this,n)}}var ap=-1!==window.navigator.userAgent.indexOf("Trident"),lp=new Set([mt.UP,mt.DOWN,mt.LEFT,mt.RIGHT]),sp=function(e){en(n,e);var t=ip(n);function n(){var e;return Yt(this,n),(e=t.apply(this,arguments)).ref=Object(d.createRef)(),e.onKeyDown=e.onKeyDown.bind(Zt(e)),e.addSelectionChangeListener=e.addSelectionChangeListener.bind(Zt(e)),e.computeCaretRectOnSelectionChange=e.computeCaretRectOnSelectionChange.bind(Zt(e)),e.maintainCaretPosition=e.maintainCaretPosition.bind(Zt(e)),e.computeCaretRect=e.computeCaretRect.bind(Zt(e)),e.onScrollResize=e.onScrollResize.bind(Zt(e)),e.isSelectionEligibleForScroll=e.isSelectionEligibleForScroll.bind(Zt(e)),e.getDocument=e.getDocument.bind(Zt(e)),e.getWindow=e.getWindow.bind(Zt(e)),e}return Qt(n,[{key:"componentDidMount",value:function(){this.getWindow().addEventListener("scroll",this.onScrollResize,!0),this.getWindow().addEventListener("resize",this.onScrollResize,!0)}},{key:"componentWillUnmount",value:function(){this.getWindow().removeEventListener("scroll",this.onScrollResize,!0),this.getWindow().removeEventListener("resize",this.onScrollResize,!0),this.getDocument().removeEventListener("selectionchange",this.computeCaretRectOnSelectionChange),this.onScrollResize.rafId&&this.getWindow().cancelAnimationFrame(this.onScrollResize.rafId),this.onKeyDown.rafId&&this.getWindow().cancelAnimationFrame(this.onKeyDown.rafId)}},{key:"getDocument",value:function(){return this.ref.current.ownerDocument}},{key:"getWindow",value:function(){return this.getDocument().defaultView}},{key:"computeCaretRect",value:function(){this.isSelectionEligibleForScroll()&&(this.caretRect=Object(Tr.computeCaretRect)(this.getWindow()))}},{key:"computeCaretRectOnSelectionChange",value:function(){this.getDocument().removeEventListener("selectionchange",this.computeCaretRectOnSelectionChange),this.computeCaretRect()}},{key:"onScrollResize",value:function(){var e=this;this.onScrollResize.rafId||(this.onScrollResize.rafId=this.getWindow().requestAnimationFrame((function(){e.computeCaretRect(),delete e.onScrollResize.rafId})))}},{key:"isSelectionEligibleForScroll",value:function(){return this.props.selectedBlockClientId&&this.ref.current.contains(this.getDocument().activeElement)&&this.getDocument().activeElement.isContentEditable}},{key:"isLastEditableNode",value:function(){var e=this.ref.current.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===this.getDocument().activeElement}},{key:"maintainCaretPosition",value:function(e){var t=e.keyCode;if(this.isSelectionEligibleForScroll()){var n=Object(Tr.computeCaretRect)(this.getWindow());if(n)if(this.caretRect)if(lp.has(t))this.caretRect=n;else{var r=n.top-this.caretRect.top;if(0!==r){var o=Object(Tr.getScrollContainer)(this.ref.current);if(o){var c=o===this.getDocument().body,i=c?this.getWindow().scrollY:o.scrollTop,a=c?0:o.getBoundingClientRect().top,l=c?this.caretRect.top/this.getWindow().innerHeight:(this.caretRect.top-a)/(this.getWindow().innerHeight-a);if(0===i&&l<.75&&this.isLastEditableNode())this.caretRect=n;else{var s=c?this.getWindow().innerHeight:o.clientHeight;this.caretRect.top+this.caretRect.height>a+s||this.caretRect.top<a?this.caretRect=n:c?this.getWindow().scrollBy(0,r):o.scrollTop+=r}}}}else this.caretRect=n}}},{key:"addSelectionChangeListener",value:function(){this.getDocument().addEventListener("selectionchange",this.computeCaretRectOnSelectionChange)}},{key:"onKeyDown",value:function(e){var t=this;e.persist(),this.onKeyDown.rafId&&this.getWindow().cancelAnimationFrame(this.onKeyDown.rafId),this.onKeyDown.rafId=this.getWindow().requestAnimationFrame((function(){t.maintainCaretPosition(e),delete t.onKeyDown.rafId}))}},{key:"render",value:function(){return Object(d.createElement)("div",{ref:this.ref,onKeyDown:this.onKeyDown,onKeyUp:this.maintainCaretPosition,onMouseDown:this.addSelectionChangeListener,onTouchStart:this.addSelectionChangeListener,className:"block-editor__typewriter"},this.props.children)}}]),n}(d.Component),up=ap?function(e){return e.children}:Object(g.withSelect)((function(e){return{selectedBlockClientId:(0,e("core/block-editor").getSelectedBlockClientId)()}}))(sp);function dp(e){if(void 0===e)e=So.colors;else{var t=e.filter((function(e){return e.color}));0===t.length?e=So.colors:t.length<e.length&&(e=t)}return e}function fp(e){if(void 0===e)e=So.gradients;else{var t=e.filter((function(e){return e.gradient}));0===t.length?e=So.gradients:t.length<e.length&&(e=t)}return e}}]);
|
31 |
/* translators: %s: block pattern title. */
|
32 |
Object(h.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function zl(e){var t=e.pattern,n=e.onClick,r=t.content,o=t.viewportWidth,i=Object(d.useMemo)((function(){return Object(c.parse)(r)}),[r]),a=Object(m.useInstanceId)(zl),l="block-editor-block-patterns-list__item-description-".concat(a);return Object(d.createElement)("div",{className:"block-editor-block-patterns-list__item",role:"button",onClick:function(){return n(t,i)},onKeyDown:function(e){mt.ENTER!==e.keyCode&&mt.SPACE!==e.keyCode||n(t,i)},tabIndex:0,"aria-label":t.title,"aria-describedby":t.description?l:void 0},Object(d.createElement)(yl,{blocks:i,viewportWidth:o}),Object(d.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},t.title),!!t.description&&Object(d.createElement)(j.VisuallyHidden,{id:l},t.description))}function Ul(){return Object(d.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Gl=function(e){var t=e.blockPatterns,n=e.shownPatterns,r=e.onClickPattern;return t.map((function(e){return n.includes(e)?Object(d.createElement)(zl,{key:e.name,pattern:e,onClick:r}):Object(d.createElement)(Ul,{key:e.name})}))};function Wl(e){var t=e.filterValue,n=e.onInsert,r=Hl(n),o=Object(ae.a)(r,3),c=o[0],i=o[2],a=Object(d.useMemo)((function(){return Zn(c,t)}),[t,c]),l=Object(m.useAsyncList)(a);if(t)return a.length?Object(d.createElement)(Al,{title:Object(h.__)("Search Results")},Object(d.createElement)(Gl,{shownPatterns:l,blockPatterns:a,onClickPattern:i})):Object(d.createElement)(Ml,null)}function Kl(e){var t=e.onInsert,n=e.selectedCategory,r=e.onClickCategory,o=Hl(t),c=Object(ae.a)(o,3),i=c[0],a=c[1],l=c[2],s=Object(d.useMemo)((function(){return a.filter((function(e){return i.some((function(t){return t.categories.includes(e.name)}))}))}),[i,a]),u=n||s[0];Object(d.useEffect)((function(){i.some((function(e){return f(e)===1/0}))&&!s.find((function(e){return"uncategorized"===e.name}))&&s.push({name:"uncategorized",label:Object(h._x)("Uncategorized")})}),[s,i]);var f=Object(d.useCallback)((function(e){if(!e.categories||!e.categories.length)return 1/0;var t=Object(p.fromPairs)(s.map((function(e,t){return[e.name,t]})));return Math.min.apply(Math,ie(e.categories.map((function(e){return void 0!==t[e]?t[e]:1/0}))))}),[s]),b=Object(d.useMemo)((function(){return i.filter((function(e){return"uncategorized"===u.name?f(e)===1/0:e.categories&&e.categories.includes(u.name)}))}),[i,u]),v=Object(d.useMemo)((function(){return b.sort((function(e,t){return f(e)-f(t)}))}),[b,f]),g=Object(m.useAsyncList)(v);return Object(d.createElement)(d.Fragment,null,!!b.length&&Object(d.createElement)(Vl,{key:u.name,title:u.title,selectedCategory:u,patternCategories:s,onClickCategory:r},Object(d.createElement)(Gl,{shownPatterns:g,blockPatterns:b,onClickPattern:l})))}var ql=function(e){var t=e.onInsert,n=e.onClickCategory,r=e.filterValue,o=e.selectedCategory;return r?Object(d.createElement)(Wl,{onInsert:t,filterValue:r}):Object(d.createElement)(Kl,{selectedCategory:o,onInsert:t,onClickCategory:n})},$l=n(18);function Yl(e){var t=e.debouncedSpeak,n=e.filterValue,r=e.onHover,o=e.onInsert,c=e.rootClientId,i=er(c,o),a=Object(ae.a)(i,4),l=a[0],s=a[1],u=a[2],f=a[3],b=Object(d.useMemo)((function(){var e=l.filter((function(e){return"reusable"===e.category}));return n?Qn(e,s,u,n):e}),[n,l,s,u]);return Object(d.useEffect)((function(){var e=Object(h.sprintf)(
|
33 |
/* translators: %d: number of results. */
|
34 |
+
Object(h._n)("%d result found.","%d results found.",b.length),b.length);t(e)}),[n,t]),0===b.length?Object(d.createElement)(Ml,null):Object(d.createElement)(Al,{title:n?Object(h.__)("Search Results"):Object(h.__)("Reusable blocks")},Object(d.createElement)(xl,{items:b,onSelect:f,onHover:r,label:n?Object(h.__)("Search Results"):Object(h.__)("Reusable blocks")}))}var Xl=Object(j.withSpokenMessages)((function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.filterValue,c=e.debouncedSpeak;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(Yl,{debouncedSpeak:c,filterValue:o,onHover:r,onInsert:n,rootClientId:t}),Object(d.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(d.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object($l.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(h.__)("Manage all reusable blocks"))))}));function Ql(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Zl=function(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,i=e.selectBlockOnInsert,a=e.insertionIndex,l=Object(g.useSelect)((function(e){var t,c=e("core/block-editor"),i=c.getSettings,a=c.getBlockRootClientId,l=c.getBlockSelectionEnd,s=n;if(!s&&!r&&!o){var d=l();d&&(s=a(d))}return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ql(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ql(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({hasPatterns:!!(null===(t=i().__experimentalBlockPatterns)||void 0===t?void 0:t.length),destinationRootClientId:s},Object(p.pick)(e("core/block-editor"),["getSelectedBlock","getBlockIndex","getBlockSelectionEnd","getBlockOrder"]))}),[o,r,n]),s=l.destinationRootClientId,d=l.getSelectedBlock,f=l.getBlockIndex,b=l.getBlockSelectionEnd,m=l.getBlockOrder,v=Object(g.useDispatch)("core/block-editor"),O=v.replaceBlocks,j=v.insertBlocks,k=v.showInsertionPoint,y=v.hideInsertionPoint;function _(){if(void 0!==a)return a;if(r)return f(r,s);var e=b();return!o&&e?f(e,s)+1:m(s).length}return[s,function(e,n){var r=d();if(!o&&r&&Object(c.isUnmodifiedDefaultBlock)(r)?O(r.clientId,e,null,null,n):j(e,_(),s,i,n),!i){
|
35 |
// translators: %d: the name of the block that has been added
|
36 |
+
var a=Object(h._n)("%d block added.","%d blocks added.",e.length);Object(Ge.speak)(a)}t&&t()},function(e){if(e){var t=_();k(s,t)}else y()}]},Jl={name:"blocks",
|
37 |
/* translators: Blocks tab title in the block inserter. */
|
38 |
title:Object(h.__)("Blocks")},es={name:"patterns",
|
39 |
/* translators: Patterns tab title in the block inserter. */
|
40 |
title:Object(h.__)("Patterns")},ts={name:"reusable",
|
41 |
/* translators: Reusable blocks tab title in the block inserter. */
|
42 |
+
title:Object(h.__)("Reusable")};var ns=function(e){var t=e.children,n=e.showPatterns,r=void 0!==n&&n,o=e.showReusableBlocks,c=void 0!==o&&o,i=e.onSelect,a=[Jl];return r&&a.push(es),c&&a.push(ts),Object(d.createElement)(j.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)},rs=function(e){return e.stopPropagation()};var os=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.__experimentalSelectBlockOnInsert,c=e.__experimentalInsertionIndex,i=e.onSelect,a=e.showInserterHelpPanel,l=e.showMostUsedBlocks,s=Object(d.useState)("blocks"),u=Object(ae.a)(s,2),f=u[0],b=u[1],p=Object(d.useState)(""),m=Object(ae.a)(p,2),v=m[0],O=m[1],k=Object(d.useState)(null),y=Object(ae.a)(k,2),_=y[0],E=y[1],C=Object(d.useState)(null),S=Object(ae.a)(C,2),w=S[0],I=S[1],B=Zl({rootClientId:t,clientId:n,isAppender:r,selectBlockOnInsert:o,insertionIndex:c}),x=Object(ae.a)(B,3),P=x[0],T=x[1],N=x[2],D=Object(g.useSelect)((function(e){var t=e("core/block-editor").getSettings(),n=t.__experimentalBlockPatterns,r=t.__experimentalReusableBlocks;return{hasPatterns:!!(null==n?void 0:n.length),hasReusableBlocks:!!(null==r?void 0:r.length)}}),[]),R=D.hasPatterns,A=D.hasReusableBlocks,M=!P&&R,L=function(e){T(e),i()},F=function(e){N(!!e),E(e)},V=Object(d.createElement)(d.Fragment,null,Object(d.createElement)("div",{className:"block-editor-inserter__block-list"},Object(d.createElement)(Fl,{rootClientId:P,onInsert:L,onHover:F,filterValue:v,showMostUsedBlocks:l})),a&&Object(d.createElement)("div",{className:"block-editor-inserter__tips"},Object(d.createElement)(j.VisuallyHidden,{as:"h2"},Object(h.__)("A tip for using the block editor")),Object(d.createElement)(ho,null))),H=Object(d.createElement)(ql,{onInsert:function(e,t){T(e,{patternName:t}),i()},filterValue:v,onClickCategory:function(e){I(e)},selectedCategory:w}),z=Object(d.createElement)(Xl,{rootClientId:P,onInsert:L,onHover:F,filterValue:v});return Object(d.createElement)("div",{className:"block-editor-inserter__menu",onKeyPress:rs,onKeyDown:function(e){[mt.LEFT,mt.DOWN,mt.RIGHT,mt.UP,mt.BACKSPACE,mt.ENTER].includes(e.keyCode)&&e.stopPropagation()}},Object(d.createElement)("div",{className:"block-editor-inserter__main-area"},Object(d.createElement)("div",{className:"block-editor-inserter__content"},Object(d.createElement)(_o,{onChange:function(e){_&&E(null),O(e)},value:v,placeholder:"reusable"===f?Object(h.__)("Search for a reusable block"):"patterns"===f?Object(h.__)("Search for a pattern"):Object(h.__)("Search for a block")}),(M||A)&&Object(d.createElement)(ns,{showPatterns:M,showReusableBlocks:A,onSelect:b},(function(e){return"blocks"===e.name?V:"patterns"===e.name?H:z})),!M&&!A&&V)),a&&_&&Object(d.createElement)(Cl,{item:_}))},cs=function(e){[mt.LEFT,mt.DOWN,mt.RIGHT,mt.UP,mt.BACKSPACE,mt.ENTER].includes(e.keyCode)&&e.stopPropagation()},is=function(e){return e.stopPropagation()};function as(e){var t=e.blockTypes,n=e.blockPatterns,r=e.onSelectBlockType,o=e.onSelectBlockPattern,c=e.onHover,i=Object(d.useMemo)((function(){return Object(p.orderBy)(t,["frecency"],["desc"]).slice(0,6)}),[t]),a=Object(d.useMemo)((function(){return n.slice(0,2)}),[t]);return Object(d.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},!i.length&&!a.length&&Object(d.createElement)(Ml,null),!!i.length&&Object(d.createElement)(Al,{title:Object(d.createElement)(j.VisuallyHidden,null,Object(h.__)("Blocks"))},Object(d.createElement)(xl,{items:i,onSelect:r,onHover:c,label:Object(h.__)("Blocks")})),!!i.length&&!!a.length&&Object(d.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!a.length&&Object(d.createElement)(Al,{title:Object(d.createElement)(j.VisuallyHidden,null,Object(h.__)("Blocks"))},Object(d.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(d.createElement)(Gl,{shownPatterns:a,blockPatterns:a,onClickPattern:o}))))}var ls=Object(j.withSpokenMessages)((function(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,c=e.selectBlockOnInsert,i=e.debouncedSpeak,a=Object(d.useState)(""),l=Object(ae.a)(a,2),s=l[0],u=l[1],f=Zl({onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:c}),p=Object(ae.a)(f,3),m=p[0],v=p[1],O=p[2],k=er(m,v),y=Object(ae.a)(k,4),_=y[0],E=y[1],C=y[2],S=y[3],w=Hl(v),I=Object(ae.a)(w,3),B=I[0],x=I[2],P=!m&&B.length&&!!s,T=P&&B.length>6||_.length>6,N=Object(d.useMemo)((function(){return Qn(_,E,C,s)}),[s,_,E,C]),D=Object(d.useMemo)((function(){return Zn(B,s)}),[s,B]),R=Object(g.useSelect)((function(e){return e("core/block-editor").getSettings().__experimentalSetIsInserterOpened}),[]),A=Object(g.useSelect)((function(e){return e("core/block-editor").getPreviousBlockClientId(r)}),[r]);Object(d.useEffect)((function(){R&&R(!1)}),[R]);var M=Object(g.useDispatch)("core/block-editor").selectBlock;return Object(d.useEffect)((function(){if(s){var e=N.length+D.length,t=Object(h.sprintf)(
|
43 |
/* translators: %d: number of results. */
|
44 |
Object(h._n)("%d result found.","%d results found.",e),e);i(t)}}),[s,i]),Object(d.createElement)("div",{className:b()("block-editor-inserter__quick-inserter",{"has-search":T,"has-expand":R}),onKeyPress:is,onKeyDown:cs},T&&Object(d.createElement)(_o,{value:s,onChange:function(e){u(e)},placeholder:Object(h.__)("Search for a block")}),Object(d.createElement)(as,{blockTypes:N,blockPatterns:P?D:[],onSelectBlockPattern:x,onSelectBlockType:S,onHover:O}),R&&Object(d.createElement)(j.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){M(A),setTimeout((function(){R(!0)}))},"aria-label":Object(h.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(h.__)("Browse all")))}));function ss(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rn(e);if(t){var o=rn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return nn(this,n)}}var us=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,i=e.hasSingleBlockType,a=e.toggleProps,l=void 0===a?{}:a;t=i?Object(h.sprintf)(// translators: %s: the name of the block when there is only one
|
45 |
Object(h._x)("Add %s","directly add the only allowed block"),c):Object(h._x)("Add block","Generic label for block inserter button");var u=l.onClick,f=Object(Ce.a)(l,["onClick"]);return Object(d.createElement)(j.Button,Object(s.a)({icon:go.a,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),u&&u(e)},className:"block-editor-inserter__toggle","aria-haspopup":!i&&"true","aria-expanded":!i&&o,disabled:r},f))},ds=function(e){en(n,e);var t=ss(n);function n(){var e;return Yt(this,n),(e=t.apply(this,arguments)).onToggle=e.onToggle.bind(Zt(e)),e.renderToggle=e.renderToggle.bind(Zt(e)),e.renderContent=e.renderContent.bind(Zt(e)),e}return Qt(n,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,r=this.props,o=r.disabled,c=r.blockTitle,i=r.hasSingleBlockType,a=r.toggleProps,l=r.hasItems,s=r.renderToggle,u=void 0===s?us:s;return u({onToggle:t,isOpen:n,disabled:o||!l,blockTitle:c,hasSingleBlockType:i,toggleProps:a})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,r=n.rootClientId,o=n.clientId,c=n.isAppender,i=n.showInserterHelpPanel,a=n.__experimentalSelectBlockOnInsert;return n.__experimentalIsQuick?Object(d.createElement)(ls,{onSelect:t,rootClientId:r,clientId:o,isAppender:c,selectBlockOnInsert:a}):Object(d.createElement)(os,{onSelect:t,rootClientId:r,clientId:o,isAppender:c,showInserterHelpPanel:i,__experimentalSelectBlockOnInsert:a})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.hasSingleBlockType,r=e.insertOnlyAllowedBlock,o=e.__experimentalIsQuick;return n?this.renderToggle({onToggle:r}):Object(d.createElement)(j.Dropdown,{className:"block-editor-inserter",contentClassName:b()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(h.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),n}(d.Component),fs=Object(m.compose)([Object(g.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),c=o.getBlockRootClientId,i=o.hasInserterItems,a=o.__experimentalGetAllowedBlocks,l=e("core/blocks").getBlockVariations,s=a(r=r||c(n)||void 0),u=1===Object(p.size)(s)&&0===Object(p.size)(l(s[0].name,"inserter")),d=!1;return u&&(d=s[0]),{hasItems:i(r),hasSingleBlockType:u,blockTitle:d?d.title:"",allowedBlockType:d,rootClientId:r}})),Object(g.withDispatch)((function(e,t,n){var r=n.select;return{insertOnlyAllowedBlock:function(){var n=t.rootClientId,o=t.clientId,i=t.isAppender,a=t.hasSingleBlockType,l=t.allowedBlockType,s=t.__experimentalSelectBlockOnInsert;if(a&&((0,e("core/block-editor").insertBlock)(Object(c.createBlock)(l.name),function(){var e=r("core/block-editor"),t=e.getBlockIndex,c=e.getBlockSelectionEnd,a=e.getBlockOrder;if(o)return t(o,n);var l=c();return!i&&l?t(l,n)+1:a(n).length}(),n,s),!s)){var u=Object(h.sprintf)(// translators: %s: the name of the block that has been added
|
80 |
/* translators: %d: number of blocks */
|
81 |
Object(h._n)("%d block","%d blocks",t.length),t.length)),Object(d.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(h.sprintf)(
|
82 |
/* translators: %d: number of words */
|
83 |
+
Object(h._n)("%d word","%d words",n),n))))}));function yb(e){var t=e.blockName,n=Object(g.useSelect)((function(e){var n=e("core/block-editor").getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:Object(p.get)(n,["value",t]),onUpdatePreferredStyleVariations:Object(p.get)(n,["onChange"],null),styles:e("core/blocks").getBlockStyles(t)}}),[t]),r=n.preferredStyle,o=n.onUpdatePreferredStyleVariations,c=n.styles,i=Object(d.useMemo)((function(){return[{label:Object(h.__)("Not set"),value:""}].concat(ie(c.map((function(e){return{label:e.label,value:e.name}}))))}),[c]),a=Object(d.useCallback)((function(e){o(t,e)}),[t,o]);return o&&Object(d.createElement)(j.SelectControl,{options:i,value:r||"",label:Object(h.__)("Default Style"),onChange:a})}var _b=function(e){var t=e.slotName,n=e.bubblesVirtually,r=Object(j.__experimentalUseSlot)(t);return Boolean(r.fills&&r.fills.length)?Object(d.createElement)(j.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(h.__)("Advanced"),initialOpen:!1},Object(d.createElement)($.Slot,{bubblesVirtually:n})):null},Eb=Object(g.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getSelectedBlockCount,o=t.getBlockName,i=e("core/blocks").getBlockStyles,a=n(),l=a&&o(a),s=a&&Object(c.getBlockType)(l),u=a&&i(l);return{count:r(),hasBlockStyles:u&&u.length>0,selectedBlockName:l,selectedBlockClientId:a,blockType:s}}))((function(e){var t=e.blockType,n=e.count,r=e.hasBlockStyles,o=e.selectedBlockClientId,i=e.selectedBlockName,a=e.showNoBlockSelectedMessage,l=void 0===a||a,s=e.bubblesVirtually,u=void 0===s||s;if(n>1)return Object(d.createElement)("div",{className:"block-editor-block-inspector"},Object(d.createElement)(kb,null),Object(d.createElement)(Ze.Slot,{bubblesVirtually:u}));var f=i===Object(c.getUnregisteredTypeHandlerName)();return t&&o&&!f?Object(d.createElement)("div",{className:"block-editor-block-inspector"},Object(d.createElement)(Eo,{blockType:t}),r&&Object(d.createElement)("div",null,Object(d.createElement)(j.PanelBody,{title:Object(h.__)("Styles")},Object(d.createElement)(Rs,{clientId:o}),Object(c.hasBlockSupport)(t.name,"defaultStylePicker",!0)&&Object(d.createElement)(yb,{blockName:t.name}))),Object(d.createElement)(Ze.Slot,{bubblesVirtually:u}),Object(d.createElement)("div",null,Object(d.createElement)(_b,{slotName:$.slotName,bubblesVirtually:u})),Object(d.createElement)(hb,{key:"back"})):l?Object(d.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(h.__)("No block selected.")):null}));function Cb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rn(e);if(t){var o=rn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return nn(this,n)}}var Sb=function(e){en(n,e);var t=Cb(n);function n(){var e;return Yt(this,n),(e=t.apply(this,arguments)).bindContainer=e.bindContainer.bind(Zt(e)),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Zt(e)),e}return Qt(n,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearSelectionIfFocusTarget",value:function(e){var t=this.props,n=t.hasSelectedBlock,r=t.hasMultiSelection,o=t.clearSelectedBlock,c=n||r;e.target===this.container&&c&&o()}},{key:"render",value:function(){return Object(d.createElement)("div",Object(s.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(p.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),n}(d.Component),wb=Object(m.compose)([Object(g.withSelect)((function(e){var t=e("core/block-editor"),n=t.hasSelectedBlock,r=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:r()}})),Object(g.withDispatch)((function(e){return{clearSelectedBlock:e("core/block-editor").clearSelectedBlock}}))])(Sb),Ib=n(269),Bb=n.n(Ib),xb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Pb=function(e,t){t=t||{};var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function c(){var e={line:n,column:r};return function(t){return t.position=new i(e),b(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;var a=[];function l(o){var c=new Error(t.source+":"+n+":"+r+": "+o);if(c.reason=o,c.filename=t.source,c.line=n,c.column=r,c.source=e,!t.silent)throw c;a.push(c)}function s(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var t,n=[];for(b(),p(n);e.length&&"}"!==e.charAt(0)&&(t=C()||S());)!1!==t&&(n.push(t),p(n));return n}function f(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function b(){f(/^\s*/)}function p(e){var t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){var t=c();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return l("End of comment missing");var i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function v(){var e=f(/^([^{]+)/);if(e)return Tb(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 g(){var e=c(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=Tb(t[0]),!f(/^:\s*/))return l("property missing ':'");var n=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(xb,""),value:n?Tb(n[0]).replace(xb,""):""});return f(/^[;\s]*/),r}}function O(){var e,t=[];if(!s())return l("missing '{'");for(p(t);e=g();)!1!==e&&(t.push(e),p(t));return u()?t:l("missing '}'")}function h(){for(var e,t=[],n=c();e=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),f(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:O()})}var j,k=E("import"),y=E("charset"),_=E("namespace");function E(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=c(),r=f(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function C(){if("@"===e[0])return function(){var e=c(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=f(/^([-\w]+)\s*/)))return l("@keyframes missing name");var r,o=t[1];if(!s())return l("@keyframes missing '{'");for(var i=p();r=h();)i.push(r),i=i.concat(p());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):l("@keyframes missing '}'")}}()||function(){var e=c(),t=f(/^@media *([^{]+)/);if(t){var n=Tb(t[1]);if(!s())return l("@media missing '{'");var r=p().concat(d());return u()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}}()||function(){var e=c(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Tb(t[1]),media:Tb(t[2])})}()||function(){var e=c(),t=f(/^@supports *([^{]+)/);if(t){var n=Tb(t[1]);if(!s())return l("@supports missing '{'");var r=p().concat(d());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||k()||y()||_()||function(){var e=c(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var n=Tb(t[1]),r=Tb(t[2]);if(!s())return l("@document missing '{'");var o=p().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):l("@document missing '}'")}}()||function(){var e=c();if(f(/^@page */)){var t=v()||[];if(!s())return l("@page missing '{'");for(var n,r=p();n=g();)r.push(n),r=r.concat(p());return u()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}}()||function(){var e=c();if(f(/^@host\s*/)){if(!s())return l("@host missing '{'");var t=p().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=c();if(f(/^@font-face\s*/)){if(!s())return l("@font-face missing '{'");for(var t,n=p();t=g();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}function S(){var e=c(),t=v();return t?(p(),e({type:"rule",selectors:t,declarations:O()})):l("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type,o=r?t:n;for(var c in t){var i=t[c];Array.isArray(i)?i.forEach((function(t){e(t,o)})):i&&"object"===tn(i)&&e(i,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((j=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:j,parsingErrors:a}}))};function Tb(e){return e?e.replace(/^\s+|\s+$/g,""):""}var Nb=n(172),Db=n.n(Nb),Rb=Ab;function Ab(e){this.options=e||{}}Ab.prototype.emit=function(e){return e},Ab.prototype.visit=function(e){return this[e.type](e)},Ab.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n};var Mb=Lb;function Lb(e){Rb.call(this,e)}Db()(Lb,Rb),Lb.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Lb.prototype.comment=function(e){return this.emit("",e.position)},Lb.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Lb.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Lb.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Lb.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Lb.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Lb.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Lb.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Lb.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Lb.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Lb.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Lb.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Lb.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Lb.prototype.rule=function(e){var t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Lb.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Fb=Vb;function Vb(e){e=e||{},Rb.call(this,e),this.indentation=e.indent}Db()(Vb,Rb),Vb.prototype.compile=function(e){return this.stylesheet(e)},Vb.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Vb.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Vb.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Vb.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Vb.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Vb.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Vb.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Vb.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Vb.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Vb.prototype.keyframe=function(e){var t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Vb.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Vb.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Vb.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Vb.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Vb.prototype.rule=function(e){var t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Vb.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Vb.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var Hb=function(e,t){try{var n=Pb(e),r=Bb.a.map(n,(function(e){if(!e)return e;var n=t(e);return this.update(n)}));return o=r,((c=c||{}).compress?new Mb(c):new Fb(c)).compile(o)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var o,c};function zb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ub(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zb(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gb(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function Wb(e,t){return new URL(e,t).toString()}var Kb=function(e){return function(t){if("declaration"===t.type){var n=function(e){for(var t,n=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g,r=[];null!==(t=n.exec(e));){var o={source:t[0],before:t[1],quote:t[2],value:t[3],after:t[4]};Gb(o)&&r.push(o)}return r}(t.value).map((c=e,function(e){return Ub(Ub({},e),{},{newUrl:"url("+e.before+e.quote+Wb(e.value,c)+e.quote+e.after+")"})}));return Ub(Ub({},t),{},{value:(r=t.value,o=n,o.forEach((function(e){r=r.replace(e.source,e.newUrl)})),r)})}var r,o,c;return t}};function qb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qb(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yb=/^(body|html|:root).*$/,Xb=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?$b($b({},n),{},{selectors:n.selectors.map((function(n){return t.includes(n.trim())?n:n.match(Yb)?n.replace(/^(body|html|:root)/,e):e+" "+n}))}):n}},Qb=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(p.map)(e,(function(e){var n=e.css,r=e.baseURL,o=[];return t&&o.push(Xb(t)),r&&o.push(Kb(r)),o.length?Hb(n,Object(m.compose)(o)):n}))};var Zb=function(e){var t=e.styles;return Object(d.useEffect)((function(){var e=Qb(t,".editor-styles-wrapper"),n=Object(p.map)(Object(p.compact)(e),(function(e){var t=document.createElement("style");return t.innerHTML=e,document.body.appendChild(t),t}));return function(){return n.forEach((function(e){return document.body.removeChild(e)}))}}),[t]),null};var Jb=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.showInserterHelpPanel,c=e.showMostUsedBlocks,i=void 0!==c&&c,a=e.__experimentalSelectBlockOnInsert,l=e.__experimentalInsertionIndex,s=e.onSelect,u=void 0===s?p.noop:s,f=Object(g.useSelect)((function(e){var r=e("core/block-editor").getBlockRootClientId;return t||r(n)||void 0}),[n,t]);return Object(d.createElement)(os,{onSelect:u,rootClientId:f,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalSelectBlockOnInsert:a,__experimentalInsertionIndex:l})};function ep(){var e=Object(g.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientIds,r=t.getBlockOrder,o=t.getBlockRootClientId,c=n(),i=Object(ae.a)(c,1)[0];return{clientIds:c,rootBlocksClientIds:r(),rootClientId:o(i)}}),[]),t=e.clientIds,n=e.rootBlocksClientIds,r=e.rootClientId,o=Object(g.useDispatch)("core/block-editor"),c=o.duplicateBlocks,i=o.removeBlocks,a=o.insertAfterBlock,s=o.insertBeforeBlock,u=o.multiSelect,f=o.clearSelectedBlock,b=o.moveBlocksUp,m=o.moveBlocksDown;return Object(l.useShortcut)("core/block-editor/move-up",Object(d.useCallback)((function(e){e.preventDefault(),b(t,r)}),[t,b]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/move-down",Object(d.useCallback)((function(e){e.preventDefault(),m(t,r)}),[t,m]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/duplicate",Object(d.useCallback)((function(e){e.preventDefault(),c(t)}),[t,c]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/remove",Object(d.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/insert-after",Object(d.useCallback)((function(e){e.preventDefault(),a(Object(p.last)(t))}),[t,a]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/insert-before",Object(d.useCallback)((function(e){e.preventDefault(),s(Object(p.first)(t))}),[t,s]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/delete-multi-selection",Object(d.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{isDisabled:t.length<2}),Object(l.useShortcut)("core/block-editor/select-all",Object(d.useCallback)((function(e){e.preventDefault(),u(Object(p.first)(n),Object(p.last)(n))}),[n,u])),Object(l.useShortcut)("core/block-editor/unselect",Object(d.useCallback)((function(e){e.preventDefault(),f(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges()}),[t,f]),{isDisabled:t.length<2}),null}ep.Register=function(){var e=Object(g.useDispatch)("core/keyboard-shortcuts").registerShortcut;return Object(d.useEffect)((function(){e({name:"core/block-editor/duplicate",category:"block",description:Object(h.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(h.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(h.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:Object(h.__)("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:Object(h.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(h.__)("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:Object(h.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(h.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(h.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(h.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var tp=ep;function np(){var e=Object(g.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockSelectionEnd,r=t.hasMultiSelection,o=t.isMultiSelecting;return{selectionEnd:n(),isMultiSelection:r(),isMultiSelecting:o()}}),[]),t=e.isMultiSelection,n=e.selectionEnd,r=e.isMultiSelecting;return Object(d.useEffect)((function(){if(n&&!r&&t){var e=Je(n);if(e){var o=Object(Tr.getScrollContainer)(e);o&&cf()(e,o,{onlyScrollIfNeeded:!0})}}}),[t,n,r]),null}var rp=[mt.UP,mt.RIGHT,mt.DOWN,mt.LEFT,mt.ENTER,mt.BACKSPACE];var op=Object(m.withSafeTimeout)((function(e){var t=e.children,n=e.setTimeout,r=Object(d.useRef)(),o=Object(d.useRef)(),c=Object(g.useSelect)((function(e){return e("core/block-editor").isTyping()})),i=Object(g.useDispatch)("core/block-editor"),a=i.startTyping,l=i.stopTyping;function s(e){var t=e?"addEventListener":"removeEventListener";r.current.ownerDocument[t]("selectionchange",f),r.current.ownerDocument[t]("mousemove",u),document[t]("mousemove",u)}function u(e){var t=e.clientX,n=e.clientY;if(o.current){var r=o.current,c=r.clientX,i=r.clientY;c===t&&i===n||l()}o.current={clientX:t,clientY:n}}function f(e){var t=e.target.defaultView.getSelection();t.rangeCount>0&&t.getRangeAt(0).collapsed||l()}function b(e){var t=e.type,n=e.target;!c&&Object(Tr.isTextField)(n)&&r.current.contains(n)&&("keydown"!==t||function(e){var t=e.keyCode;return!e.shiftKey&&rp.includes(t)}(e))&&a()}return Object(d.useEffect)((function(){return s(c),function(){return s(!1)}}),[c]),Object(d.createElement)("div",{ref:r,onFocus:function(e){var t=e.target;n((function(){c&&!Object(Tr.isTextField)(t)&&l()}))},onKeyPress:b,onKeyDown:Object(p.over)([b,function(e){!c||e.keyCode!==mt.ESCAPE&&e.keyCode!==mt.TAB||l()}])},t)}));function cp(){return bo()("PreserveScrollInReorder component",{hint:"This behavior is now built-in the block list"}),null}function ip(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rn(e);if(t){var o=rn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return nn(this,n)}}var ap=-1!==window.navigator.userAgent.indexOf("Trident"),lp=new Set([mt.UP,mt.DOWN,mt.LEFT,mt.RIGHT]),sp=function(e){en(n,e);var t=ip(n);function n(){var e;return Yt(this,n),(e=t.apply(this,arguments)).ref=Object(d.createRef)(),e.onKeyDown=e.onKeyDown.bind(Zt(e)),e.addSelectionChangeListener=e.addSelectionChangeListener.bind(Zt(e)),e.computeCaretRectOnSelectionChange=e.computeCaretRectOnSelectionChange.bind(Zt(e)),e.maintainCaretPosition=e.maintainCaretPosition.bind(Zt(e)),e.computeCaretRect=e.computeCaretRect.bind(Zt(e)),e.onScrollResize=e.onScrollResize.bind(Zt(e)),e.isSelectionEligibleForScroll=e.isSelectionEligibleForScroll.bind(Zt(e)),e.getDocument=e.getDocument.bind(Zt(e)),e.getWindow=e.getWindow.bind(Zt(e)),e}return Qt(n,[{key:"componentDidMount",value:function(){this.getWindow().addEventListener("scroll",this.onScrollResize,!0),this.getWindow().addEventListener("resize",this.onScrollResize,!0)}},{key:"componentWillUnmount",value:function(){this.getWindow().removeEventListener("scroll",this.onScrollResize,!0),this.getWindow().removeEventListener("resize",this.onScrollResize,!0),this.getDocument().removeEventListener("selectionchange",this.computeCaretRectOnSelectionChange),this.onScrollResize.rafId&&this.getWindow().cancelAnimationFrame(this.onScrollResize.rafId),this.onKeyDown.rafId&&this.getWindow().cancelAnimationFrame(this.onKeyDown.rafId)}},{key:"getDocument",value:function(){return this.ref.current.ownerDocument}},{key:"getWindow",value:function(){return this.getDocument().defaultView}},{key:"computeCaretRect",value:function(){this.isSelectionEligibleForScroll()&&(this.caretRect=Object(Tr.computeCaretRect)(this.getWindow()))}},{key:"computeCaretRectOnSelectionChange",value:function(){this.getDocument().removeEventListener("selectionchange",this.computeCaretRectOnSelectionChange),this.computeCaretRect()}},{key:"onScrollResize",value:function(){var e=this;this.onScrollResize.rafId||(this.onScrollResize.rafId=this.getWindow().requestAnimationFrame((function(){e.computeCaretRect(),delete e.onScrollResize.rafId})))}},{key:"isSelectionEligibleForScroll",value:function(){return this.props.selectedBlockClientId&&this.ref.current.contains(this.getDocument().activeElement)&&this.getDocument().activeElement.isContentEditable}},{key:"isLastEditableNode",value:function(){var e=this.ref.current.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===this.getDocument().activeElement}},{key:"maintainCaretPosition",value:function(e){var t=e.keyCode;if(this.isSelectionEligibleForScroll()){var n=Object(Tr.computeCaretRect)(this.getWindow());if(n)if(this.caretRect)if(lp.has(t))this.caretRect=n;else{var r=n.top-this.caretRect.top;if(0!==r){var o=Object(Tr.getScrollContainer)(this.ref.current);if(o){var c=o===this.getDocument().body,i=c?this.getWindow().scrollY:o.scrollTop,a=c?0:o.getBoundingClientRect().top,l=c?this.caretRect.top/this.getWindow().innerHeight:(this.caretRect.top-a)/(this.getWindow().innerHeight-a);if(0===i&&l<.75&&this.isLastEditableNode())this.caretRect=n;else{var s=c?this.getWindow().innerHeight:o.clientHeight;this.caretRect.top+this.caretRect.height>a+s||this.caretRect.top<a?this.caretRect=n:c?this.getWindow().scrollBy(0,r):o.scrollTop+=r}}}}else this.caretRect=n}}},{key:"addSelectionChangeListener",value:function(){this.getDocument().addEventListener("selectionchange",this.computeCaretRectOnSelectionChange)}},{key:"onKeyDown",value:function(e){var t=this;e.persist(),this.onKeyDown.rafId&&this.getWindow().cancelAnimationFrame(this.onKeyDown.rafId),this.onKeyDown.rafId=this.getWindow().requestAnimationFrame((function(){t.maintainCaretPosition(e),delete t.onKeyDown.rafId}))}},{key:"render",value:function(){return Object(d.createElement)("div",{ref:this.ref,onKeyDown:this.onKeyDown,onKeyUp:this.maintainCaretPosition,onMouseDown:this.addSelectionChangeListener,onTouchStart:this.addSelectionChangeListener,className:"block-editor__typewriter"},this.props.children)}}]),n}(d.Component),up=ap?function(e){return e.children}:Object(g.withSelect)((function(e){return{selectedBlockClientId:(0,e("core/block-editor").getSelectedBlockClientId)()}}))(sp);function dp(e){if(void 0===e)e=So.colors;else{var t=e.filter((function(e){return e.color}));0===t.length?e=So.colors:t.length<e.length&&(e=t)}return e}function fp(e){if(void 0===e)e=So.gradients;else{var t=e.filter((function(e){return e.gradient}));0===t.length?e=So.gradients:t.length<e.length&&(e=t)}return e}}]);
|
build/edit-post/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => '043cfce5fdc7370b441a6398b8b1cd85');
|
build/edit-site/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '41c014089dcbdf104433769cc0397853');
|
build/edit-widgets/blocks/legacy-widget.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Server-side rendering of the `core/legacy-widget` block.
|
4 |
+
*
|
5 |
+
* @package WordPress
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Register legacy widget block.
|
10 |
+
*/
|
11 |
+
function gutenberg_register_block_core_legacy_widget() {
|
12 |
+
register_block_type_from_metadata(
|
13 |
+
__DIR__ . '/legacy-widget',
|
14 |
+
array(
|
15 |
+
'render_callback' => 'gutenberg_render_block_core_legacy_widget',
|
16 |
+
)
|
17 |
+
);
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Renders the `core/legacy-widget` block on server.
|
22 |
+
*
|
23 |
+
* @param array $attributes The block attributes.
|
24 |
+
*
|
25 |
+
* @return string Returns the post content with the legacy widget added.
|
26 |
+
* @see WP_Widget
|
27 |
+
*/
|
28 |
+
function gutenberg_render_block_core_legacy_widget( $attributes ) {
|
29 |
+
global $wp_widget_factory, $wp_registered_sidebars;
|
30 |
+
|
31 |
+
if ( isset( $attributes['widgetId'] ) ) {
|
32 |
+
return __( 'Rendering legacy widget block using widgetId is unsupported.', 'gutenberg' );
|
33 |
+
}
|
34 |
+
$widget_id = - 1;
|
35 |
+
|
36 |
+
if ( ! isset( $attributes['sidebarId'] ) || ! isset( $wp_registered_sidebars[ $attributes['sidebarId'] ] ) ) {
|
37 |
+
return '';
|
38 |
+
}
|
39 |
+
$sidebar_id = $attributes['sidebarId'];
|
40 |
+
|
41 |
+
if ( ! isset( $attributes['widgetClass'] ) || ! isset( $wp_widget_factory->widgets[ $attributes['widgetClass'] ] ) ) {
|
42 |
+
return '';
|
43 |
+
}
|
44 |
+
$widget_class = $attributes['widgetClass'];
|
45 |
+
$widget_obj = $wp_widget_factory->widgets[ $widget_class ];
|
46 |
+
|
47 |
+
$instance = isset( $attributes['instance'] ) ? $attributes['instance'] : null;
|
48 |
+
|
49 |
+
$widget_params = array_merge(
|
50 |
+
array(
|
51 |
+
'classname' => array(),
|
52 |
+
),
|
53 |
+
$widget_obj->widget_options
|
54 |
+
);
|
55 |
+
|
56 |
+
/** This filter is documented in wp-includes/widgets/widgets.php */
|
57 |
+
do_action( 'dynamic_sidebar_before', $sidebar_id, true );
|
58 |
+
$sidebar = $wp_registered_sidebars[ $sidebar_id ];
|
59 |
+
|
60 |
+
$params = array_merge(
|
61 |
+
array(
|
62 |
+
array_merge(
|
63 |
+
$sidebar,
|
64 |
+
array(
|
65 |
+
'widget_id' => $widget_id,
|
66 |
+
'widget_name' => $widget_obj->name,
|
67 |
+
)
|
68 |
+
),
|
69 |
+
),
|
70 |
+
array(
|
71 |
+
$instance,
|
72 |
+
)
|
73 |
+
);
|
74 |
+
|
75 |
+
// Substitute HTML `id` and `class` attributes into `before_widget`.
|
76 |
+
$classname_ = '';
|
77 |
+
foreach ( (array) $widget_params['classname'] as $cn ) {
|
78 |
+
if ( is_string( $cn ) ) {
|
79 |
+
$classname_ .= '_' . $cn;
|
80 |
+
} elseif ( is_object( $cn ) ) {
|
81 |
+
$classname_ .= '_' . get_class( $cn );
|
82 |
+
}
|
83 |
+
}
|
84 |
+
$classname_ = ltrim( $classname_, '_' );
|
85 |
+
$params[0]['before_widget'] = sprintf( $params[0]['before_widget'], $widget_id, $classname_ );
|
86 |
+
|
87 |
+
/** This filter is documented in wp-includes/widgets/widgets.php */
|
88 |
+
$params = apply_filters( 'dynamic_sidebar_params', $params );
|
89 |
+
|
90 |
+
/** This filter is documented in wp-includes/widgets/widgets.php */
|
91 |
+
do_action( 'dynamic_sidebar', $widget_params );
|
92 |
+
|
93 |
+
ob_start();
|
94 |
+
$widget_obj->_set( - 1 );
|
95 |
+
call_user_func_array( array( $widget_obj, 'widget' ), $params );
|
96 |
+
|
97 |
+
return ob_get_clean();
|
98 |
+
}
|
99 |
+
|
100 |
+
add_action( 'init', 'gutenberg_register_block_core_legacy_widget', 20 );
|
build/edit-widgets/blocks/legacy-widget/block.json
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "core/legacy-widget",
|
3 |
+
"category": "widgets",
|
4 |
+
"attributes": {
|
5 |
+
"widgetClass": {
|
6 |
+
"type": "string"
|
7 |
+
},
|
8 |
+
"referenceWidgetName": {
|
9 |
+
"type": "string"
|
10 |
+
},
|
11 |
+
"idBase": {
|
12 |
+
"type": "string"
|
13 |
+
},
|
14 |
+
"number": {
|
15 |
+
"type": "number"
|
16 |
+
},
|
17 |
+
"instance": {
|
18 |
+
"type": "object"
|
19 |
+
}
|
20 |
+
},
|
21 |
+
"supports": {
|
22 |
+
"html": false,
|
23 |
+
"customClassName": false
|
24 |
+
}
|
25 |
+
}
|
build/edit-widgets/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '467fe5c057c7af899bac37ad7f0f60a7');
|
build/edit-widgets/index.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
this.wp=this.wp||{},this.wp.editWidgets=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=408)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},12:function(e,t){!function(){e.exports=this.wp.keycodes}()},128:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},129:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},145:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));t.a=c},157:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=c},158:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=c},18:function(e,t){!function(){e.exports=this.wp.url}()},180:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));t.a=c},181:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}));t.a=c},197:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}));t.a=c},2:function(e,t){!function(){e.exports=this.lodash}()},25:function(e,t){!function(){e.exports=this.wp.hooks}()},255:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));t.a=c},256:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"}));t.a=c},287:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(n.createElement)(i.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.a=c},3:function(e,t){!function(){e.exports=this.wp.components}()},31:function(e,t){!function(){e.exports=this.wp.apiFetch}()},38:function(e,t){!function(){e.exports=this.wp.coreData}()},4:function(e,t){!function(){e.exports=this.wp.data}()},408:function(e,t,r){"use strict";r.r(t),r.d(t,"initialize",(function(){return $t}));var n={};r.r(n),r.d(n,"saveEditedWidgetAreas",(function(){return V})),r.d(n,"saveWidgetAreas",(function(){return z})),r.d(n,"setWidgetIdForClientId",(function(){return H})),r.d(n,"setWidgetAreasOpenState",(function(){return q})),r.d(n,"setIsWidgetAreaOpen",(function(){return $})),r.d(n,"setIsInserterOpened",(function(){return Q})),r.d(n,"closeGeneralSidebar",(function(){return Y}));var i={};r.r(i),r.d(i,"getWidgetAreas",(function(){return J}));var c={};function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.r(c),r.d(c,"getWidgets",(function(){return ie})),r.d(c,"getWidget",(function(){return ce})),r.d(c,"getWidgetAreas",(function(){return oe})),r.d(c,"getWidgetIdForClientId",(function(){return ae})),r.d(c,"getWidgetAreaForClientId",(function(){return se})),r.d(c,"getEditedWidgetAreas",(function(){return le})),r.d(c,"isSavingWidgetAreas",(function(){return ue})),r.d(c,"hasResolvedWidgetAreas",(function(){return de})),r.d(c,"getIsWidgetAreaOpen",(function(){return fe})),r.d(c,"isInserterOpened",(function(){return be}));var a=r(0),s=r(8),l=(r(74),r(79)),u=r(4);function d(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=Object(u.combineReducers)({mapping:function(e,t){var r=t.type,n=d(t,["type"]);if("SET_WIDGET_TO_CLIENT_ID_MAPPING"===r)return n.mapping;if("SET_WIDGET_ID_FOR_CLIENT_ID"===r){var i=b({},e);return i[t.widgetId]=t.clientId,i}return e||{}},isInserterOpened:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_IS_INSERTER_OPENED":return t.value}return e},widgetAreasOpenState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type;switch(r){case"SET_WIDGET_AREAS_OPEN_STATE":return t.widgetAreasOpenState;case"SET_IS_WIDGET_AREA_OPEN":var n=t.clientId,i=t.isOpen;return b(b({},e),{},o({},n,i));default:return e}}}),m=r(13),g=r.n(m);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function O(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function y(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||O(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var h="root",j=function(e){return"widget-area-".concat(e)};function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"RESOLVE_WIDGET_AREAS",query:e}}function E(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return{type:"SELECT",registryName:e,selectorName:t,args:n}}function _(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return{type:"DISPATCH",registryName:e,actionName:t,args:n}}var S={SELECT:Object(u.createRegistryControl)((function(e){return function(t){var r,n=t.registryName,i=t.selectorName,c=t.args;return(r=e.select(n))[i].apply(r,y(c))}})),GET_PENDING_ACTIONS:Object(u.createRegistryControl)((function(e){return function(t){var r,n=t.postId;return(null===(r=k(e).processingQueue[n])||void 0===r?void 0:r.pendingActions)||[]}})),IS_PROCESSING_POST:Object(u.createRegistryControl)((function(e){return function(t){var r,n=t.postId;return null===(r=k(e).processingQueue[n])||void 0===r?void 0:r.inProgress}})),GET_WIDGET_TO_CLIENT_ID_MAPPING:Object(u.createRegistryControl)((function(e){return function(){return k(e).mapping||{}}})),DISPATCH:Object(u.createRegistryControl)((function(e){return function(t){var r,n=t.registryName,i=t.actionName,c=t.args;return(r=e.dispatch(n))[i].apply(r,y(c))}})),RESOLVE_WIDGET_AREAS:Object(u.createRegistryControl)((function(e){return function(t){var r=t.query;return e.__experimentalResolveSelect("core").getEntityRecords(h,"sidebar",r)}}))},k=function(e){return e.stores["core/edit-widgets"].store.getState()},P=S,I=r(2),A=r(1);function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function x(e){if("WP_Widget_Block"===e.widget_class){var t=Object(s.parse)(e.settings.content);return t.length?t[0]:Object(s.createBlock)("core/paragraph",{},[])}var r={form:e.form,instance:e.settings,idBase:e.id_base,number:e.number};return!e.widget_class?r.referenceWidgetName=e.id:r.widgetClass=e.widget_class,Object(s.createBlock)("core/legacy-widget",r,[])}function N(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.name;return"core/legacy-widget"===n?(delete(t=e.attributes.referenceWidgetName?D(e,r):W(e,r)).form,delete t.rendered,t):R(R({},r),{},{id_base:"block",widget_class:"WP_Widget_Block",settings:{content:Object(s.serialize)(e)}})}function W(e,t){var r=e.attributes;return R(R({},t),{},{widget_class:r.widgetClass,id_base:r.idBase,settings:r.instance})}function D(e,t){var r=e.attributes;return R(R({},t),{},{id:r.referenceWidgetName,settings:r.instance})}function T(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return B(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return B(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw c}}}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var M=g.a.mark(V),L=g.a.mark(z),F=g.a.mark(U),G=g.a.mark(Y);function V(){var e;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,E("core/edit-widgets","getEditedWidgetAreas");case 2:if(null==(e=t.sent)?void 0:e.length){t.next=5;break}return t.abrupt("return");case 5:return t.prev=5,t.delegateYield(z(e),"t0",7);case 7:return t.next=9,_("core/notices","createSuccessNotice",Object(A.__)("Widgets saved."),{type:"snackbar"});case 9:t.next=15;break;case 11:return t.prev=11,t.t1=t.catch(5),t.next=15,_("core/notices","createErrorNotice",Object(A.__)("There was an error."),{type:"snackbar"});case 15:case"end":return t.stop()}}),M,null,[[5,11]])}function z(e){return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.delegateYield(g.a.mark((function t(){var r,n,i,c,o,a,s,l,u;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,E("core/edit-widgets","getWidgets");case 2:return r=t.sent,t.next=5,{type:"GET_WIDGET_TO_CLIENT_ID_MAPPING"};case 5:n=t.sent,i=Object(I.invert)(n),c=T(e),t.prev=8,c.s();case 10:if((o=c.n()).done){t.next=24;break}return a=o.value,t.next=14,E("core","getEditedEntityRecord",h,"postType",j(a.id));case 14:return s=t.sent,l=s.blocks,u=l.map((function(e){var t=i[e.clientId];return N(e,r[t])})),t.next=19,_("core","editEntityRecord",h,"sidebar",a.id,{widgets:u});case 19:return t.delegateYield(U(a.id),"t0",20);case 20:return t.next=22,_("core","receiveEntityRecords",h,"postType",s,void 0);case 22:t.next=10;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(8),c.e(t.t1);case 29:return t.prev=29,c.f(),t.finish(29);case 32:case"end":return t.stop()}}),t,null,[[8,26,29,32]])}))(),"t0",2);case 2:return t.prev=2,t.next=5,_("core","finishResolution","getEntityRecord",h,"sidebar",{});case 5:return t.finish(2);case 6:case"end":return t.stop()}}),L,null,[[0,,2,6]])}function U(e){var t,r;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,E("core","getLastEntitySaveError",h,"sidebar",e);case 2:return t=n.sent,n.next=5,_("core","saveEditedEntityRecord",h,"sidebar",e);case 5:return n.next=7,E("core","getLastEntitySaveError",h,"sidebar",e);case 7:if(!(r=n.sent)||t===r){n.next=10;break}throw new Error(r);case 10:case"end":return n.stop()}}),F)}function H(e,t){return{type:"SET_WIDGET_ID_FOR_CLIENT_ID",clientId:e,widgetId:t}}function q(e){return{type:"SET_WIDGET_AREAS_OPEN_STATE",widgetAreasOpenState:e}}function $(e,t){return{type:"SET_IS_WIDGET_AREA_OPEN",clientId:e,isOpen:t}}function Q(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function Y(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_("core/interface","disableComplementaryArea","core/edit-widgets");case 2:case"end":return e.stop()}}),G)}var K=g.a.mark(J);function X(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Z(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Z(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw c}}}}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function J(){var e,t,r,n,i,c,o,a,l,u,d,f,b,p;return g.a.wrap((function(m){for(;;)switch(m.prev=m.next){case 0:return e={},m.next=3,w(e);case 3:return m.next=5,E("core","getEntityRecords",h,"sidebar",e);case 5:t=m.sent,r=[],n={},i=t.sort((function(e,t){return"wp_inactive_widgets"===e.id?1:"wp_inactive_widgets"===t.id?-1:0})),c=X(i),m.prev=10,c.s();case 12:if((o=c.n()).done){m.next=22;break}a=o.value,l=[],u=X(a.widgets);try{for(u.s();!(d=u.n()).done;)f=d.value,b=x(f),n[f.id]=b.clientId,l.push(b)}catch(e){u.e(e)}finally{u.f()}return m.next=19,ee(j(a.id),l);case 19:r.push(Object(s.createBlock)("core/widget-area",{id:a.id,name:a.name}));case 20:m.next=12;break;case 22:m.next=27;break;case 24:m.prev=24,m.t0=m.catch(10),c.e(m.t0);case 27:return m.prev=27,c.f(),m.finish(27);case 30:return p={},r.forEach((function(e,t){p[e.clientId]=0===t})),m.next=34,q(p);case 34:return m.next=36,ee("widget-areas",r);case 36:return m.next=38,{type:"SET_WIDGET_TO_CLIENT_ID_MAPPING",mapping:n};case 38:case"end":return m.stop()}}),K,null,[[10,24,27,30]])}var ee=g.a.mark((function e(t,r){var n,i;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=te(t,r),i=[h,"postType",t],e.next=4,_("core","startResolution","getEntityRecord",i);case 4:return e.next=6,_("core","receiveEntityRecords",h,"postType",n,{id:n.id},!1);case 6:return e.next=8,_("core","finishResolution","getEntityRecord",i);case 8:return e.abrupt("return",n);case 9:case"end":return e.stop()}}),e)})),te=function(e,t){return{id:e,slug:e,status:"draft",type:"page",blocks:t,meta:{widgetAreaId:e}}};function re(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ne(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ne(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw c}}}}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ie=Object(u.createRegistrySelector)((function(e){return function(){var t=e("core/edit-widgets").getWidgetAreas();return Object(I.keyBy)(t.flatMap((function(e){return e.widgets})),(function(e){return e.id}))}})),ce=Object(u.createRegistrySelector)((function(e){return function(t,r){return e("core/edit-widgets").getWidgets()[r]}})),oe=Object(u.createRegistrySelector)((function(e){return function(){if(!de(t))return null;var t={};return e("core").getEntityRecords(h,"sidebar",t)}})),ae=function(e,t){var r=e.mapping;return Object(I.invert)(r)[t]},se=Object(u.createRegistrySelector)((function(e){return function(t,r){var n,i=re(e("core/edit-widgets").getWidgetAreas());try{for(i.s();!(n=i.n()).done;){var c=n.value;if(e("core").getEditedEntityRecord(h,"postType",j(c.id)).blocks.map((function(e){return e.clientId})).includes(r))return c}}catch(e){i.e(e)}finally{i.f()}}})),le=Object(u.createRegistrySelector)((function(e){return function(t,r){var n=e("core/edit-widgets").getWidgetAreas();return n?(r&&(n=n.filter((function(e){var t=e.id;return r.includes(t)}))),n.filter((function(t){var r=t.id;return e("core").hasEditsForEntityRecord(h,"postType",j(r))})).map((function(t){var r=t.id;return e("core").getEditedEntityRecord(h,"sidebar",r)}))):[]}})),ue=Object(u.createRegistrySelector)((function(e){return function(t,r){var n;r||(r=null===(n=e("core/edit-widgets").getWidgetAreas())||void 0===n?void 0:n.map((function(e){return e.id})));if(!r)return!1;var i,c=re(r);try{for(c.s();!(i=c.n()).done;){var o=i.value;if(e("core").isSavingEntityRecord(h,"sidebar",o))return!0}}catch(e){c.e(e)}finally{c.f()}return!1}})),de=Object(u.createRegistrySelector)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var r=e("core").getEntityRecords(h,"sidebar",t);return!!(null==r?void 0:r.length)||e("core").hasFinishedResolution("getEntityRecords",[h,"sidebar",t])}})),fe=function(e,t){return!!e.widgetAreasOpenState[t]};function be(e){return e.isInserterOpened}var pe={reducer:p,controls:P,selectors:c,resolvers:i,actions:n},me=(Object(u.registerStore)("core/edit-widgets",pe),r(25)),ge=r(77);Object(me.addFilter)("editor.MediaUpload","core/edit-widgets/replace-media-upload",(function(){return ge.MediaUpload}));var ve=r(6),Oe=Object(a.createElement)(ve.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(ve.Path,{d:"M7 11h2v2H7v-2zm14-5v14l-2 2H5l-2-2V6l2-2h1V2h2v2h8V2h2v2h1l2 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"}));function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,c=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,c=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw c}}return r}}(e,t)||O(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var he=r(3),je=r(5),we=r(287);function Ee(){return(Ee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ke(e,t,r){return t&&Se(e.prototype,t),r&&Se(e,r),e}function Pe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ie(e,t){return(Ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ae(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ie(e,t)}function Ce(e){return(Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Re(e,t){return!t||"object"!==Ce(t)&&"function"!=typeof t?Pe(e):t}function xe(e){return(xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ne=r(31),We=r.n(Ne),De=r(9);function Te(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Be(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Be(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw c}}}}function Be(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Me(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=xe(e);if(t){var i=xe(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Re(this,r)}}var Le=function(e){Ae(r,e);var t=Me(r);function r(){var e;return _e(this,r),(e=t.apply(this,arguments)).containerRef=Object(a.createRef)(),e.formRef=Object(a.createRef)(),e.widgetContentRef=Object(a.createRef)(),e.idBaseInputRef=Object(a.createRef)(),e.widgetNumberInputRef=Object(a.createRef)(),e.triggerWidgetEvent=e.triggerWidgetEvent.bind(Pe(e)),e}return ke(r,[{key:"componentDidMount",value:function(){this.triggerWidgetEvent("widget-added"),this.props.onMount&&this.props.onMount(this.getFormData())}},{key:"shouldComponentUpdate",value:function(e){var t=!1;(e.idBase!==this.props.idBase&&this.idBaseInputRef.current&&(this.idBaseInputRef.current.value=e.idBase,t=!0),e.number!==this.props.number&&this.widgetNumberInputRef.current&&(this.widgetNumberInputRef.current.value=e.number),e.form!==this.props.form&&this.widgetContentRef.current)&&(this.widgetContentRef.current.innerHTML=e.form,t=!0);return t&&this.triggerWidgetEvent("widget-updated"),!1}},{key:"render",value:function(){var e=this,t=this.props,r=t.id,n=t.idBase,i=t.number,c=t.form;return Object(a.createElement)("div",{className:"widget open",ref:this.containerRef},Object(a.createElement)("div",{className:"widget-inside"},Object(a.createElement)("form",{className:"form",ref:this.formRef,method:"post",onBlur:function(){return e.props.onInstanceChange(e.getFormData())}},Object(a.createElement)("div",{ref:this.widgetContentRef,className:"widget-content",dangerouslySetInnerHTML:{__html:c}}),Object(a.createElement)("input",{type:"hidden",name:"widget-id",className:"widget-id",value:r||n+i}),Object(a.createElement)("input",{ref:this.idBaseInputRef,type:"hidden",name:"id_base",className:"id_base",value:n}),Object(a.createElement)("input",{ref:this.widgetNumberInputRef,type:"hidden",name:"widget_number",className:"widget_number",value:i}),Object(a.createElement)("input",{type:"hidden",name:"multi_number",className:"multi_number",value:""}),Object(a.createElement)("input",{type:"hidden",name:"add_new",className:"add_new",value:""}))))}},{key:"triggerWidgetEvent",value:function(e){window.jQuery(window.document).trigger(e,[window.jQuery(this.containerRef.current)])}},{key:"getFormData",value:function(){if(this.formRef.current){var e,t=this.formRef.current,r=new window.FormData(t),n={},i=Te(r.keys());try{for(i.s();!(e=i.n()).done;){var c=e.value;if(!Object(I.includes)(["widget-id","id_base","widget_number","multi_number","add_new"],c)){var o=c.match(/[^\[]*\[[-\d]*\]\[([^\]]*)\]/),a=o&&o[1]?o[1]:c,s=r.getAll(c);s.length>1?n[a]=s:n[a]=s[0]}}}catch(e){i.e(e)}finally{i.f()}return n}}}]),r}(a.Component);function Fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=xe(e);if(t){var i=xe(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Re(this,r)}}var ze=window,Ue=ze.XMLHttpRequest,He=ze.FormData,qe=function(e){Ae(r,e);var t=Ve(r);function r(e){var n;return _e(this,r),(n=t.apply(this,arguments)).state={form:e.prerenderedEditForm},n.widgetNonce=null,n.instanceUpdating=null,n.onInstanceChange=n.onInstanceChange.bind(Pe(n)),n.requestWidgetForm=n.requestWidgetForm.bind(Pe(n)),n}return ke(r,[{key:"componentDidMount",value:function(){var e=this;this.isStillMounted=!0,this.trySetNonce(),this.props.prerenderedEditForm||this.requestWidgetForm(void 0,(function(t){e.props.onInstanceChange(null,!!t.form)}))}},{key:"componentDidUpdate",value:function(e){var t=this;this.widgetNonce||this.trySetNonce(),e.widgetClass!==this.props.widgetClass&&this.requestWidgetForm(void 0,(function(e){t.props.onInstanceChange(null,!!e.form)})),this.instanceUpdating===this.props.instance&&(this.instanceUpdating=null)}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"render",value:function(){var e=this,t=this.props,r=t.instanceId,n=t.id,i=t.number,c=t.idBase,o=t.instance,s=t.isVisible,l=t.widgetName,u=this.state.form;if(!u)return null;var d=Object(I.get)(o,["title"]),f=null;d&&l?f="".concat(l,": ").concat(d):!d&&l?f=l:d&&!l&&(f=d);var b=s?{}:{style:{display:"none"},hidden:!0,"aria-hidden":"true"};return Object(a.createElement)("div",Ee({className:"wp-block-legacy-widget__edit-handler"},b),f&&Object(a.createElement)("div",{className:"wp-block-legacy-widget__edit-widget-title"},f),Object(a.createElement)("div",{className:"wp-block-legacy-widget__edit-container",style:{display:this.props.isVisible?"block":"none"}},Object(a.createElement)(Le,{isReferenceWidget:!!n,ref:function(t){e.widgetEditDomManagerRef=t},onInstanceChange:this.onInstanceChange,onMount:this.props.onFormMount,number:i||-1*r,id:n,idBase:c,form:u})))}},{key:"trySetNonce",value:function(){var e=document.getElementById("_wpnonce_widgets");e&&e.value&&(this.widgetNonce=e.value)}},{key:"onInstanceChange",value:function(e){this.props.onInstanceChange(e,!0)}},{key:"requestWidgetForm",value:function(e,t){var r=this,n=this.props,i=n.id,c=n.idBase,o=n.instance,a=n.widgetClass,s=this.isStillMounted;if(i||a){if(i){var l=new Ue,u=new He;return u.append("action","save-widget"),u.append("id_base",c),u.append("widget-id",i),u.append("widget-width","250"),u.append("widget-height","200"),u.append("savewidgets",this.widgetNonce),l.open("POST",window.ajaxurl),l.addEventListener("load",(function(){if(s){var e=l.responseText;r.setState({form:e}),t&&t({form:e})}})),void l.send(u)}a&&We()({path:"/__experimental/widget-utils/form/".concat(encodeURIComponent(a),"/"),data:{instance:Ge(Ge({},o),e)},method:"POST"}).then((function(e){s&&(r.setState({form:e.form}),t&&t(e))}))}}}]),r}(a.Component),$e=Object(De.withInstanceId)(qe),Qe=Object(a.createElement)(ve.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(a.createElement)(ve.Path,{d:"M18.33 3.57s.27-.8-.31-1.36c-.53-.52-1.22-.24-1.22-.24-.61.3-5.76 3.47-7.67 5.57-.86.96-2.06 3.79-1.09 4.82.92.98 3.96-.17 4.79-1 2.06-2.06 5.21-7.17 5.5-7.79zM1.4 17.65c2.37-1.56 1.46-3.41 3.23-4.64.93-.65 2.22-.62 3.08.29.63.67.8 2.57-.16 3.46-1.57 1.45-4 1.55-6.15.89z"}));function Ye(e){var t,r=e.availableLegacyWidgets,n=e.currentWidget,i=e.hasPermissionsToManageWidgets,c=e.onChangeWidget,o=Object(a.useMemo)((function(){return Object(I.pickBy)(r,(function(e){return!e.isHidden}))}),[r]);return t=i?Object(I.isEmpty)(o)?Object(A.__)("There are no widgets available."):Object(a.createElement)(he.SelectControl,{label:Object(A.__)("Select a legacy widget to display:"),value:n||"none",onChange:c,options:[{value:"none",label:"Select widget"}].concat(Object(I.map)(o,(function(e,t){return{value:t,label:e.name}})))}):Object(A.__)("You don't have permissions to use widgets on this site."),Object(a.createElement)(he.Placeholder,{icon:Object(a.createElement)(je.BlockIcon,{icon:Qe}),label:Object(A.__)("Legacy Widget")},t)}var Ke=r(18);function Xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ze(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Je=function(e){var t=e.widgetAreaId,r=e.attributes,n=e.hidden,i=d(e,["widgetAreaId","attributes","hidden"]),c=ye(Object(a.useState)(300),2),o=c[0],s=c[1],l=Object(a.useRef)(),u=document.location.href,f=u.substr(0,u.indexOf("wp-admin/")),b=Object(Ke.addQueryArgs)(f,{widgetPreview:Ze(Ze({},r),{},{sidebarId:t})}),p=Object(a.useCallback)((function(){s(Object(I.get)(l.current,["contentDocument","body","scrollHeight"]))}),[]);return Object(a.useEffect)((function(){n||p()}),[n,p]),Object(a.createElement)(he.Disabled,{hidden:n},Object(a.createElement)(he.FocusableIframe,Ee({onLoad:function(){p()},src:b,height:o+20,iframeRef:l},i)))};var et=Object(u.withSelect)((function(e,t){var r,n=t.clientId,i=t.attributes,c=i.widgetClass,o=i.referenceWidgetName,a=e("core/edit-widgets").getWidgetIdForClientId(n),s=e("core/edit-widgets").getWidget(a),l=e("core/edit-widgets").getWidgetAreaForClientId(n),u=e("core/block-editor").getSettings(),d=u.availableLegacyWidgets,f=u.hasPermissionsToManageWidgets;return a&&d[a]?r=d[a]:c&&d[c]?r=d[c]:o&&(r=d[o],a=o),{hasPermissionsToManageWidgets:f,availableLegacyWidgets:d,widgetId:a,widgetAreaId:null==l?void 0:l.id,WPWidget:r,prerenderedEditForm:s?s.rendered_form:""}}))((function(e){var t=e.attributes,r=e.availableLegacyWidgets,n=e.hasPermissionsToManageWidgets,i=e.prerenderedEditForm,c=e.setAttributes,o=e.widgetId,s=e.WPWidget,l=e.widgetAreaId,u=ye(Object(a.useState)(!0),2),d=u[0],f=u[1],b=ye(Object(a.useState)(!1),2),p=b[0],m=b[1],g=!p&&d;function v(){m(!1)}if(!s)return Object(a.createElement)(Ye,{availableLegacyWidgets:r,hasPermissionsToManageWidgets:n,onChangeWidget:function(e){var t=r[e],n=t.isReferenceWidget,i=t.id_base;c(n?{instance:{},idBase:i,referenceWidgetName:e,widgetClass:void 0}:{instance:{},idBase:i,referenceWidgetName:void 0,widgetClass:e})}});var O=s?Object(a.createElement)(je.InspectorControls,null,Object(a.createElement)(he.PanelBody,{title:s.name},s.description)):null;return n?Object(a.createElement)(a.Fragment,null,Object(a.createElement)(je.BlockControls,null,Object(a.createElement)(he.ToolbarGroup,null,s&&!s.isHidden&&Object(a.createElement)(he.Button,{onClick:function(){v(),c({instance:{},id:void 0,widgetClass:void 0}),f(!0)},label:Object(A.__)("Change widget"),icon:we.a}),d&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(he.Button,{className:"components-tab-button",isPressed:!p,onClick:v},Object(a.createElement)("span",null,Object(A.__)("Edit"))),Object(a.createElement)(he.Button,{className:"components-tab-button",isPressed:p,onClick:function(){m(!0)}},Object(a.createElement)("span",null,Object(A.__)("Preview")))))),O,d&&Object(a.createElement)($e,{isVisible:!p,id:o,idBase:t.idBase||o,number:t.number,prerenderedEditForm:i,widgetName:Object(I.get)(s,["name"]),widgetClass:t.widgetClass,instance:t.instance,onFormMount:function(e){t.widgetClass||c({instance:e})},onInstanceChange:function(e,t){e&&c({instance:e}),f(t)}}),(null==s?void 0:s.isReferenceWidget)?Object(a.createElement)("p",{hidden:g},Object(A.__)("Reference widgets cannot be previewed.")):Object(a.createElement)(Je,{hidden:g,className:"wp-block-legacy-widget__preview",widgetAreaId:l,attributes:Object(I.omit)(t,"widgetId")})):Object(a.createElement)(a.Fragment,null,O,Object(a.createElement)(Je,{className:"wp-block-legacy-widget__preview",widgetAreaId:l,attributes:Object(I.omit)(t,"widgetId")}))})),tt={to:[{block:"core/calendar",widget:"WP_Widget_Calendar"},{block:"core/search",widget:"WP_Widget_Search"},{block:"core/html",widget:"WP_Widget_Custom_HTML",transform:function(e){return{content:e.content}}},{block:"core/archives",widget:"WP_Widget_Archives",transform:function(e){var t=e.count;return{displayAsDropdown:!!e.dropdown,showPostCounts:!!t}}},{block:"core/latest-posts",widget:"WP_Widget_Recent_Posts",transform:function(e){return{displayPostDate:!!e.show_date,postsToShow:e.number}}},{block:"core/latest-comments",widget:"WP_Widget_Recent_Comments",transform:function(e){return{commentsToShow:e.number}}},{block:"core/tag-cloud",widget:"WP_Widget_Tag_Cloud",transform:function(e){var t=e.taxonomy;return{showTagCounts:!!e.count,taxonomy:t}}},{block:"core/categories",widget:"WP_Widget_Categories",transform:function(e){var t=e.count;return{displayAsDropdown:!!e.dropdown,showPostCounts:!!t,showHierarchy:!!e.hierarchical}}},{block:"core/audio",widget:"WP_Widget_Media_Audio",transform:function(e){var t=e.url,r=e.preload,n=e.loop;return{src:t,id:e.attachment_id,preload:r,loop:n}}},{block:"core/video",widget:"WP_Widget_Media_Video",transform:function(e){var t=e.url,r=e.preload,n=e.loop;return{src:t,id:e.attachment_id,preload:r,loop:n}}},{block:"core/image",widget:"WP_Widget_Media_Image",transform:function(e){var t=e.alt,r=e.attachment_id,n=e.caption,i=e.height,c=e.link_classes,o=e.link_rel,a=e.link_target_blank,s=e.link_type;return{alt:t,caption:n,height:i,id:r,link:e.link_url,linkClass:c,linkDestination:s,linkTarget:a?"_blank":void 0,rel:o,sizeSlug:e.size,url:e.url,width:e.width}}},{block:"core/gallery",widget:"WP_Widget_Media_Gallery",transform:function(e){var t=e.ids,r=e.link_type,n=e.size;return{ids:t,columns:e.number,linkTo:r,sizeSlug:n,images:t.map((function(e){return{id:e}}))}}},{block:"core/rss",widget:"WP_Widget_RSS",transform:function(e){return{feedURL:e.url,displayAuthor:!!e.show_author,displayDate:!!e.show_date,displayExcerpt:!!e.show_summary,itemsToShow:e.items}}}].map((function(e){var t=e.block,r=e.widget,n=e.transform;return{type:"block",blocks:[t],isMatch:function(e){return e.widgetClass===r},transform:function(e){var r=e.instance,i=Object(s.createBlock)(t,n?n(r):void 0);return r&&r.title?[Object(s.createBlock)("core/heading",{content:r.title}),i]:i}}}))};function rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function nt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var it={name:"core/legacy-widget",category:"widgets",attributes:{widgetClass:{type:"string"},referenceWidgetName:{type:"string"},idBase:{type:"string"},number:{type:"number"},instance:{type:"object"}},supports:{html:!1,customClassName:!1}},ct=it.name,ot={title:Object(A.__)("Legacy Widget (Experimental)"),description:Object(A.__)("Display a legacy widget."),icon:Oe,edit:et,transforms:tt};function at(e){var t=[];for(var r in e){var n=e[r];n.isHidden||t.push(st(r,n))}return t}function st(e,t){var r={attributes:{},category:"widgets",description:t.description,icon:ot.icon,name:e,title:t.name};return t.isReferenceWidget?r.attributes={referenceWidgetName:e,instance:{}}:r.attributes={idBase:t.id_base,widgetClass:e,instance:{}},r}var lt=r(128),ut=r(47),dt=r(55),ft=r(42);function bt(){var e=Object(u.useDispatch)("core"),t=e.redo,r=e.undo;return Object(ft.useShortcut)("core/edit-widgets/undo",(function(e){r(),e.preventDefault()}),{bindGlobal:!0}),Object(ft.useShortcut)("core/edit-widgets/redo",(function(e){t(),e.preventDefault()}),{bindGlobal:!0}),null}bt.Register=function(){var e=Object(u.useDispatch)("core/keyboard-shortcuts").registerShortcut;return Object(a.useEffect)((function(){e({name:"core/edit-widgets/undo",category:"global",description:Object(A.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/edit-widgets/redo",category:"global",description:Object(A.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}})}),[e]),null};var pt=bt,mt=r(38);function gt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ot(e){var t=e.blockEditorSettings,r=d(e,["blockEditorSettings"]),n=Object(u.useSelect)((function(e){return{hasUploadPermissions:Object(I.defaultTo)(e("core").canUser("create","media"),!0),widgetAreas:e("core/edit-widgets").getWidgetAreas()}})).hasUploadPermissions,i=Object(a.useMemo)((function(){var e;return n&&(e=function(e){var r=e.onError,n=d(e,["onError"]);Object(ge.uploadMedia)(vt({wpAllowedMimeTypes:t.allowedMimeTypes,onError:function(e){var t=e.message;return r(t)}},n))}),vt(vt({},t),{},{mediaUpload:e,templateLock:"all"})}),[t,n]),c=ye(Object(mt.useEntityBlockEditor)(h,"postType",{id:"widget-areas"}),3),o=c[0],s=c[1],l=c[2];return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(je.BlockEditorKeyboardShortcuts.Register,null),Object(a.createElement)(pt.Register,null),Object(a.createElement)(he.SlotFillProvider,null,Object(a.createElement)(he.DropZoneProvider,null,Object(a.createElement)(he.FocusReturnProvider,null,Object(a.createElement)(je.BlockEditorProvider,Ee({value:o,onInput:s,onChange:l,settings:i},r))))))}var yt=r(158);var ht=function(){var e=Object(u.useSelect)((function(e){var t,r=e("core/edit-widgets"),n=r.getEditedWidgetAreas,i=r.isSavingWidgetAreas;return{hasEditedWidgetAreaIds:(null===(t=n())||void 0===t?void 0:t.length)>0,isSaving:i()}}),[]),t=e.hasEditedWidgetAreaIds,r=e.isSaving,n=Object(u.useDispatch)("core/edit-widgets").saveEditedWidgetAreas;return Object(a.createElement)(he.Button,{isPrimary:!0,isBusy:r,"aria-disabled":r,onClick:r?void 0:n,disabled:!t},r?Object(A.__)("Saving…"):Object(A.__)("Update"))},jt=r(255),wt=r(12);var Et=Object(a.forwardRef)((function(e,t){var r=Object(u.useSelect)((function(e){return e("core").hasUndo()})),n=Object(u.useDispatch)("core").undo;return Object(a.createElement)(he.Button,Ee({icon:jt.a,label:Object(A.__)("Undo"),shortcut:wt.displayShortcut.primary("z"),"aria-disabled":!r,onClick:r?n:void 0,ref:t},e))})),_t=r(256);var St=Object(a.forwardRef)((function(e,t){var r=Object(u.useSelect)((function(e){return e("core").hasRedo()})),n=Object(u.useDispatch)("core").redo;return Object(a.createElement)(he.Button,Ee({icon:_t.a,label:Object(A.__)("Redo"),shortcut:wt.displayShortcut.primaryShift("z"),"aria-disabled":!r,onClick:r?n:void 0,ref:t},e))})),kt=function(){var e=Object(u.useSelect)((function(e){var t,r=(0,e("core").getEntityRecord)(h,"postType","widget-areas");return null==r||null===(t=r.blocks[0])||void 0===t?void 0:t.clientId}),[]);return Object(u.useSelect)((function(e){var t=e("core/block-editor"),r=t.getBlockRootClientId,n=(0,t.getBlockSelectionEnd)(),i=r(n);return""===i?n:i}),[])||e};var Pt=function(){var e=Object(a.useRef)(),t=Object(De.useViewportMatch)("medium"),r=Object(u.useSelect)((function(e){return e("core/edit-widgets").getIsWidgetAreaOpen(l)}),[l]),n=Object(u.useSelect)((function(e){return e("core/edit-widgets").isInserterOpened()})),i=Object(u.useDispatch)("core/edit-widgets"),c=i.setIsWidgetAreaOpen,o=i.setIsInserterOpened,s=Object(u.useDispatch)("core/block-editor").selectBlock,l=kt();return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"edit-widgets-header"},Object(a.createElement)("div",{className:"edit-widgets-header__navigable-toolbar-wrapper"},Object(a.createElement)("h1",{className:"edit-widgets-header__title"},Object(A.__)("Widgets")),Object(a.createElement)(je.NavigableToolbar,{className:"edit-widgets-header-toolbar","aria-label":Object(A.__)("Document tools")},Object(a.createElement)(he.ToolbarItem,{ref:e,as:he.Button,className:"edit-widgets-header-toolbar__inserter-toggle",isPrimary:!0,isPressed:n,onMouseDown:function(e){e.preventDefault()},onClick:function(){n?e.current.focus():(r||(s(l),c(l,!0)),window.requestAnimationFrame((function(){return o(!0)})))},icon:yt.a
|
|
|
|
|
2 |
/* translators: button label text should, if possible, be under 16
|
3 |
-
characters. */,label:Object(A._x)("Add block","Generic label for block inserter button")}),Object(a.createElement)(he.ToolbarItem,{as:Et}),Object(a.createElement)(he.ToolbarItem,{as:St}),Object(a.createElement)(he.ToolbarItem,{as:je.BlockNavigationDropdown}))),Object(a.createElement)("div",{className:"edit-widgets-header__actions"},Object(a.createElement)(ht,null),Object(a.createElement)(ut.f.Slot,{scope:"core/edit-widgets"}))),!t&&Object(a.createElement)("div",{className:"edit-widgets-header__block-toolbar"},Object(a.createElement)(je.BlockToolbar,{hideDragHandle:!0})))},It=r(7),At=r.n(It),Ct=r(197),Rt=r(157);function xt(e){var t=e.clientId,r=Object(u.useSelect)((function(e){var r=e("core/block-editor"),n=r.getBlockAttributes,i=r.getBlockSelectionStart;return{name:n(t).name,selectedBlock:i()}}),[t]),n=r.name,i=r.selectedBlock,c=Object(u.useDispatch)("core/block-editor").selectBlock,o=i===t;return Object(a.createElement)("li",null,Object(a.createElement)(he.Button,{"aria-expanded":o,onClick:o?void 0:function(){c(t)}},n,Object(a.createElement)("span",{className:"edit-widgets-block-areas__edit"},Object(A.__)("Edit"))))}function Nt(){var e=Object(u.useSelect)((function(e){return e("core/block-editor").getBlockOrder()})),t=e.length>0;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"edit-widgets-block-areas"},Object(a.createElement)("div",{className:"edit-widgets-block-areas__top-container"},Object(a.createElement)(je.BlockIcon,{icon:Rt.a}),Object(a.createElement)("div",null,Object(a.createElement)("p",null,Object(A.__)('Block Areas (also known as "Widget Areas") are global parts in your site\'s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.')),!t&&Object(a.createElement)("p",null,Object(A.__)("Your theme does not contain block areas.")))),t&&Object(a.createElement)("ul",null,e.map((function(e){return Object(a.createElement)(xt,{key:e,clientId:e})})))))}var Wt=a.Platform.select({web:!0,native:!1}),Dt={"edit-widgets/block-areas":Object(A.__)("Block areas"),"edit-widgets/block-inspector":Object(A.__)("Block")};function Tt(e){var t=e.activeComplementaryArea,r=Object(u.useDispatch)("core/interface").enableComplementaryArea;return Object(a.createElement)("ul",null,Object(I.map)(Dt,(function(e,n){var i=n===t;return Object(a.createElement)("li",{key:n},Object(a.createElement)(he.Button,{onClick:function(){return r("core/edit-widgets",n)},className:At()("edit-widgets-sidebar__panel-tab",{"is-active":i}),"aria-label":i?// translators: %s: sidebar label e.g: "Block areas".
|
4 |
-
Object(A.sprintf)(Object(A.__)("%s (selected)"),e):e,"data-label":e},e))})))}function Bt(){var e=Object(u.useDispatch)("core/interface").enableComplementaryArea,t=Object(u.useSelect)((function(e){var t=e("core/interface").getActiveComplementaryArea("core/edit-widgets"),r=!!t,n=e("core/block-editor"),i=n.getBlockSelectionStart,c=n.getBlockRootClientId,o=i();return Dt[t]||(t=o?"edit-widgets/block-inspector":"edit-widgets/block-areas"),{currentArea:t,hasSelectedNonAreaBlock:!(!o||!c(o)),isGeneralSidebarOpen:r}}),[]),r=t.currentArea,n=t.hasSelectedNonAreaBlock,i=t.isGeneralSidebarOpen;return Object(a.useEffect)((function(){n&&"edit-widgets/block-areas"===r&&i&&e("core/edit-widgets","edit-widgets/block-inspector"),!n&&"edit-widgets/block-inspector"===r&&i&&e("core/edit-widgets","edit-widgets/block-areas")}),[n,e]),Object(a.createElement)(ut.b,{className:"edit-widgets-sidebar",header:Object(a.createElement)(Tt,{activeComplementaryArea:r}),headerClassName:"edit-widgets-sidebar__panel-tabs"
|
5 |
-
/* translators: button label text should, if possible, be under 16 characters. */,title:Object(A.__)("Settings"),closeLabel:Object(A.__)("Close settings"),scope:"core/edit-widgets",identifier:r,icon:Ct.a,isActiveByDefault:Wt},"edit-widgets/block-areas"===r&&Object(a.createElement)(Nt,null),"edit-widgets/block-inspector"===r&&Object(a.createElement)(je.BlockInspector,null))}var Mt=function(){var e=Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices()}}),[]).notices,t=Object(I.filter)(e,{type:"snackbar"}),r=Object(u.useDispatch)("core/notices").removeNotice;return Object(a.createElement)(he.SnackbarList,{notices:t,className:"edit-widgets-notices__snackbar",onRemove:r})};function Lt(){var e=Object(u.useDispatch)("core/block-editor").clearSelectedBlock;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(pt,null),Object(a.createElement)(je.BlockEditorKeyboardShortcuts,null),Object(a.createElement)(Mt,null),Object(a.createElement)(he.Popover.Slot,{name:"block-toolbar"}),Object(a.createElement)("div",{tabIndex:"-1",onFocus:e},Object(a.createElement)("div",{className:"editor-styles-wrapper",onFocus:function(e){e.stopPropagation(),e.preventDefault()}},Object(a.createElement)(je.WritingFlow,null,Object(a.createElement)(je.ObserveTyping,null,Object(a.createElement)(je.BlockList,{className:"edit-widgets-main-block-list"}))))))}function Ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=xe(e);if(t){var i=xe(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Re(this,r)}}function Gt(e){e.stopPropagation()}var Vt=Object(he.withFocusOutside)(function(e){Ae(r,e);var t=Ft(r);function r(){return _e(this,r),t.apply(this,arguments)}return ke(r,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),r}(a.Component)),zt=Object(he.withConstrainedTabbing)(Object(he.withFocusReturn)((function(e){return e.children})));function Ut(e){var t=e.onClose,r=e.children,n=e.className;return Object(a.createElement)("div",{className:n,onKeyDown:function(e){e.keyCode===wt.ESCAPE&&t&&(e.stopPropagation(),t())},onMouseDown:Gt},Object(a.createElement)(Vt,{onFocusOutside:t},Object(a.createElement)(zt,null,r)))}var Ht=function(e){var t=e.blockEditorSettings,r=Object(De.useViewportMatch)("medium","<"),n=Object(De.useViewportMatch)("huge",">="),i=Object(u.useDispatch)("core/edit-widgets"),c=i.setIsInserterOpened,o=i.closeGeneralSidebar,s=kt(),l=Object(u.useSelect)((function(e){return{hasSidebarEnabled:!!e("core/interface").getActiveComplementaryArea("core/edit-widgets"),isInserterOpened:!!e("core/edit-widgets").isInserterOpened()}})),d=l.hasSidebarEnabled,f=l.isInserterOpened;return Object(a.useEffect)((function(){d&&!n&&c(!1)}),[d,n]),Object(a.useEffect)((function(){f&&!n&&o()}),[f,n]),Object(a.createElement)(Ot,{blockEditorSettings:t},Object(a.createElement)(ut.e,{header:Object(a.createElement)(Pt,null),leftSidebar:f&&Object(a.createElement)(Ut,{className:"edit-widgets-layout__inserter-panel-popover-wrapper",onClose:function(){return c(!1)}},Object(a.createElement)("div",{className:"edit-widgets-layout__inserter-panel"},Object(a.createElement)("div",{className:"edit-widgets-layout__inserter-panel-header"},Object(a.createElement)(he.Button,{icon:lt.a,onClick:function(){return c(!1)}})),Object(a.createElement)("div",{className:"edit-widgets-layout__inserter-panel-content"},Object(a.createElement)(je.__experimentalLibrary,{showInserterHelpPanel:!0,onSelect:function(){r&&c(!1)},rootClientId:s})))),sidebar:d&&Object(a.createElement)(ut.b.Slot,{scope:"core/edit-widgets"}),content:Object(a.createElement)(Lt,{blockEditorSettings:t})}),Object(a.createElement)(Bt,null),Object(a.createElement)(he.Popover.Slot,null),Object(a.createElement)(dt.PluginArea,null))};var qt=function(e){var t=e.settings;return Object(a.createElement)(Ht,{blockEditorSettings:t})};function $t(e,t){var r,n,i;Object(l.registerCoreBlocks)(),Object(l.__experimentalRegisterExperimentalCoreBlocks)(t),Qt((i=null!==(n=null==(r=t)?void 0:r.availableLegacyWidgets)&&void 0!==n?n:{},{metadata:it,name:ct,settings:nt(nt({},ot),{},{variations:at(i)})})),Object(a.render)(Object(a.createElement)(qt,{settings:t}),document.getElementById(e))}var Qt=function(e){if(e){var t=e.metadata,r=e.settings,n=e.name;t&&Object(s.unstable__bootstrapServerSideBlockDefinitions)(o({},n,t)),Object(s.registerBlockType)(n,r)}}},42:function(e,t){!function(){e.exports=this.wp.keyboardShortcuts}()},47:function(e,t,r){"use strict";r.d(t,"b",(function(){return L})),r.d(t,"c",(function(){return q})),r.d(t,"d",(function(){return ee})),r.d(t,"e",(function(){return ne})),r.d(t,"f",(function(){return T})),r.d(t,"g",(function(){return le})),r.d(t,"a",(function(){return H}));var n={};r.r(n),r.d(n,"enableComplementaryArea",(function(){return b})),r.d(n,"disableComplementaryArea",(function(){return p})),r.d(n,"pinItem",(function(){return g})),r.d(n,"unpinItem",(function(){return v}));var i={};r.r(i),r.d(i,"getActiveComplementaryArea",(function(){return O})),r.d(i,"isItemPinned",(function(){return y}));var c=r(4);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r(2);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=Object(c.combineReducers)({singleEnableItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.itemType,i=t.scope,c=t.item;return"SET_SINGLE_ENABLE_ITEM"===r&&n&&i?l(l({},e),{},o({},n,l(l({},e[n]),{},o({},i,c||null)))):e},multipleEnableItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.itemType,i=t.scope,c=t.item,s=t.isEnable;if("SET_MULTIPLE_ENABLE_ITEM"!==r||!n||!i||!c||Object(a.get)(e,[n,i,c])===s)return e;var u=e[n]||{},d=u[i]||{};return l(l({},e),{},o({},n,l(l({},u),{},o({},i,l(l({},d),{},o({},c,s||!1))))))}}),d=Object(c.combineReducers)({enableItems:u});function f(e,t,r){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:r}}function b(e,t){return f("complementaryArea",e,t)}function p(e){return f("complementaryArea",e,void 0)}function m(e,t,r,n){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:r,isEnable:n}}function g(e,t){return m("pinnedItems",e,t,!0)}function v(e,t){return m("pinnedItems",e,t,!1)}function O(e,t){return function(e,t,r){return Object(a.get)(e.enableItems.singleEnableItems,[t,r])}(e,"complementaryArea",t)}function y(e,t,r){return!1!==function(e,t,r,n){return Object(a.get)(e.enableItems.multipleEnableItems,[t,r,n])}(e,"pinnedItems",t,r)}Object(c.registerStore)("core/interface",{reducer:d,actions:n,selectors:i,persist:["enableItems"]});function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function j(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var w=r(0),E=r(7),_=r.n(E),S=r(3),k=r(1),P=r(129),I=r(180),A=r(181),C=r(145),R=r(55),x=Object(R.withPluginContext)((function(e,t){return{icon:t.icon||e.icon,identifier:t.identifier||"".concat(e.name,"/").concat(t.name)}}));var N=x((function(e){var t=e.as,r=void 0===t?S.Button:t,n=e.scope,i=e.identifier,o=e.icon,s=e.selectedIcon,l=j(e,["as","scope","identifier","icon","selectedIcon"]),u=r,d=Object(c.useSelect)((function(e){return e("core/interface").getActiveComplementaryArea(n)===i}),[i]),f=Object(c.useDispatch)("core/interface"),b=f.enableComplementaryArea,p=f.disableComplementaryArea;return Object(w.createElement)(u,h({icon:s&&d?s:o,onClick:function(){d?p(n):b(n,i)}},Object(a.omit)(l,["name"])))})),W=function(e){var t=e.smallScreenTitle,r=e.children,n=e.className,i=e.toggleButtonProps,c=Object(w.createElement)(N,h({icon:C.a},i));return Object(w.createElement)(w.Fragment,null,Object(w.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},t&&Object(w.createElement)("span",{className:"interface-complementary-area-header__small-title"},t),c),Object(w.createElement)("div",{className:_()("components-panel__header","interface-complementary-area-header",n),tabIndex:-1},r,c))};function D(e){var t=e.scope,r=j(e,["scope"]);return Object(w.createElement)(S.Fill,h({name:"PinnedItems/".concat(t)},r))}D.Slot=function(e){var t=e.scope,r=e.className,n=j(e,["scope","className"]);return Object(w.createElement)(S.Slot,h({name:"PinnedItems/".concat(t)},n),(function(e){return!Object(a.isEmpty)(e)&&Object(w.createElement)("div",{className:_()(r,"interface-pinned-items")},e)}))};var T=D;function B(e){var t=e.scope,r=e.children,n=e.className;return Object(w.createElement)(S.Fill,{name:"ComplementaryArea/".concat(t)},Object(w.createElement)(S.Animate,{type:"slide-in",options:{origin:"left"}},(function(){return Object(w.createElement)("div",{className:n},r)})))}var M=x((function(e){var t=e.children,r=e.className,n=e.closeLabel,i=void 0===n?Object(k.__)("Close plugin"):n,o=e.identifier,a=e.header,s=e.headerClassName,l=e.icon,u=e.isPinnable,d=void 0===u||u,f=e.panelClassName,b=e.scope,p=e.smallScreenTitle,m=e.title,g=e.toggleShortcut,v=e.isActiveByDefault,O=e.showIconLabels,y=void 0!==O&&O,h=Object(c.useSelect)((function(e){var t=e("core/interface"),r=t.getActiveComplementaryArea,n=t.isItemPinned,i=r(b);return{isActive:i===o,isPinned:n(b,o),activeArea:i,isSmall:e("core/viewport").isViewportMatch("< medium"),isLarge:e("core/viewport").isViewportMatch("large")}}),[o,b]),j=h.isActive,E=h.isPinned,C=h.activeArea,R=h.isSmall,x=h.isLarge;!function(e,t,r,n,i){var o=Object(w.useRef)(!1),a=Object(w.useRef)(!1),s=Object(c.useDispatch)("core/interface"),l=s.enableComplementaryArea,u=s.disableComplementaryArea;Object(w.useEffect)((function(){n&&i&&!o.current?(u(e),a.current=!0):a.current&&!i&&o.current?(a.current=!1,l(e,t)):a.current&&r&&r!==t&&(a.current=!1),i!==o.current&&(o.current=i)}),[n,i,e,t,r])}(b,o,C,j,R);var D=Object(c.useDispatch)("core/interface"),M=D.enableComplementaryArea,L=D.disableComplementaryArea,F=D.pinItem,G=D.unpinItem;return Object(w.useEffect)((function(){v&&void 0===C&&!R&&M(b,o)}),[C,v,b,o,R]),Object(w.createElement)(w.Fragment,null,E&&d&&Object(w.createElement)(T,{scope:b},Object(w.createElement)(N,{scope:b,identifier:o,isPressed:j&&(!y||x),"aria-expanded":j,label:m,icon:y?P.a:l,showTooltip:!y})),j&&Object(w.createElement)(B,{className:_()("interface-complementary-area",r),scope:b},Object(w.createElement)(W,{className:s,closeLabel:i,onClose:function(){return L(b)},smallScreenTitle:p,toggleButtonProps:{label:i,shortcut:g,scope:b,identifier:o}},a||Object(w.createElement)(w.Fragment,null,Object(w.createElement)("strong",null,m),d&&Object(w.createElement)(S.Button,{className:"interface-complementary-area__pin-unpin-item",icon:E?I.a:A.a,label:E?Object(k.__)("Unpin from toolbar"):Object(k.__)("Pin to toolbar"),onClick:function(){return(E?G:F)(b,o)},isPressed:E,"aria-expanded":E}))),Object(w.createElement)(S.Panel,{className:f},t)))}));M.Slot=function(e){var t=e.scope,r=j(e,["scope"]);return Object(w.createElement)(S.Slot,h({name:"ComplementaryArea/".concat(t)},r))};var L=M;function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function G(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,c=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,c=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw c}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?F(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function U(e){var t=e.name,r=e.as,n=e.onClick,i=j(e,["name","as","onClick"]);return Object(w.createElement)(S.Fill,{name:t},(function(e){var t=e.onClick,c=e.as,o=r||c||S.Button;return Object(w.createElement)(o,h({onClick:n||t?function(){(n||a.noop).apply(void 0,arguments),(t||a.noop).apply(void 0,arguments)}:void 0},i))}))}U.Slot=function(e){var t=e.name,r=e.as,n=void 0===r?[S.ButtonGroup,S.Button]:r,i=e.fillProps,c=void 0===i?{}:i,o=e.bubblesVirtually,s=j(e,["name","as","fillProps","bubblesVirtually"]),l=G(n,2),u=l[0],d=l[1];return Object(w.createElement)(S.Slot,{name:t,bubblesVirtually:o,fillProps:z({as:d},c)},(function(e){return!Object(a.isEmpty)(e)&&Object(w.createElement)(u,s,e)}))};var H=U;function q(e){var t=e.scope,r=e.target,n=j(e,["scope","target"]);return Object(w.createElement)(N,h({as:function(e){return Object(w.createElement)(H,h({name:"".concat(t,"/plugin-more-menu")},e))},role:"menuitemcheckbox",selectedIcon:P.a,name:r,scope:t},n))}function $(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(e){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(e,t){return!t||"object"!==K(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function J(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Z(e);if(t){var i=Z(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return X(this,r)}}var ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Y(e,t)}(c,e);var t,r,n,i=J(c);function c(){return $(this,c),i.apply(this,arguments)}return t=c,(r=[{key:"componentDidMount",value:function(){this.isSticky=!1,this.sync(),document.body.classList.contains("sticky-menu")&&(this.isSticky=!0,document.body.classList.remove("sticky-menu"))}},{key:"componentWillUnmount",value:function(){this.isSticky&&document.body.classList.add("sticky-menu")}},{key:"componentDidUpdate",value:function(e){this.props.isActive!==e.isActive&&this.sync()}},{key:"sync",value:function(){this.props.isActive?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode")}},{key:"render",value:function(){return null}}])&&Q(t.prototype,r),n&&Q(t,n),c}(w.Component);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=Object(S.navigateRegions)((function(e){var t=e.footer,r=e.header,n=e.sidebar,i=e.leftSidebar,c=e.content,o=e.actions,a=e.labels,s=e.className;!function(e){Object(w.useEffect)((function(){var t=document&&document.querySelector("html:not(.".concat(e,")"));if(t)return t.classList.toggle(e),function(){t.classList.toggle(e)}}),[e])}("interface-interface-skeleton__html-container");var l=re(re({},{
|
6 |
/* translators: accessibility text for the top bar landmark region. */
|
7 |
header:Object(k.__)("Header"),
|
8 |
/* translators: accessibility text for the content landmark region. */
|
1 |
+
this.wp=this.wp||{},this.wp.editWidgets=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=408)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},12:function(e,t){!function(){e.exports=this.wp.keycodes}()},128:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},129:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},145:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));t.a=c},157:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=c},158:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=c},18:function(e,t){!function(){e.exports=this.wp.url}()},180:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));t.a=c},181:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}));t.a=c},197:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}));t.a=c},2:function(e,t){!function(){e.exports=this.lodash}()},25:function(e,t){!function(){e.exports=this.wp.hooks}()},255:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));t.a=c},256:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"}));t.a=c},287:function(e,t,r){"use strict";var n=r(0),i=r(6),c=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(n.createElement)(i.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.a=c},3:function(e,t){!function(){e.exports=this.wp.components}()},31:function(e,t){!function(){e.exports=this.wp.apiFetch}()},38:function(e,t){!function(){e.exports=this.wp.coreData}()},4:function(e,t){!function(){e.exports=this.wp.data}()},408:function(e,t,r){"use strict";r.r(t),r.d(t,"initialize",(function(){return Xt}));var n={};r.r(n),r.d(n,"initializeState",(function(){return U})),r.d(n,"persistStubPost",(function(){return H})),r.d(n,"saveEditedWidgetAreas",(function(){return q})),r.d(n,"saveWidgetAreas",(function(){return $})),r.d(n,"setWidgetIdForClientId",(function(){return Y})),r.d(n,"setWidgetAreasOpenState",(function(){return K})),r.d(n,"setIsWidgetAreaOpen",(function(){return X})),r.d(n,"setIsInserterOpened",(function(){return Z})),r.d(n,"closeGeneralSidebar",(function(){return J}));var i={};r.r(i),r.d(i,"getWidgetAreas",(function(){return ne}));var c={};function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.r(c),r.d(c,"getWidgets",(function(){return oe})),r.d(c,"getWidget",(function(){return ae})),r.d(c,"getWidgetAreas",(function(){return se})),r.d(c,"getWidgetIdForClientId",(function(){return le})),r.d(c,"getWidgetAreaForClientId",(function(){return ue})),r.d(c,"getEditedWidgetAreas",(function(){return de})),r.d(c,"isSavingWidgetAreas",(function(){return fe})),r.d(c,"hasResolvedWidgetAreas",(function(){return be})),r.d(c,"getIsWidgetAreaOpen",(function(){return pe})),r.d(c,"isInserterOpened",(function(){return me}));var a=r(0),s=r(8),l=(r(74),r(79)),u=r(4);function d(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=Object(u.combineReducers)({mapping:function(e,t){var r=t.type,n=d(t,["type"]);if("SET_WIDGET_TO_CLIENT_ID_MAPPING"===r)return n.mapping;if("SET_WIDGET_ID_FOR_CLIENT_ID"===r){var i=b({},e);return i[t.widgetId]=t.clientId,i}return e||{}},isInserterOpened:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_IS_INSERTER_OPENED":return t.value}return e},widgetAreasOpenState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type;switch(r){case"SET_WIDGET_AREAS_OPEN_STATE":return t.widgetAreasOpenState;case"SET_IS_WIDGET_AREA_OPEN":var n=t.clientId,i=t.isOpen;return b(b({},e),{},o({},n,i));default:return e}}}),m=r(13),g=r.n(m);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function O(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function y(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||O(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var h="root",j=function(e){return"widget-area-".concat(e)};var w=function(e,t){return{id:e,slug:e,status:"draft",type:"page",blocks:t,meta:{widgetAreaId:e}}};function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"RESOLVE_WIDGET_AREAS",query:e}}function _(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return{type:"SELECT",registryName:e,selectorName:t,args:n}}function S(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return{type:"DISPATCH",registryName:e,actionName:t,args:n}}var k={SELECT:Object(u.createRegistryControl)((function(e){return function(t){var r,n=t.registryName,i=t.selectorName,c=t.args;return(r=e.select(n))[i].apply(r,y(c))}})),GET_PENDING_ACTIONS:Object(u.createRegistryControl)((function(e){return function(t){var r,n=t.postId;return(null===(r=I(e).processingQueue[n])||void 0===r?void 0:r.pendingActions)||[]}})),IS_PROCESSING_POST:Object(u.createRegistryControl)((function(e){return function(t){var r,n=t.postId;return null===(r=I(e).processingQueue[n])||void 0===r?void 0:r.inProgress}})),GET_WIDGET_TO_CLIENT_ID_MAPPING:Object(u.createRegistryControl)((function(e){return function(){return I(e).mapping||{}}})),DISPATCH:Object(u.createRegistryControl)((function(e){return function(t){var r,n=t.registryName,i=t.actionName,c=t.args;return(r=e.dispatch(n))[i].apply(r,y(c))}})),RESOLVE_WIDGET_AREAS:Object(u.createRegistryControl)((function(e){return function(t){var r=t.query;return e.__experimentalResolveSelect("core").getEntityRecords(h,"sidebar",r)}}))},I=function(e){return e.stores["core/edit-widgets"].store.getState()},P=k,A=r(2),C=r(1);function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function N(e){if("WP_Widget_Block"===e.widget_class){var t=Object(s.parse)(e.settings.content);return t.length?t[0]:Object(s.createBlock)("core/paragraph",{},[])}var r={form:e.form,instance:e.settings,idBase:e.id_base,number:e.number};return!e.widget_class?r.referenceWidgetName=e.id:r.widgetClass=e.widget_class,Object(s.createBlock)("core/legacy-widget",r,[])}function W(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.name;return"core/legacy-widget"===n?(delete(t=e.attributes.referenceWidgetName?T(e,r):D(e,r)).form,delete t.rendered,t):R(R({},r),{},{id_base:"block",widget_class:"WP_Widget_Block",settings:{content:Object(s.serialize)(e)}})}function D(e,t){var r=e.attributes;return R(R({},t),{},{widget_class:r.widgetClass,id_base:r.idBase,settings:r.instance})}function T(e,t){var r=e.attributes;return R(R({},t),{},{id:r.referenceWidgetName,settings:r.instance})}function B(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return M(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return M(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw c}}}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var L=g.a.mark(U),F=g.a.mark(q),G=g.a.mark($),V=g.a.mark(Q),z=g.a.mark(J);function U(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,H("widget-areas",[]);case 2:case"end":return e.stop()}}),L)}var H=g.a.mark((function e(t,r){var n,i;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=w(t,r),i=[h,"postType",t],e.next=4,S("core","startResolution","getEntityRecord",i);case 4:return e.next=6,S("core","receiveEntityRecords",h,"postType",n,{id:n.id},!1);case 6:return e.next=8,S("core","finishResolution","getEntityRecord",i);case 8:return e.abrupt("return",n);case 9:case"end":return e.stop()}}),e)}));function q(){var e;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_("core/edit-widgets","getEditedWidgetAreas");case 2:if(null==(e=t.sent)?void 0:e.length){t.next=5;break}return t.abrupt("return");case 5:return t.prev=5,t.delegateYield($(e),"t0",7);case 7:return t.next=9,S("core/notices","createSuccessNotice",Object(C.__)("Widgets saved."),{type:"snackbar"});case 9:t.next=15;break;case 11:return t.prev=11,t.t1=t.catch(5),t.next=15,S("core/notices","createErrorNotice",Object(C.__)("There was an error."),{type:"snackbar"});case 15:case"end":return t.stop()}}),F,null,[[5,11]])}function $(e){return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.delegateYield(g.a.mark((function t(){var r,n,i,c,o,a,s,l,u;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_("core/edit-widgets","getWidgets");case 2:return r=t.sent,t.next=5,{type:"GET_WIDGET_TO_CLIENT_ID_MAPPING"};case 5:n=t.sent,i=Object(A.invert)(n),c=B(e),t.prev=8,c.s();case 10:if((o=c.n()).done){t.next=24;break}return a=o.value,t.next=14,_("core","getEditedEntityRecord",h,"postType",j(a.id));case 14:return s=t.sent,l=s.blocks,u=l.map((function(e){var t=i[e.clientId];return W(e,r[t])})),t.next=19,S("core","editEntityRecord",h,"sidebar",a.id,{widgets:u});case 19:return t.delegateYield(Q(a.id),"t0",20);case 20:return t.next=22,S("core","receiveEntityRecords",h,"postType",s,void 0);case 22:t.next=10;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(8),c.e(t.t1);case 29:return t.prev=29,c.f(),t.finish(29);case 32:case"end":return t.stop()}}),t,null,[[8,26,29,32]])}))(),"t0",2);case 2:return t.prev=2,t.next=5,S("core","finishResolution","getEntityRecord",h,"sidebar",{});case 5:return t.finish(2);case 6:case"end":return t.stop()}}),G,null,[[0,,2,6]])}function Q(e){var t,r;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,_("core","getLastEntitySaveError",h,"sidebar",e);case 2:return t=n.sent,n.next=5,S("core","saveEditedEntityRecord",h,"sidebar",e);case 5:return n.next=7,_("core","getLastEntitySaveError",h,"sidebar",e);case 7:if(!(r=n.sent)||t===r){n.next=10;break}throw new Error(r);case 10:case"end":return n.stop()}}),V)}function Y(e,t){return{type:"SET_WIDGET_ID_FOR_CLIENT_ID",clientId:e,widgetId:t}}function K(e){return{type:"SET_WIDGET_AREAS_OPEN_STATE",widgetAreasOpenState:e}}function X(e,t){return{type:"SET_IS_WIDGET_AREA_OPEN",clientId:e,isOpen:t}}function Z(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function J(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S("core/interface","disableComplementaryArea","core/edit-widgets");case 2:case"end":return e.stop()}}),z)}var ee=g.a.mark(ne);function te(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return re(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return re(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw c}}}}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ne(){var e,t,r,n,i,c,o,a,l,u,d,f,b,p;return g.a.wrap((function(m){for(;;)switch(m.prev=m.next){case 0:return e={},m.next=3,E(e);case 3:return m.next=5,_("core","getEntityRecords",h,"sidebar",e);case 5:t=m.sent,r=[],n={},i=t.sort((function(e,t){return"wp_inactive_widgets"===e.id?1:"wp_inactive_widgets"===t.id?-1:0})),c=te(i),m.prev=10,c.s();case 12:if((o=c.n()).done){m.next=22;break}a=o.value,l=[],u=te(a.widgets);try{for(u.s();!(d=u.n()).done;)f=d.value,b=N(f),n[f.id]=b.clientId,l.push(b)}catch(e){u.e(e)}finally{u.f()}return m.next=19,H(j(a.id),l);case 19:r.push(Object(s.createBlock)("core/widget-area",{id:a.id,name:a.name}));case 20:m.next=12;break;case 22:m.next=27;break;case 24:m.prev=24,m.t0=m.catch(10),c.e(m.t0);case 27:return m.prev=27,c.f(),m.finish(27);case 30:return p={},r.forEach((function(e,t){p[e.clientId]=0===t})),m.next=34,K(p);case 34:return m.next=36,H("widget-areas",r);case 36:return m.next=38,{type:"SET_WIDGET_TO_CLIENT_ID_MAPPING",mapping:n};case 38:case"end":return m.stop()}}),ee,null,[[10,24,27,30]])}function ie(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ce(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ce(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw c}}}}function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var oe=Object(u.createRegistrySelector)((function(e){return function(){var t=e("core/edit-widgets").getWidgetAreas();return Object(A.keyBy)(t.flatMap((function(e){return e.widgets})),(function(e){return e.id}))}})),ae=Object(u.createRegistrySelector)((function(e){return function(t,r){return e("core/edit-widgets").getWidgets()[r]}})),se=Object(u.createRegistrySelector)((function(e){return function(){if(!be(t))return null;var t={};return e("core").getEntityRecords(h,"sidebar",t)}})),le=function(e,t){var r=e.mapping;return Object(A.invert)(r)[t]},ue=Object(u.createRegistrySelector)((function(e){return function(t,r){var n,i=ie(e("core/edit-widgets").getWidgetAreas());try{for(i.s();!(n=i.n()).done;){var c=n.value;if(e("core").getEditedEntityRecord(h,"postType",j(c.id)).blocks.map((function(e){return e.clientId})).includes(r))return c}}catch(e){i.e(e)}finally{i.f()}}})),de=Object(u.createRegistrySelector)((function(e){return function(t,r){var n=e("core/edit-widgets").getWidgetAreas();return n?(r&&(n=n.filter((function(e){var t=e.id;return r.includes(t)}))),n.filter((function(t){var r=t.id;return e("core").hasEditsForEntityRecord(h,"postType",j(r))})).map((function(t){var r=t.id;return e("core").getEditedEntityRecord(h,"sidebar",r)}))):[]}})),fe=Object(u.createRegistrySelector)((function(e){return function(t,r){var n;r||(r=null===(n=e("core/edit-widgets").getWidgetAreas())||void 0===n?void 0:n.map((function(e){return e.id})));if(!r)return!1;var i,c=ie(r);try{for(c.s();!(i=c.n()).done;){var o=i.value;if(e("core").isSavingEntityRecord(h,"sidebar",o))return!0}}catch(e){c.e(e)}finally{c.f()}return!1}})),be=Object(u.createRegistrySelector)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){var r=e("core").getEntityRecords(h,"sidebar",t);return!!(null==r?void 0:r.length)||e("core").hasFinishedResolution("getEntityRecords",[h,"sidebar",t])}})),pe=function(e,t){return!!e.widgetAreasOpenState[t]};function me(e){return e.isInserterOpened}var ge={reducer:p,controls:P,selectors:c,resolvers:i,actions:n},ve=(Object(u.registerStore)("core/edit-widgets",ge),r(25)),Oe=r(77);Object(ve.addFilter)("editor.MediaUpload","core/edit-widgets/replace-media-upload",(function(){return Oe.MediaUpload}));var ye=r(6),he=Object(a.createElement)(ye.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(ye.Path,{d:"M7 11h2v2H7v-2zm14-5v14l-2 2H5l-2-2V6l2-2h1V2h2v2h8V2h2v2h1l2 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"}));function je(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,c=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,c=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw c}}return r}}(e,t)||O(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var we=r(3),Ee=r(5),_e=r(287);function Se(){return(Se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Pe(e,t,r){return t&&Ie(e.prototype,t),r&&Ie(e,r),e}function Ae(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ce(e,t){return(Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ce(e,t)}function Re(e){return(Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e,t){return!t||"object"!==Re(t)&&"function"!=typeof t?Ae(e):t}function We(e){return(We=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var De=r(31),Te=r.n(De),Be=r(9);function Me(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Le(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Le(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw c}}}}function Le(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Fe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=We(e);if(t){var i=We(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ne(this,r)}}var Ge=function(e){xe(r,e);var t=Fe(r);function r(){var e;return ke(this,r),(e=t.apply(this,arguments)).containerRef=Object(a.createRef)(),e.formRef=Object(a.createRef)(),e.widgetContentRef=Object(a.createRef)(),e.idBaseInputRef=Object(a.createRef)(),e.widgetNumberInputRef=Object(a.createRef)(),e.triggerWidgetEvent=e.triggerWidgetEvent.bind(Ae(e)),e}return Pe(r,[{key:"componentDidMount",value:function(){this.triggerWidgetEvent("widget-added"),this.props.onMount&&this.props.onMount(this.getFormData())}},{key:"shouldComponentUpdate",value:function(e){var t=!1;(e.idBase!==this.props.idBase&&this.idBaseInputRef.current&&(this.idBaseInputRef.current.value=e.idBase,t=!0),e.number!==this.props.number&&this.widgetNumberInputRef.current&&(this.widgetNumberInputRef.current.value=e.number),e.form!==this.props.form&&this.widgetContentRef.current)&&(this.widgetContentRef.current.innerHTML=e.form,t=!0);return t&&this.triggerWidgetEvent("widget-updated"),!1}},{key:"render",value:function(){var e=this,t=this.props,r=t.id,n=t.idBase,i=t.number,c=t.form;return Object(a.createElement)("div",{className:"widget open",ref:this.containerRef},Object(a.createElement)("div",{className:"widget-inside"},Object(a.createElement)("form",{className:"form",ref:this.formRef,method:"post",onBlur:function(){return e.props.onInstanceChange(e.getFormData())}},Object(a.createElement)("div",{ref:this.widgetContentRef,className:"widget-content",dangerouslySetInnerHTML:{__html:c}}),Object(a.createElement)("input",{type:"hidden",name:"widget-id",className:"widget-id",value:r||n+i}),Object(a.createElement)("input",{ref:this.idBaseInputRef,type:"hidden",name:"id_base",className:"id_base",value:n}),Object(a.createElement)("input",{ref:this.widgetNumberInputRef,type:"hidden",name:"widget_number",className:"widget_number",value:i}),Object(a.createElement)("input",{type:"hidden",name:"multi_number",className:"multi_number",value:""}),Object(a.createElement)("input",{type:"hidden",name:"add_new",className:"add_new",value:""}))))}},{key:"triggerWidgetEvent",value:function(e){window.jQuery(window.document).trigger(e,[window.jQuery(this.containerRef.current)])}},{key:"getFormData",value:function(){if(this.formRef.current){var e,t=this.formRef.current,r=new window.FormData(t),n={},i=Me(r.keys());try{for(i.s();!(e=i.n()).done;){var c=e.value;if(!Object(A.includes)(["widget-id","id_base","widget_number","multi_number","add_new"],c)){var o=c.match(/[^\[]*\[[-\d]*\]\[([^\]]*)\]/),a=o&&o[1]?o[1]:c,s=r.getAll(c);s.length>1?n[a]=s:n[a]=s[0]}}}catch(e){i.e(e)}finally{i.f()}return n}}}]),r}(a.Component);function Ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ze(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=We(e);if(t){var i=We(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ne(this,r)}}var He=window,qe=He.XMLHttpRequest,$e=He.FormData,Qe=function(e){xe(r,e);var t=Ue(r);function r(e){var n;return ke(this,r),(n=t.apply(this,arguments)).state={form:e.prerenderedEditForm},n.widgetNonce=null,n.instanceUpdating=null,n.onInstanceChange=n.onInstanceChange.bind(Ae(n)),n.requestWidgetForm=n.requestWidgetForm.bind(Ae(n)),n}return Pe(r,[{key:"componentDidMount",value:function(){var e=this;this.isStillMounted=!0,this.trySetNonce(),this.props.prerenderedEditForm||this.requestWidgetForm(void 0,(function(t){e.props.onInstanceChange(null,!!t.form)}))}},{key:"componentDidUpdate",value:function(e){var t=this;this.widgetNonce||this.trySetNonce(),e.widgetClass!==this.props.widgetClass&&this.requestWidgetForm(void 0,(function(e){t.props.onInstanceChange(null,!!e.form)})),this.instanceUpdating===this.props.instance&&(this.instanceUpdating=null)}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"render",value:function(){var e=this,t=this.props,r=t.instanceId,n=t.id,i=t.number,c=t.idBase,o=t.instance,s=t.isVisible,l=t.widgetName,u=this.state.form;if(!u)return null;var d=Object(A.get)(o,["title"]),f=null;d&&l?f="".concat(l,": ").concat(d):!d&&l?f=l:d&&!l&&(f=d);var b=s?{}:{style:{display:"none"},hidden:!0,"aria-hidden":"true"};return Object(a.createElement)("div",Se({className:"wp-block-legacy-widget__edit-handler"},b),f&&Object(a.createElement)("div",{className:"wp-block-legacy-widget__edit-widget-title"},f),Object(a.createElement)("div",{className:"wp-block-legacy-widget__edit-container",style:{display:this.props.isVisible?"block":"none"}},Object(a.createElement)(Ge,{isReferenceWidget:!!n,ref:function(t){e.widgetEditDomManagerRef=t},onInstanceChange:this.onInstanceChange,onMount:this.props.onFormMount,number:i||-1*r,id:n,idBase:c,form:u})))}},{key:"trySetNonce",value:function(){var e=document.getElementById("_wpnonce_widgets");e&&e.value&&(this.widgetNonce=e.value)}},{key:"onInstanceChange",value:function(e){this.props.onInstanceChange(e,!0)}},{key:"requestWidgetForm",value:function(e,t){var r=this,n=this.props,i=n.id,c=n.idBase,o=n.instance,a=n.widgetClass,s=this.isStillMounted;if(i||a){if(i){var l=new qe,u=new $e;return u.append("action","save-widget"),u.append("id_base",c),u.append("widget-id",i),u.append("widget-width","250"),u.append("widget-height","200"),u.append("savewidgets",this.widgetNonce),l.open("POST",window.ajaxurl),l.addEventListener("load",(function(){if(s){var e=l.responseText;r.setState({form:e}),t&&t({form:e})}})),void l.send(u)}a&&Te()({path:"/__experimental/widget-utils/form/".concat(encodeURIComponent(a),"/"),data:{instance:ze(ze({},o),e)},method:"POST"}).then((function(e){s&&(r.setState({form:e.form}),t&&t(e))}))}}}]),r}(a.Component),Ye=Object(Be.withInstanceId)(Qe),Ke=Object(a.createElement)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(a.createElement)(ye.Path,{d:"M18.33 3.57s.27-.8-.31-1.36c-.53-.52-1.22-.24-1.22-.24-.61.3-5.76 3.47-7.67 5.57-.86.96-2.06 3.79-1.09 4.82.92.98 3.96-.17 4.79-1 2.06-2.06 5.21-7.17 5.5-7.79zM1.4 17.65c2.37-1.56 1.46-3.41 3.23-4.64.93-.65 2.22-.62 3.08.29.63.67.8 2.57-.16 3.46-1.57 1.45-4 1.55-6.15.89z"}));function Xe(e){var t,r=e.availableLegacyWidgets,n=e.currentWidget,i=e.hasPermissionsToManageWidgets,c=e.onChangeWidget,o=Object(a.useMemo)((function(){return Object(A.pickBy)(r,(function(e){return!e.isHidden}))}),[r]);return t=i?Object(A.isEmpty)(o)?Object(C.__)("There are no widgets available."):Object(a.createElement)(we.SelectControl,{label:Object(C.__)("Select a legacy widget to display:"),value:n||"none",onChange:c,options:[{value:"none",label:"Select widget"}].concat(Object(A.map)(o,(function(e,t){return{value:t,label:e.name}})))}):Object(C.__)("You don't have permissions to use widgets on this site."),Object(a.createElement)(we.Placeholder,{icon:Object(a.createElement)(Ee.BlockIcon,{icon:Ke}),label:Object(C.__)("Legacy Widget")},t)}var Ze=r(18);function Je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var tt=function(e){var t=e.widgetAreaId,r=e.attributes,n=e.hidden,i=d(e,["widgetAreaId","attributes","hidden"]),c=je(Object(a.useState)(300),2),o=c[0],s=c[1],l=Object(a.useRef)(),u=document.location.href,f=u.substr(0,u.indexOf("wp-admin/")),b=Object(Ze.addQueryArgs)(f,{widgetPreview:et(et({},r),{},{sidebarId:t})}),p=Object(a.useCallback)((function(){s(Object(A.get)(l.current,["contentDocument","body","scrollHeight"]))}),[]);return Object(a.useEffect)((function(){n||p()}),[n,p]),Object(a.createElement)(we.Disabled,{hidden:n},Object(a.createElement)(we.FocusableIframe,Se({onLoad:function(){p()},src:b,height:o+20,iframeRef:l},i)))};var rt=Object(u.withSelect)((function(e,t){var r,n=t.clientId,i=t.attributes,c=i.widgetClass,o=i.referenceWidgetName,a=e("core/edit-widgets").getWidgetIdForClientId(n),s=e("core/edit-widgets").getWidget(a),l=e("core/edit-widgets").getWidgetAreaForClientId(n),u=e("core/block-editor").getSettings(),d=u.availableLegacyWidgets,f=u.hasPermissionsToManageWidgets;return a&&d[a]?r=d[a]:c&&d[c]?r=d[c]:o&&(r=d[o],a=o),{hasPermissionsToManageWidgets:f,availableLegacyWidgets:d,widgetId:a,widgetAreaId:null==l?void 0:l.id,WPWidget:r,prerenderedEditForm:s?s.rendered_form:""}}))((function(e){var t=e.attributes,r=e.availableLegacyWidgets,n=e.hasPermissionsToManageWidgets,i=e.prerenderedEditForm,c=e.setAttributes,o=e.widgetId,s=e.WPWidget,l=e.widgetAreaId,u=je(Object(a.useState)(!0),2),d=u[0],f=u[1],b=je(Object(a.useState)(!1),2),p=b[0],m=b[1],g=!p&&d;function v(){m(!1)}if(!s)return Object(a.createElement)(Xe,{availableLegacyWidgets:r,hasPermissionsToManageWidgets:n,onChangeWidget:function(e){var t=r[e],n=t.isReferenceWidget,i=t.id_base;c(n?{instance:{},idBase:i,referenceWidgetName:e,widgetClass:void 0}:{instance:{},idBase:i,referenceWidgetName:void 0,widgetClass:e})}});var O=s?Object(a.createElement)(Ee.InspectorControls,null,Object(a.createElement)(we.PanelBody,{title:s.name},s.description)):null;return n?Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Ee.BlockControls,null,Object(a.createElement)(we.ToolbarGroup,null,s&&!s.isHidden&&Object(a.createElement)(we.Button,{onClick:function(){v(),c({instance:{},id:void 0,widgetClass:void 0}),f(!0)},label:Object(C.__)("Change widget"),icon:_e.a}),d&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(we.Button,{className:"components-tab-button",isPressed:!p,onClick:v},Object(a.createElement)("span",null,Object(C.__)("Edit"))),Object(a.createElement)(we.Button,{className:"components-tab-button",isPressed:p,onClick:function(){m(!0)}},Object(a.createElement)("span",null,Object(C.__)("Preview")))))),O,d&&Object(a.createElement)(Ye,{isVisible:!p,id:o,idBase:t.idBase||o,number:t.number,prerenderedEditForm:i,widgetName:Object(A.get)(s,["name"]),widgetClass:t.widgetClass,instance:t.instance,onFormMount:function(e){t.widgetClass||c({instance:e})},onInstanceChange:function(e,t){e&&c({instance:e}),f(t)}}),(null==s?void 0:s.isReferenceWidget)?Object(a.createElement)("p",{hidden:g},Object(C.__)("Reference widgets cannot be previewed.")):Object(a.createElement)(tt,{hidden:g,className:"wp-block-legacy-widget__preview",widgetAreaId:l,attributes:Object(A.omit)(t,"widgetId")})):Object(a.createElement)(a.Fragment,null,O,Object(a.createElement)(tt,{className:"wp-block-legacy-widget__preview",widgetAreaId:l,attributes:Object(A.omit)(t,"widgetId")}))})),nt={to:[{block:"core/calendar",widget:"WP_Widget_Calendar"},{block:"core/search",widget:"WP_Widget_Search"},{block:"core/html",widget:"WP_Widget_Custom_HTML",transform:function(e){return{content:e.content}}},{block:"core/archives",widget:"WP_Widget_Archives",transform:function(e){var t=e.count;return{displayAsDropdown:!!e.dropdown,showPostCounts:!!t}}},{block:"core/latest-posts",widget:"WP_Widget_Recent_Posts",transform:function(e){return{displayPostDate:!!e.show_date,postsToShow:e.number}}},{block:"core/latest-comments",widget:"WP_Widget_Recent_Comments",transform:function(e){return{commentsToShow:e.number}}},{block:"core/tag-cloud",widget:"WP_Widget_Tag_Cloud",transform:function(e){var t=e.taxonomy;return{showTagCounts:!!e.count,taxonomy:t}}},{block:"core/categories",widget:"WP_Widget_Categories",transform:function(e){var t=e.count;return{displayAsDropdown:!!e.dropdown,showPostCounts:!!t,showHierarchy:!!e.hierarchical}}},{block:"core/audio",widget:"WP_Widget_Media_Audio",transform:function(e){var t=e.url,r=e.preload,n=e.loop;return{src:t,id:e.attachment_id,preload:r,loop:n}}},{block:"core/video",widget:"WP_Widget_Media_Video",transform:function(e){var t=e.url,r=e.preload,n=e.loop;return{src:t,id:e.attachment_id,preload:r,loop:n}}},{block:"core/image",widget:"WP_Widget_Media_Image",transform:function(e){var t=e.alt,r=e.attachment_id,n=e.caption,i=e.height,c=e.link_classes,o=e.link_rel,a=e.link_target_blank,s=e.link_type;return{alt:t,caption:n,height:i,id:r,link:e.link_url,linkClass:c,linkDestination:s,linkTarget:a?"_blank":void 0,rel:o,sizeSlug:e.size,url:e.url,width:e.width}}},{block:"core/gallery",widget:"WP_Widget_Media_Gallery",transform:function(e){var t=e.ids,r=e.link_type,n=e.size;return{ids:t,columns:e.number,linkTo:r,sizeSlug:n,images:t.map((function(e){return{id:e}}))}}},{block:"core/rss",widget:"WP_Widget_RSS",transform:function(e){return{feedURL:e.url,displayAuthor:!!e.show_author,displayDate:!!e.show_date,displayExcerpt:!!e.show_summary,itemsToShow:e.items}}}].map((function(e){var t=e.block,r=e.widget,n=e.transform;return{type:"block",blocks:[t],isMatch:function(e){return e.widgetClass===r},transform:function(e){var r=e.instance,i=Object(s.createBlock)(t,n?n(r):void 0);return r&&r.title?[Object(s.createBlock)("core/heading",{content:r.title}),i]:i}}}))};function it(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ct(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?it(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):it(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ot={name:"core/legacy-widget",category:"widgets",attributes:{widgetClass:{type:"string"},referenceWidgetName:{type:"string"},idBase:{type:"string"},number:{type:"number"},instance:{type:"object"}},supports:{html:!1,customClassName:!1}},at=ot.name,st={title:Object(C.__)("Legacy Widget (Experimental)"),description:Object(C.__)("Display a legacy widget."),icon:he,edit:rt,transforms:nt};function lt(e){var t=[];for(var r in e){var n=e[r];n.isHidden||t.push(ut(r,n))}return t}function ut(e,t){var r={attributes:{},category:"widgets",description:t.description,icon:st.icon,name:e,title:t.name};return t.isReferenceWidget?r.attributes={referenceWidgetName:e,instance:{}}:r.attributes={idBase:t.id_base,widgetClass:e,instance:{}},r}var dt=r(55),ft=r(42);function bt(){var e=Object(u.useDispatch)("core"),t=e.redo,r=e.undo;return Object(ft.useShortcut)("core/edit-widgets/undo",(function(e){r(),e.preventDefault()}),{bindGlobal:!0}),Object(ft.useShortcut)("core/edit-widgets/redo",(function(e){t(),e.preventDefault()}),{bindGlobal:!0}),null}bt.Register=function(){var e=Object(u.useDispatch)("core/keyboard-shortcuts").registerShortcut;return Object(a.useEffect)((function(){e({name:"core/edit-widgets/undo",category:"global",description:Object(C.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/edit-widgets/redo",category:"global",description:Object(C.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}})}),[e]),null};var pt=bt,mt=r(38);function gt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ot(e){var t=e.blockEditorSettings,r=d(e,["blockEditorSettings"]),n=Object(u.useSelect)((function(e){return{hasUploadPermissions:Object(A.defaultTo)(e("core").canUser("create","media"),!0),widgetAreas:e("core/edit-widgets").getWidgetAreas()}})).hasUploadPermissions,i=Object(a.useMemo)((function(){var e;return n&&(e=function(e){var r=e.onError,n=d(e,["onError"]);Object(Oe.uploadMedia)(vt({wpAllowedMimeTypes:t.allowedMimeTypes,onError:function(e){var t=e.message;return r(t)}},n))}),vt(vt({},t),{},{mediaUpload:e,templateLock:"all"})}),[t,n]),c=je(Object(mt.useEntityBlockEditor)(h,"postType",{id:"widget-areas"}),3),o=c[0],s=c[1],l=c[2];return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Ee.BlockEditorKeyboardShortcuts.Register,null),Object(a.createElement)(pt.Register,null),Object(a.createElement)(we.SlotFillProvider,null,Object(a.createElement)(we.DropZoneProvider,null,Object(a.createElement)(we.FocusReturnProvider,null,Object(a.createElement)(Ee.BlockEditorProvider,Se({value:o,onInput:s,onChange:l,settings:i},r))))))}var yt=r(7),ht=r.n(yt),jt=r(47),wt=r(197),Et=r(157);function _t(e){var t=e.clientId,r=Object(u.useSelect)((function(e){var r=e("core/block-editor"),n=r.getBlockAttributes,i=r.getBlockSelectionStart;return{name:n(t).name,selectedBlock:i()}}),[t]),n=r.name,i=r.selectedBlock,c=Object(u.useDispatch)("core/block-editor").selectBlock,o=i===t;return Object(a.createElement)("li",null,Object(a.createElement)(we.Button,{"aria-expanded":o,onClick:o?void 0:function(){c(t)}},n,Object(a.createElement)("span",{className:"edit-widgets-block-areas__edit"},Object(C.__)("Edit"))))}function St(){var e=Object(u.useSelect)((function(e){return e("core/block-editor").getBlockOrder()})),t=e.length>0;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"edit-widgets-block-areas"},Object(a.createElement)("div",{className:"edit-widgets-block-areas__top-container"},Object(a.createElement)(Ee.BlockIcon,{icon:Et.a}),Object(a.createElement)("div",null,Object(a.createElement)("p",null,Object(C.__)('Block Areas (also known as "Widget Areas") are global parts in your site\'s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.')),!t&&Object(a.createElement)("p",null,Object(C.__)("Your theme does not contain block areas.")))),t&&Object(a.createElement)("ul",null,e.map((function(e){return Object(a.createElement)(_t,{key:e,clientId:e})})))))}var kt=a.Platform.select({web:!0,native:!1}),It={"edit-widgets/block-areas":Object(C.__)("Block areas"),"edit-widgets/block-inspector":Object(C.__)("Block")};function Pt(e){var t=e.activeComplementaryArea,r=Object(u.useDispatch)("core/interface").enableComplementaryArea;return Object(a.createElement)("ul",null,Object(A.map)(It,(function(e,n){var i=n===t;return Object(a.createElement)("li",{key:n},Object(a.createElement)(we.Button,{onClick:function(){return r("core/edit-widgets",n)},className:ht()("edit-widgets-sidebar__panel-tab",{"is-active":i}),"aria-label":i?// translators: %s: sidebar label e.g: "Block areas".
|
2 |
+
Object(C.sprintf)(Object(C.__)("%s (selected)"),e):e,"data-label":e},e))})))}function At(){var e=Object(u.useDispatch)("core/interface").enableComplementaryArea,t=Object(u.useSelect)((function(e){var t=e("core/interface").getActiveComplementaryArea("core/edit-widgets"),r=!!t,n=e("core/block-editor"),i=n.getBlockSelectionStart,c=n.getBlockRootClientId,o=i();return It[t]||(t=o?"edit-widgets/block-inspector":"edit-widgets/block-areas"),{currentArea:t,hasSelectedNonAreaBlock:!(!o||!c(o)),isGeneralSidebarOpen:r}}),[]),r=t.currentArea,n=t.hasSelectedNonAreaBlock,i=t.isGeneralSidebarOpen;return Object(a.useEffect)((function(){n&&"edit-widgets/block-areas"===r&&i&&e("core/edit-widgets","edit-widgets/block-inspector"),!n&&"edit-widgets/block-inspector"===r&&i&&e("core/edit-widgets","edit-widgets/block-areas")}),[n,e]),Object(a.createElement)(jt.b,{className:"edit-widgets-sidebar",header:Object(a.createElement)(Pt,{activeComplementaryArea:r}),headerClassName:"edit-widgets-sidebar__panel-tabs"
|
3 |
+
/* translators: button label text should, if possible, be under 16 characters. */,title:Object(C.__)("Settings"),closeLabel:Object(C.__)("Close settings"),scope:"core/edit-widgets",identifier:r,icon:wt.a,isActiveByDefault:kt},"edit-widgets/block-areas"===r&&Object(a.createElement)(St,null),"edit-widgets/block-inspector"===r&&Object(a.createElement)(Ee.BlockInspector,null))}var Ct=r(128),xt=r(158);var Rt=function(){var e=Object(u.useSelect)((function(e){var t,r=e("core/edit-widgets"),n=r.getEditedWidgetAreas,i=r.isSavingWidgetAreas;return{hasEditedWidgetAreaIds:(null===(t=n())||void 0===t?void 0:t.length)>0,isSaving:i()}}),[]),t=e.hasEditedWidgetAreaIds,r=e.isSaving,n=Object(u.useDispatch)("core/edit-widgets").saveEditedWidgetAreas;return Object(a.createElement)(we.Button,{isPrimary:!0,isBusy:r,"aria-disabled":r,onClick:r?void 0:n,disabled:!t},r?Object(C.__)("Saving…"):Object(C.__)("Update"))},Nt=r(255),Wt=r(12);var Dt=Object(a.forwardRef)((function(e,t){var r=Object(u.useSelect)((function(e){return e("core").hasUndo()})),n=Object(u.useDispatch)("core").undo;return Object(a.createElement)(we.Button,Se({icon:Nt.a,label:Object(C.__)("Undo"),shortcut:Wt.displayShortcut.primary("z"),"aria-disabled":!r,onClick:r?n:void 0,ref:t},e))})),Tt=r(256);var Bt=Object(a.forwardRef)((function(e,t){var r=Object(u.useSelect)((function(e){return e("core").hasRedo()})),n=Object(u.useDispatch)("core").redo;return Object(a.createElement)(we.Button,Se({icon:Tt.a,label:Object(C.__)("Redo"),shortcut:Wt.displayShortcut.primaryShift("z"),"aria-disabled":!r,onClick:r?n:void 0,ref:t},e))})),Mt=function(){return Object(u.useSelect)((function(e){var t,r=e("core/block-editor"),n=r.getBlockSelectionEnd,i=r.getBlockParents,c=r.getBlockName,o=n();if("core/widget-area"===c(o))return o;var a=i(o).find((function(e){return"core/widget-area"===c(e)}));if(a)return a;var s=(0,e("core").getEntityRecord)(h,"postType","widget-areas");return null==s||null===(t=s.blocks[0])||void 0===t?void 0:t.clientId}),[])};var Lt=function(){var e=Object(a.useRef)(),t=Object(Be.useViewportMatch)("medium"),r=Mt(),n=Object(u.useSelect)((function(e){return e("core/edit-widgets").getIsWidgetAreaOpen(r)}),[r]),i=Object(u.useSelect)((function(e){return e("core/edit-widgets").isInserterOpened()})),c=Object(u.useDispatch)("core/edit-widgets"),o=c.setIsWidgetAreaOpen,s=c.setIsInserterOpened,l=Object(u.useDispatch)("core/block-editor").selectBlock;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"edit-widgets-header"},Object(a.createElement)("div",{className:"edit-widgets-header__navigable-toolbar-wrapper"},Object(a.createElement)("h1",{className:"edit-widgets-header__title"},Object(C.__)("Widgets")),Object(a.createElement)(Ee.NavigableToolbar,{className:"edit-widgets-header-toolbar","aria-label":Object(C.__)("Document tools")},Object(a.createElement)(we.ToolbarItem,{ref:e,as:we.Button,className:"edit-widgets-header-toolbar__inserter-toggle",isPrimary:!0,isPressed:i,onMouseDown:function(e){e.preventDefault()},onClick:function(){i?e.current.focus():(n||(l(r),o(r,!0)),window.requestAnimationFrame((function(){return s(!0)})))},icon:xt.a
|
4 |
/* translators: button label text should, if possible, be under 16
|
5 |
+
characters. */,label:Object(C._x)("Add block","Generic label for block inserter button")}),Object(a.createElement)(we.ToolbarItem,{as:Dt}),Object(a.createElement)(we.ToolbarItem,{as:Bt}),Object(a.createElement)(we.ToolbarItem,{as:Ee.BlockNavigationDropdown}))),Object(a.createElement)("div",{className:"edit-widgets-header__actions"},Object(a.createElement)(Rt,null),Object(a.createElement)(jt.f.Slot,{scope:"core/edit-widgets"}))),!t&&Object(a.createElement)("div",{className:"edit-widgets-header__block-toolbar"},Object(a.createElement)(Ee.BlockToolbar,{hideDragHandle:!0})))};var Ft=function(){var e=Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices()}}),[]).notices,t=Object(A.filter)(e,{type:"snackbar"}),r=Object(u.useDispatch)("core/notices").removeNotice;return Object(a.createElement)(we.SnackbarList,{notices:t,className:"edit-widgets-notices__snackbar",onRemove:r})};function Gt(){var e=Object(u.useDispatch)("core/block-editor").clearSelectedBlock;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(pt,null),Object(a.createElement)(Ee.BlockEditorKeyboardShortcuts,null),Object(a.createElement)(Ft,null),Object(a.createElement)(we.Popover.Slot,{name:"block-toolbar"}),Object(a.createElement)("div",{tabIndex:"-1",onFocus:e},Object(a.createElement)("div",{className:"editor-styles-wrapper",onFocus:function(e){e.stopPropagation(),e.preventDefault()}},Object(a.createElement)(Ee.WritingFlow,null,Object(a.createElement)(Ee.ObserveTyping,null,Object(a.createElement)(Ee.BlockList,{className:"edit-widgets-main-block-list"}))))))}function Vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=We(e);if(t){var i=We(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ne(this,r)}}function zt(e){e.stopPropagation()}var Ut=Object(we.withFocusOutside)(function(e){xe(r,e);var t=Vt(r);function r(){return ke(this,r),t.apply(this,arguments)}return Pe(r,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),r}(a.Component)),Ht=Object(we.withConstrainedTabbing)(Object(we.withFocusReturn)((function(e){return e.children})));function qt(e){var t=e.onClose,r=e.children,n=e.className;return Object(a.createElement)("div",{className:n,onKeyDown:function(e){e.keyCode===Wt.ESCAPE&&t&&(e.stopPropagation(),t())},onMouseDown:zt},Object(a.createElement)(Ut,{onFocusOutside:t},Object(a.createElement)(Ht,null,r)))}var $t=function(){var e=Object(u.useSelect)((function(e){var t,r=(0,e("core").getEntityRecord)(h,"postType","widget-areas");return null==r||null===(t=r.blocks[0])||void 0===t?void 0:t.clientId}),[]);return Object(u.useSelect)((function(t){var r=t("core/block-editor"),n=r.getBlockRootClientId,i=r.getBlockSelectionEnd,c=r.getBlockOrder,o=r.getBlockIndex,a=i()||e,s=n(a);return a&&""===s?{rootClientId:a,insertionIndex:c(a).length}:{rootClientId:s,insertionIndex:o(a,s)+1}}),[e])};var Qt=function(e){var t=e.blockEditorSettings,r=Object(Be.useViewportMatch)("medium","<"),n=Object(Be.useViewportMatch)("huge",">="),i=Object(u.useDispatch)("core/edit-widgets"),c=i.setIsInserterOpened,o=i.closeGeneralSidebar,s=$t(),l=s.rootClientId,d=s.insertionIndex,f=Object(u.useSelect)((function(e){return{hasSidebarEnabled:!!e("core/interface").getActiveComplementaryArea("core/edit-widgets"),isInserterOpened:!!e("core/edit-widgets").isInserterOpened()}})),b=f.hasSidebarEnabled,p=f.isInserterOpened;return Object(a.useEffect)((function(){b&&!n&&c(!1)}),[b,n]),Object(a.useEffect)((function(){p&&!n&&o()}),[p,n]),Object(a.createElement)(jt.e,{header:Object(a.createElement)(Lt,null),leftSidebar:p&&Object(a.createElement)(qt,{className:"edit-widgets-layout__inserter-panel-popover-wrapper",onClose:function(){return c(!1)}},Object(a.createElement)("div",{className:"edit-widgets-layout__inserter-panel"},Object(a.createElement)("div",{className:"edit-widgets-layout__inserter-panel-header"},Object(a.createElement)(we.Button,{icon:Ct.a,onClick:function(){return c(!1)}})),Object(a.createElement)("div",{className:"edit-widgets-layout__inserter-panel-content"},Object(a.createElement)(Ee.__experimentalLibrary,{showInserterHelpPanel:!0,onSelect:function(){r&&c(!1)},rootClientId:l,__experimentalInsertionIndex:d})))),sidebar:b&&Object(a.createElement)(jt.b.Slot,{scope:"core/edit-widgets"}),content:Object(a.createElement)(Gt,{blockEditorSettings:t})})};var Yt=function(e){var t=e.blockEditorSettings;return Object(a.createElement)(Ot,{blockEditorSettings:t},Object(a.createElement)(Qt,{blockEditorSettings:t}),Object(a.createElement)(At,null),Object(a.createElement)(we.Popover.Slot,null),Object(a.createElement)(dt.PluginArea,null))};var Kt=function(e){var t=e.settings,r=Object(u.useDispatch)("core/edit-widgets").initializeState,n=je(Object(a.useState)(!1),2),i=n[0],c=n[1];return Object(a.useEffect)((function(){r(),c(!0)}),[]),i?Object(a.createElement)(Yt,{blockEditorSettings:t}):null};function Xt(e,t){var r,n,i;Object(l.registerCoreBlocks)(),Object(l.__experimentalRegisterExperimentalCoreBlocks)(t),Zt((i=null!==(n=null==(r=t)?void 0:r.availableLegacyWidgets)&&void 0!==n?n:{},{metadata:ot,name:at,settings:ct(ct({},st),{},{variations:lt(i)})})),Object(a.render)(Object(a.createElement)(Kt,{settings:t}),document.getElementById(e))}var Zt=function(e){if(e){var t=e.metadata,r=e.settings,n=e.name;t&&Object(s.unstable__bootstrapServerSideBlockDefinitions)(o({},n,t)),Object(s.registerBlockType)(n,r)}}},42:function(e,t){!function(){e.exports=this.wp.keyboardShortcuts}()},47:function(e,t,r){"use strict";r.d(t,"b",(function(){return L})),r.d(t,"c",(function(){return q})),r.d(t,"d",(function(){return ee})),r.d(t,"e",(function(){return ne})),r.d(t,"f",(function(){return T})),r.d(t,"g",(function(){return le})),r.d(t,"a",(function(){return H}));var n={};r.r(n),r.d(n,"enableComplementaryArea",(function(){return b})),r.d(n,"disableComplementaryArea",(function(){return p})),r.d(n,"pinItem",(function(){return g})),r.d(n,"unpinItem",(function(){return v}));var i={};r.r(i),r.d(i,"getActiveComplementaryArea",(function(){return O})),r.d(i,"isItemPinned",(function(){return y}));var c=r(4);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r(2);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=Object(c.combineReducers)({singleEnableItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.itemType,i=t.scope,c=t.item;return"SET_SINGLE_ENABLE_ITEM"===r&&n&&i?l(l({},e),{},o({},n,l(l({},e[n]),{},o({},i,c||null)))):e},multipleEnableItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.itemType,i=t.scope,c=t.item,s=t.isEnable;if("SET_MULTIPLE_ENABLE_ITEM"!==r||!n||!i||!c||Object(a.get)(e,[n,i,c])===s)return e;var u=e[n]||{},d=u[i]||{};return l(l({},e),{},o({},n,l(l({},u),{},o({},i,l(l({},d),{},o({},c,s||!1))))))}}),d=Object(c.combineReducers)({enableItems:u});function f(e,t,r){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:r}}function b(e,t){return f("complementaryArea",e,t)}function p(e){return f("complementaryArea",e,void 0)}function m(e,t,r,n){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:r,isEnable:n}}function g(e,t){return m("pinnedItems",e,t,!0)}function v(e,t){return m("pinnedItems",e,t,!1)}function O(e,t){return function(e,t,r){return Object(a.get)(e.enableItems.singleEnableItems,[t,r])}(e,"complementaryArea",t)}function y(e,t,r){return!1!==function(e,t,r,n){return Object(a.get)(e.enableItems.multipleEnableItems,[t,r,n])}(e,"pinnedItems",t,r)}Object(c.registerStore)("core/interface",{reducer:d,actions:n,selectors:i,persist:["enableItems"]});function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function j(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var w=r(0),E=r(7),_=r.n(E),S=r(3),k=r(1),I=r(129),P=r(180),A=r(181),C=r(145),x=r(55),R=Object(x.withPluginContext)((function(e,t){return{icon:t.icon||e.icon,identifier:t.identifier||"".concat(e.name,"/").concat(t.name)}}));var N=R((function(e){var t=e.as,r=void 0===t?S.Button:t,n=e.scope,i=e.identifier,o=e.icon,s=e.selectedIcon,l=j(e,["as","scope","identifier","icon","selectedIcon"]),u=r,d=Object(c.useSelect)((function(e){return e("core/interface").getActiveComplementaryArea(n)===i}),[i]),f=Object(c.useDispatch)("core/interface"),b=f.enableComplementaryArea,p=f.disableComplementaryArea;return Object(w.createElement)(u,h({icon:s&&d?s:o,onClick:function(){d?p(n):b(n,i)}},Object(a.omit)(l,["name"])))})),W=function(e){var t=e.smallScreenTitle,r=e.children,n=e.className,i=e.toggleButtonProps,c=Object(w.createElement)(N,h({icon:C.a},i));return Object(w.createElement)(w.Fragment,null,Object(w.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},t&&Object(w.createElement)("span",{className:"interface-complementary-area-header__small-title"},t),c),Object(w.createElement)("div",{className:_()("components-panel__header","interface-complementary-area-header",n),tabIndex:-1},r,c))};function D(e){var t=e.scope,r=j(e,["scope"]);return Object(w.createElement)(S.Fill,h({name:"PinnedItems/".concat(t)},r))}D.Slot=function(e){var t=e.scope,r=e.className,n=j(e,["scope","className"]);return Object(w.createElement)(S.Slot,h({name:"PinnedItems/".concat(t)},n),(function(e){return!Object(a.isEmpty)(e)&&Object(w.createElement)("div",{className:_()(r,"interface-pinned-items")},e)}))};var T=D;function B(e){var t=e.scope,r=e.children,n=e.className;return Object(w.createElement)(S.Fill,{name:"ComplementaryArea/".concat(t)},Object(w.createElement)(S.Animate,{type:"slide-in",options:{origin:"left"}},(function(){return Object(w.createElement)("div",{className:n},r)})))}var M=R((function(e){var t=e.children,r=e.className,n=e.closeLabel,i=void 0===n?Object(k.__)("Close plugin"):n,o=e.identifier,a=e.header,s=e.headerClassName,l=e.icon,u=e.isPinnable,d=void 0===u||u,f=e.panelClassName,b=e.scope,p=e.smallScreenTitle,m=e.title,g=e.toggleShortcut,v=e.isActiveByDefault,O=e.showIconLabels,y=void 0!==O&&O,h=Object(c.useSelect)((function(e){var t=e("core/interface"),r=t.getActiveComplementaryArea,n=t.isItemPinned,i=r(b);return{isActive:i===o,isPinned:n(b,o),activeArea:i,isSmall:e("core/viewport").isViewportMatch("< medium"),isLarge:e("core/viewport").isViewportMatch("large")}}),[o,b]),j=h.isActive,E=h.isPinned,C=h.activeArea,x=h.isSmall,R=h.isLarge;!function(e,t,r,n,i){var o=Object(w.useRef)(!1),a=Object(w.useRef)(!1),s=Object(c.useDispatch)("core/interface"),l=s.enableComplementaryArea,u=s.disableComplementaryArea;Object(w.useEffect)((function(){n&&i&&!o.current?(u(e),a.current=!0):a.current&&!i&&o.current?(a.current=!1,l(e,t)):a.current&&r&&r!==t&&(a.current=!1),i!==o.current&&(o.current=i)}),[n,i,e,t,r])}(b,o,C,j,x);var D=Object(c.useDispatch)("core/interface"),M=D.enableComplementaryArea,L=D.disableComplementaryArea,F=D.pinItem,G=D.unpinItem;return Object(w.useEffect)((function(){v&&void 0===C&&!x&&M(b,o)}),[C,v,b,o,x]),Object(w.createElement)(w.Fragment,null,E&&d&&Object(w.createElement)(T,{scope:b},Object(w.createElement)(N,{scope:b,identifier:o,isPressed:j&&(!y||R),"aria-expanded":j,label:m,icon:y?I.a:l,showTooltip:!y})),j&&Object(w.createElement)(B,{className:_()("interface-complementary-area",r),scope:b},Object(w.createElement)(W,{className:s,closeLabel:i,onClose:function(){return L(b)},smallScreenTitle:p,toggleButtonProps:{label:i,shortcut:g,scope:b,identifier:o}},a||Object(w.createElement)(w.Fragment,null,Object(w.createElement)("strong",null,m),d&&Object(w.createElement)(S.Button,{className:"interface-complementary-area__pin-unpin-item",icon:E?P.a:A.a,label:E?Object(k.__)("Unpin from toolbar"):Object(k.__)("Pin to toolbar"),onClick:function(){return(E?G:F)(b,o)},isPressed:E,"aria-expanded":E}))),Object(w.createElement)(S.Panel,{className:f},t)))}));M.Slot=function(e){var t=e.scope,r=j(e,["scope"]);return Object(w.createElement)(S.Slot,h({name:"ComplementaryArea/".concat(t)},r))};var L=M;function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function G(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,c=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,c=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw c}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?F(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function U(e){var t=e.name,r=e.as,n=e.onClick,i=j(e,["name","as","onClick"]);return Object(w.createElement)(S.Fill,{name:t},(function(e){var t=e.onClick,c=e.as,o=r||c||S.Button;return Object(w.createElement)(o,h({onClick:n||t?function(){(n||a.noop).apply(void 0,arguments),(t||a.noop).apply(void 0,arguments)}:void 0},i))}))}U.Slot=function(e){var t=e.name,r=e.as,n=void 0===r?[S.ButtonGroup,S.Button]:r,i=e.fillProps,c=void 0===i?{}:i,o=e.bubblesVirtually,s=j(e,["name","as","fillProps","bubblesVirtually"]),l=G(n,2),u=l[0],d=l[1];return Object(w.createElement)(S.Slot,{name:t,bubblesVirtually:o,fillProps:z({as:d},c)},(function(e){return!Object(a.isEmpty)(e)&&Object(w.createElement)(u,s,e)}))};var H=U;function q(e){var t=e.scope,r=e.target,n=j(e,["scope","target"]);return Object(w.createElement)(N,h({as:function(e){return Object(w.createElement)(H,h({name:"".concat(t,"/plugin-more-menu")},e))},role:"menuitemcheckbox",selectedIcon:I.a,name:r,scope:t},n))}function $(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(e){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(e,t){return!t||"object"!==K(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function J(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Z(e);if(t){var i=Z(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return X(this,r)}}var ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Y(e,t)}(c,e);var t,r,n,i=J(c);function c(){return $(this,c),i.apply(this,arguments)}return t=c,(r=[{key:"componentDidMount",value:function(){this.isSticky=!1,this.sync(),document.body.classList.contains("sticky-menu")&&(this.isSticky=!0,document.body.classList.remove("sticky-menu"))}},{key:"componentWillUnmount",value:function(){this.isSticky&&document.body.classList.add("sticky-menu")}},{key:"componentDidUpdate",value:function(e){this.props.isActive!==e.isActive&&this.sync()}},{key:"sync",value:function(){this.props.isActive?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode")}},{key:"render",value:function(){return null}}])&&Q(t.prototype,r),n&&Q(t,n),c}(w.Component);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=Object(S.navigateRegions)((function(e){var t=e.footer,r=e.header,n=e.sidebar,i=e.leftSidebar,c=e.content,o=e.actions,a=e.labels,s=e.className;!function(e){Object(w.useEffect)((function(){var t=document&&document.querySelector("html:not(.".concat(e,")"));if(t)return t.classList.toggle(e),function(){t.classList.toggle(e)}}),[e])}("interface-interface-skeleton__html-container");var l=re(re({},{
|
|
|
|
|
6 |
/* translators: accessibility text for the top bar landmark region. */
|
7 |
header:Object(k.__)("Header"),
|
8 |
/* translators: accessibility text for the content landmark region. */
|
changelog.txt
CHANGED
@@ -1,5 +1,15 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 9.1.0 =
|
4 |
|
5 |
### Features
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 9.1.1 =
|
4 |
+
|
5 |
+
### Bug Fixes
|
6 |
+
|
7 |
+
- Widgets Screen:
|
8 |
+
- Include edit-widgets php files in build ([25792](https://github.com/WordPress/gutenberg/pull/25792))
|
9 |
+
- Fix PHP warining in widget utils controller ([25797](https://github.com/WordPress/gutenberg/pull/25797))
|
10 |
+
- Initialize the state before rendering widgets editor ([25736](https://github.com/WordPress/gutenberg/pull/25736))
|
11 |
+
- Fix insertion point in widget areas ([25727](https://github.com/WordPress/gutenberg/pull/25727))
|
12 |
+
|
13 |
= 9.1.0 =
|
14 |
|
15 |
### Features
|
gutenberg.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Printing since 1440. This is the development plugin for the new block editor in core.
|
6 |
* Requires at least: 5.3
|
7 |
* Requires PHP: 5.6
|
8 |
-
* Version: 9.1.
|
9 |
* Author: Gutenberg Team
|
10 |
* Text Domain: gutenberg
|
11 |
*
|
@@ -13,8 +13,8 @@
|
|
13 |
*/
|
14 |
|
15 |
### BEGIN AUTO-GENERATED DEFINES
|
16 |
-
define( 'GUTENBERG_VERSION', '9.1.
|
17 |
-
define( 'GUTENBERG_GIT_COMMIT', '
|
18 |
### END AUTO-GENERATED DEFINES
|
19 |
|
20 |
gutenberg_pre_init();
|
5 |
* Description: Printing since 1440. This is the development plugin for the new block editor in core.
|
6 |
* Requires at least: 5.3
|
7 |
* Requires PHP: 5.6
|
8 |
+
* Version: 9.1.1
|
9 |
* Author: Gutenberg Team
|
10 |
* Text Domain: gutenberg
|
11 |
*
|
13 |
*/
|
14 |
|
15 |
### BEGIN AUTO-GENERATED DEFINES
|
16 |
+
define( 'GUTENBERG_VERSION', '9.1.1' );
|
17 |
+
define( 'GUTENBERG_GIT_COMMIT', '6920f7ae7b03c5cd6a6c6d07059c75f9fa0ff409' );
|
18 |
### END AUTO-GENERATED DEFINES
|
19 |
|
20 |
gutenberg_pre_init();
|
lib/class-wp-rest-widget-utils-controller.php
CHANGED
@@ -88,8 +88,9 @@ class WP_REST_Widget_Utils_Controller extends WP_REST_Controller {
|
|
88 |
*
|
89 |
* @return boolean| True if the widget being referenced exists and false otherwise.
|
90 |
* @since 5.2.0
|
|
|
91 |
*/
|
92 |
-
|
93 |
$widget_class = urldecode( $widget_class );
|
94 |
global $wp_widget_factory;
|
95 |
if ( ! $widget_class ) {
|
88 |
*
|
89 |
* @return boolean| True if the widget being referenced exists and false otherwise.
|
90 |
* @since 5.2.0
|
91 |
+
* @access public
|
92 |
*/
|
93 |
+
public function is_valid_widget( $widget_class ) {
|
94 |
$widget_class = urldecode( $widget_class );
|
95 |
global $wp_widget_factory;
|
96 |
if ( ! $widget_class ) {
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: matveb, joen, karmatosed
|
|
3 |
Requires at least: 5.4.0
|
4 |
Tested up to: 5.5
|
5 |
Requires PHP: 5.6
|
6 |
-
Stable tag: 9.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -57,4 +57,5 @@ View <a href="https://developer.wordpress.org/block-editor/principles/versions-i
|
|
57 |
|
58 |
== Changelog ==
|
59 |
|
60 |
-
To read the changelog for Gutenberg 9.1.
|
|
3 |
Requires at least: 5.4.0
|
4 |
Tested up to: 5.5
|
5 |
Requires PHP: 5.6
|
6 |
+
Stable tag: 9.1.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
57 |
|
58 |
== Changelog ==
|
59 |
|
60 |
+
To read the changelog for Gutenberg 9.1.1, please navigate to the <a href="https://github.com/WordPress/gutenberg/releases/tag/v9.1.1">release page</a>.
|
61 |
+
|