/*! This file is auto-generated */ this.wp=this.wp||{},this.wp.editPost=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=451)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t,r){var n; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t1)for(var r=1;r=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}},15:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(24);var i=r(42),o=r(28);function a(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||Object(i.a)(e)||Object(o.a)(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.")}()}},158:function(e,t){e.exports=window.wp.mediaUtils},16:function(e,t){e.exports=window.regeneratorRuntime},164:function(e,t,r){"use strict";var n=r(0),i=r(7),o=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=o},165:function(e,t,r){"use strict";var n=r(0),i=r(7),o=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=o},166:function(e,t,r){"use strict";var n=r(0),i=r(7),o=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=o},17:function(e,t){e.exports=window.wp.keycodes},174:function(e,t,r){"use strict";r.r(t);var n=r(129),i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=Object(n.a)((function(e){return i.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));t.default=o},179:function(e,t,r){"use strict";(function(e){var n=r(0),i=r(3),o=r(11),a=r(73),u=r(4),c=(r(106),r(66)),s=r(23),l=Object(i.createSlotFill)("PluginDocumentSettingPanel"),A=l.Fill,m=l.Slot,p=Object(o.compose)(Object(a.withPluginContext)((function(t,r){return void 0===r.name&&void 0!==e&&e.env,{icon:r.icon||t.icon,panelName:"".concat(t.name,"/").concat(r.name)}})),Object(u.withSelect)((function(e,t){var r=t.panelName;return{opened:e(s.a).isEditorPanelOpened(r),isEnabled:e(s.a).isEditorPanelEnabled(r)}})),Object(u.withDispatch)((function(e,t){var r=t.panelName;return{onToggle:function(){return e(s.a).toggleEditorPanelOpened(r)}}})))((function(e){var t=e.isEnabled,r=e.panelName,o=e.opened,a=e.onToggle,u=e.className,s=e.title,l=e.icon,m=e.children;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(c.d,{label:s,panelName:r}),Object(n.createElement)(A,null,t&&Object(n.createElement)(i.PanelBody,{className:u,title:s,icon:l,opened:o,onToggle:a},m)))}));p.Slot=m,t.a=p}).call(this,r(124))},18:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,"a",(function(){return n}))},2:function(e,t){e.exports=window.lodash},218:function(e,t,r){"use strict";var n=r(0),i=r(7),o=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=o},22:function(e,t,r){"use strict";function n(e){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.d(t,"a",(function(){return n}))},222:function(e,t,r){"use strict";var n=r(0),i=r(7),o=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));t.a=o},23:function(e,t,r){"use strict";r.d(t,"a",(function(){return Ze}));var n={};r.r(n),r.d(n,"openGeneralSidebar",(function(){return G})),r.d(n,"closeGeneralSidebar",(function(){return k})),r.d(n,"openModal",(function(){return Y})),r.d(n,"closeModal",(function(){return x})),r.d(n,"openPublishSidebar",(function(){return L})),r.d(n,"closePublishSidebar",(function(){return Q})),r.d(n,"togglePublishSidebar",(function(){return P})),r.d(n,"toggleEditorPanelEnabled",(function(){return W})),r.d(n,"toggleEditorPanelOpened",(function(){return D})),r.d(n,"removeEditorPanel",(function(){return N})),r.d(n,"toggleFeature",(function(){return T})),r.d(n,"switchEditorMode",(function(){return J})),r.d(n,"togglePinnedPluginItem",(function(){return R})),r.d(n,"hideBlockTypes",(function(){return H})),r.d(n,"updatePreferredStyleVariations",(function(){return F})),r.d(n,"__experimentalUpdateLocalAutosaveInterval",(function(){return U})),r.d(n,"showBlockTypes",(function(){return X})),r.d(n,"setAvailableMetaBoxesPerLocation",(function(){return V})),r.d(n,"requestMetaBoxUpdates",(function(){return _})),r.d(n,"metaBoxUpdatesSuccess",(function(){return $})),r.d(n,"__experimentalSetPreviewDeviceType",(function(){return ee})),r.d(n,"setIsInserterOpened",(function(){return te})),r.d(n,"setIsEditingTemplate",(function(){return re})),r.d(n,"__unstableSwitchToTemplateMode",(function(){return ne}));var i={};r.r(i),r.d(i,"getEditorMode",(function(){return ae})),r.d(i,"isEditorSidebarOpened",(function(){return ue})),r.d(i,"isPluginSidebarOpened",(function(){return ce})),r.d(i,"getActiveGeneralSidebarName",(function(){return se})),r.d(i,"getPreferences",(function(){return le})),r.d(i,"getPreference",(function(){return Ae})),r.d(i,"isPublishSidebarOpened",(function(){return me})),r.d(i,"isEditorPanelRemoved",(function(){return pe})),r.d(i,"isEditorPanelEnabled",(function(){return de})),r.d(i,"isEditorPanelOpened",(function(){return ve})),r.d(i,"isModalActive",(function(){return qe})),r.d(i,"isFeatureActive",(function(){return ge})),r.d(i,"isPluginItemPinned",(function(){return fe})),r.d(i,"getActiveMetaBoxLocations",(function(){return be})),r.d(i,"isMetaBoxLocationVisible",(function(){return he})),r.d(i,"isMetaBoxLocationActive",(function(){return Oe})),r.d(i,"getMetaBoxesPerLocation",(function(){return Ie})),r.d(i,"getAllMetaBoxes",(function(){return ye})),r.d(i,"hasMetaBoxes",(function(){return je})),r.d(i,"isSavingMetaBoxes",(function(){return Ce})),r.d(i,"__experimentalGetPreviewDeviceType",(function(){return Ee})),r.d(i,"isInserterOpened",(function(){return Ke})),r.d(i,"isEditingTemplate",(function(){return Se})),r.d(i,"getEditedPostTemplate",(function(){return Me}));var o=r(4),a=r(49),u=r(15),c=r(5),s=r(2);function l(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 A(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:m,r=arguments.length>1?arguments[1]:void 0;return e(t,r)}})])({panels:function(e,t){switch(t.type){case"TOGGLE_PANEL_ENABLED":var r=t.panelName;return A(A({},e),{},Object(c.a)({},r,A(A({},e[r]),{},{enabled:!Object(s.get)(e,[r,"enabled"],!0)})));case"TOGGLE_PANEL_OPENED":var n=t.panelName,i=!0===e[n]||Object(s.get)(e,[n,"opened"],!1);return A(A({},e),{},Object(c.a)({},n,A(A({},e[n]),{},{opened:!i})))}return e},features:function(e,t){return"TOGGLE_FEATURE"===t.type?A(A({},e),{},Object(c.a)({},t.feature,!e[t.feature])):e},editorMode:function(e,t){return"SWITCH_MODE"===t.type?t.mode:e},hiddenBlockTypes:function(e,t){switch(t.type){case"SHOW_BLOCK_TYPES":return s.without.apply(void 0,[e].concat(Object(u.a)(t.blockNames)));case"HIDE_BLOCK_TYPES":return Object(s.union)(e,t.blockNames)}return e},preferredStyleVariations:function(e,t){switch(t.type){case"UPDATE_PREFERRED_STYLE_VARIATIONS":return t.blockName?t.blockStyle?A(A({},e),{},Object(c.a)({},t.blockName,t.blockStyle)):Object(s.omit)(e,[t.blockName]):e}return e},localAutosaveInterval:function(e,t){switch(t.type){case"UPDATE_LOCAL_AUTOSAVE_INTERVAL":return t.interval}return e}});var d=Object(o.combineReducers)({isSaving:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_META_BOX_UPDATES":return!0;case"META_BOX_UPDATES_SUCCESS":return!1;default:return e}},locations: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_META_BOXES_PER_LOCATIONS":return t.metaBoxesPerLocation}return e}}),v=Object(o.combineReducers)({activeModal:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e},metaBoxes:d,preferences:p,publishSidebarActive:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_PUBLISH_SIDEBAR":return!0;case"CLOSE_PUBLISH_SIDEBAR":return!1;case"TOGGLE_PUBLISH_SIDEBAR":return!e}return e},removedPanels:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REMOVE_PANEL":if(!Object(s.includes)(e,t.panelName))return[].concat(Object(u.a)(e),[t.panelName])}return e},deviceType:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Desktop",t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PREVIEW_DEVICE_TYPE":return t.deviceType}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},isEditingTemplate: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_EDITING_TEMPLATE":return t.value}return e}}),q=r(12),g=r(16),f=r.n(g),b=r(1),h=r(63),O=r(46),I=r(51),y=r(37),j=function(e){var t=document.querySelector(".edit-post-meta-boxes-area.is-".concat(e," .metabox-location-").concat(e));return t||document.querySelector("#metaboxes .metabox-location-"+e)};function C(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 E(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 E(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 o,a=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0}function Ce(e){return e.metaBoxes.isSaving}function Ee(e){return e.isEditingTemplate?"Desktop":e.deviceType}function Ke(e){return e.isInserterOpened}function Se(e){return e.isEditingTemplate}var Me=Object(o.createRegistrySelector)((function(e){return function(){var t,r=e(oe.store).getEditedPostAttribute("template");if(r)return null===(t=e(y.store).getEntityRecords("postType","wp_template"))||void 0===t?void 0:t.find((function(e){return e.slug===r}));var n=e(oe.store).getCurrentPost();return n.link&&"auto-draft"!==n.status?e(y.store).__experimentalGetTemplateForLink(n.link):null}})),we=r(122),ze={reducer:v,actions:n,selectors:i,controls:a.controls,persist:["preferences"]},Ze=Object(o.createReduxStore)(we.a,ze);Object(o.registerStore)(we.a,ze)},24:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(i[r]=e[r]);return i}r.d(t,"a",(function(){return n}))},451:function(e,t,r){"use strict";r.r(t),r.d(t,"store",(function(){return C.a})),r.d(t,"reinitializeEditor",(function(){return Os})),r.d(t,"initializeEditor",(function(){return Is})),r.d(t,"PluginBlockSettingsMenuItem",(function(){return fs})),r.d(t,"PluginDocumentSettingPanel",(function(){return Yc.a})),r.d(t,"PluginMoreMenuItem",(function(){return bs})),r.d(t,"PluginPostPublishPanel",(function(){return ts})),r.d(t,"PluginPostStatusInfo",(function(){return qc})),r.d(t,"PluginPrePublishPanel",(function(){return as})),r.d(t,"PluginSidebar",(function(){return xc})),r.d(t,"PluginSidebarMoreMenuItem",(function(){return hs})),r.d(t,"__experimentalFullscreenModeClose",(function(){return Su})),r.d(t,"__experimentalMainDashboardButton",(function(){return $u}));var n=r(0),i=r(37),o=r(6),a=r(31),u=r(291),c=r(30),s=r(158);Object(c.addFilter)("editor.MediaUpload","core/edit-post/replace-media-upload",(function(){return s.MediaUpload}));var l=r(8),A=r(14),m=r(2),p=r(9),d=r(3),v=r(4),q=r(1),g=r(11),f=Object(g.compose)(Object(v.withSelect)((function(e,t){if(Object(p.hasBlockSupport)(t.name,"multiple",!0))return{};var r=e("core/block-editor").getBlocks(),n=Object(m.find)(r,(function(e){var r=e.name;return t.name===r}));return{originalBlockClientId:n&&n.clientId!==t.clientId&&n.clientId}})),Object(v.withDispatch)((function(e,t){var r=t.originalBlockClientId;return{selectFirst:function(){return e("core/block-editor").selectBlock(r)}}}))),b=Object(g.createHigherOrderComponent)((function(e){return f((function(t){var r=t.originalBlockClientId,i=t.selectFirst,a=Object(A.a)(t,["originalBlockClientId","selectFirst"]);if(!r)return Object(n.createElement)(e,a);var u=Object(p.getBlockType)(a.name),c=function(e){var t=Object(p.findTransform)(Object(p.getBlockTransforms)("to",e),(function(e){var t=e.type,r=e.blocks;return"block"===t&&1===r.length}));if(!t)return null;return Object(p.getBlockType)(t.blocks[0])}(a.name);return[Object(n.createElement)("div",{key:"invalid-preview",style:{minHeight:"60px"}},Object(n.createElement)(e,Object(l.a)({key:"block-edit"},a))),Object(n.createElement)(o.Warning,{key:"multiple-use-warning",actions:[Object(n.createElement)(d.Button,{key:"find-original",isSecondary:!0,onClick:i},Object(q.__)("Find original")),Object(n.createElement)(d.Button,{key:"remove",isSecondary:!0,onClick:function(){return a.onReplace([])}},Object(q.__)("Remove")),c&&Object(n.createElement)(d.Button,{key:"transform",isSecondary:!0,onClick:function(){return a.onReplace(Object(p.createBlock)(c.name,a.attributes))}},Object(q.__)("Transform into:")," ",c.title)]},Object(n.createElement)("strong",null,u.title,": "),Object(q.__)("This block can only be used once."))]}))}),"withMultipleValidation");Object(c.addFilter)("editor.BlockEdit","core/edit-post/validate-multiple-use/with-multiple-validation",b);var h=r(429),O=r(73),I=r(29),y=r(51);function j(){var e=Object(v.useDispatch)(y.store).createNotice,t=Object(v.useSelect)((function(e){return function(){return e(a.store).getEditedPostAttribute("content")}}),[]);var r=Object(g.useCopyToClipboard)(t,(function(){e("info",Object(q.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}));return Object(n.createElement)(d.MenuItem,{ref:r},Object(q.__)("Copy all content"))}var C=r(23);var E=Object(v.withDispatch)((function(e){return{openModal:e(C.a).openModal}}))((function(e){var t=e.openModal;return Object(n.createElement)(d.MenuItem,{onClick:function(){t("edit-post/manage-blocks")}},Object(q.__)("Block Manager"))})),K=r(17);var S=Object(v.withDispatch)((function(e){return{openModal:e(C.a).openModal}}))((function(e){var t=e.openModal;return Object(n.createElement)(d.MenuItem,{onClick:function(){t("edit-post/keyboard-shortcut-help")},shortcut:K.displayShortcut.access("h")},Object(q.__)("Keyboard shortcuts"))})),M=Object(d.createSlotFill)("ToolsMoreMenuGroup"),w=M.Fill,z=M.Slot;w.Slot=function(e){var t=e.fillProps;return Object(n.createElement)(z,{fillProps:t},(function(e){return!Object(m.isEmpty)(e)&&Object(n.createElement)(d.MenuGroup,{label:Object(q.__)("Tools")},e)}))};var Z=w;function B(){var e=Object(v.useDispatch)(C.a).toggleFeature;return Object(n.createElement)(d.MenuItem,{onClick:function(){return e("welcomeGuide")}},Object(q.__)("Welcome Guide"))}Object(O.registerPlugin)("edit-post",{render:function(){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Z,null,(function(e){var t=e.onClose;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(E,{onSelect:t}),Object(n.createElement)(d.MenuItem,{role:"menuitem",href:Object(I.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(q.__)("Manage Reusable blocks")),Object(n.createElement)(S,{onSelect:t}),Object(n.createElement)(B,null),Object(n.createElement)(j,null),Object(n.createElement)(d.MenuItem,{role:"menuitem",icon:h.a,href:Object(q.__)("https://wordpress.org/support/article/wordpress-editor/"),target:"_blank",rel:"noopener noreferrer"},Object(q.__)("Help"),Object(n.createElement)(d.VisuallyHidden,{as:"span"},Object(q.__)("(opens in a new tab)"))))})))}});var G=r(15),k=r(5),Y={"t a l e s o f g u t e n b e r g":function(e){var t=e.target.ownerDocument;(t.activeElement.classList.contains("edit-post-visual-editor")||t.activeElement===t.body)&&(e.preventDefault(),window.wp.data.dispatch("core/block-editor").insertBlock(window.wp.blocks.createBlock("core/paragraph",{content:"🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️"})))}},x=r(12),L=r(10),Q=r.n(L),P=r(63),W=r(165),D=r(47);var N=Object(g.compose)(Object(v.withSelect)((function(e){return{isRichEditingEnabled:e("core/editor").getEditorSettings().richEditingEnabled}})),Object(v.withDispatch)((function(e){return{onExit:function(){e(C.a).switchEditorMode("visual")}}})))((function(e){var t=e.onExit,r=e.isRichEditingEnabled;return Object(n.createElement)("div",{className:"edit-post-text-editor"},r&&Object(n.createElement)("div",{className:"edit-post-text-editor__toolbar"},Object(n.createElement)("h2",null,Object(q.__)("Editing code")),Object(n.createElement)(d.Button,{isTertiary:!0,onClick:t,shortcut:K.displayShortcut.secondary("m")},Object(q.__)("Exit code editor")),Object(n.createElement)(a.TextEditorGlobalKeyboardShortcuts,null)),Object(n.createElement)("div",{className:"edit-post-text-editor__body"},Object(n.createElement)(a.PostTitle,null),Object(n.createElement)(a.PostTextEditor,null)))})),T=function(e,t){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)}; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function J(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}T(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var R=function(){return(R=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function U(e,t){for(var r=0,n=t.length,i=e.length;r-1||/[A-Z]/.test(e))}var we={};var ze=["","X","Y","Z"],Ze=["transformPerspective","x","y","z"];function Be(e,t){return Ze.indexOf(e)-Ze.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return ze.forEach((function(t){return Ze.push(e+t)}))}));var Ge=new Set(Ze);function ke(e){return Ge.has(e)}var Ye=new Set(["originX","originY","originZ"]);function xe(e){return Ye.has(e)}function Le(e,t){var r=t.layout,n=t.layoutId;return ke(e)||xe(e)||(r||void 0!==n)&&(!!we[e]||"opacity"===e)}var Qe=function(e){return null!==e&&"object"==typeof e&&e.getVelocity},Pe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function We(e){return e.startsWith("--")}var De=function(e,t){return t&&"number"==typeof e?t.transform(e):e},Ne=function(e,t){return function(r){return Math.max(Math.min(r,t),e)}},Te=function(e){return e%1?Number(e.toFixed(5)):e},Je=/(-)?([\d]*\.?[\d])+/g,Re=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,He=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function Fe(e){return"string"==typeof e}var Ue=function(e){return{test:function(t){return Fe(t)&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},Xe=Ue("deg"),Ve=Ue("%"),_e=Ue("px"),$e=Ue("vh"),et=Ue("vw"),tt=R(R({},Ve),{parse:function(e){return Ve.parse(e)/100},transform:function(e){return Ve.transform(100*e)}}),rt={test:function(e){return"number"==typeof e},parse:parseFloat,transform:function(e){return e}},nt=R(R({},rt),{transform:Ne(0,1)}),it=R(R({},rt),{default:1}),ot=R(R({},rt),{transform:Math.round}),at={borderWidth:_e,borderTopWidth:_e,borderRightWidth:_e,borderBottomWidth:_e,borderLeftWidth:_e,borderRadius:_e,radius:_e,borderTopLeftRadius:_e,borderTopRightRadius:_e,borderBottomRightRadius:_e,borderBottomLeftRadius:_e,width:_e,maxWidth:_e,height:_e,maxHeight:_e,size:_e,top:_e,right:_e,bottom:_e,left:_e,padding:_e,paddingTop:_e,paddingRight:_e,paddingBottom:_e,paddingLeft:_e,margin:_e,marginTop:_e,marginRight:_e,marginBottom:_e,marginLeft:_e,rotate:Xe,rotateX:Xe,rotateY:Xe,rotateZ:Xe,scale:it,scaleX:it,scaleY:it,scaleZ:it,skew:Xe,skewX:Xe,skewY:Xe,distance:_e,translateX:_e,translateY:_e,translateZ:_e,x:_e,y:_e,z:_e,perspective:_e,transformPerspective:_e,opacity:nt,originX:tt,originY:tt,originZ:_e,zIndex:ot,fillOpacity:nt,strokeOpacity:nt,numOctaves:ot};function ut(e,t,r,n,i,o,a,u){var c,s=e.style,l=e.vars,A=e.transform,m=e.transformKeys,p=e.transformOrigin;m.length=0;var d=!1,v=!1,q=!0;for(var g in t){var f=t[g];if(We(g))l[g]=f;else{var b=at[g],h=De(f,b);if(ke(g)){if(d=!0,A[g]=h,m.push(g),!q)continue;f!==(null!==(c=b.default)&&void 0!==c?c:0)&&(q=!1)}else if(xe(g))p[g]=h,v=!0;else if(n&&r&&n.isHydrated&&we[g]){var O=we[g].process(f,n,r),I=we[g].applyTo;if(I)for(var y=I.length,j=0;j0?-1:1)*((n-o)*a)/u}):(t=function(e){return Math.exp(-e*i)*((e-c)*i+1)-.001},r=function(e){return Math.exp(-e*i)*(i*i*(c-e))});var m=function(e,t,r){for(var n=r,i=1;i<12;i++)n-=e(n)/t(n);return n}(t,r,5/i);if(isNaN(m))return{stiffness:100,damping:10};var p=Math.pow(m,2)*l;return{stiffness:p,damping:2*A*Math.sqrt(l*p)}}function gr(e,t){return e*Math.sqrt(1-t*t)}var fr=["duration","bounce"],br=["stiffness","damping","mass"];function hr(e,t){return t.some((function(t){return void 0!==e[t]}))}function Or(e){var t=e.from,r=void 0===t?0:t,n=e.to,i=void 0===n?1:n,o=e.restSpeed,a=void 0===o?2:o,u=e.restDelta,c=H(e,["from","to","restSpeed","restDelta"]),s={done:!1,value:r},l=function(e){var t=R({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!hr(e,br)&&hr(e,fr)){var r=qr(e);(t=R(R(R({},t),r),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(c),A=l.stiffness,m=l.damping,p=l.mass,d=l.velocity,v=l.isResolvedFromDuration,q=Ir,g=Ir;function f(){var e=d?-d/1e3:0,t=i-r,n=m/(2*Math.sqrt(A*p)),o=Math.sqrt(A/p)/1e3;if(null!=u||(u=Math.abs(i-r)<=1?.01:.4),n<1){var a=gr(o,n);q=function(r){var u=Math.exp(-n*o*r);return i-u*((e+n*o*t)/a*Math.sin(a*r)+t*Math.cos(a*r))},g=function(r){var i=Math.exp(-n*o*r);return n*o*i*(Math.sin(a*r)*(e+n*o*t)/a+t*Math.cos(a*r))-i*(Math.cos(a*r)*(e+n*o*t)-a*t*Math.sin(a*r))}}else if(1===n)q=function(r){return i-Math.exp(-o*r)*(t+(e+o*t)*r)};else{var c=o*Math.sqrt(n*n-1);q=function(r){var a=Math.exp(-n*o*r),u=Math.min(c*r,300);return i-a*((e+n*o*t)*Math.sinh(u)+c*t*Math.cosh(u))/c}}}return f(),{next:function(e){var t=q(e);if(v)s.done=e>=c.duration;else{var r=1e3*g(e),n=Math.abs(r)<=a,o=Math.abs(i-t)<=u;s.done=n&&o}return s.value=s.done?i:t,s},flipTarget:function(){var e;d=-d,r=(e=[i,r])[0],i=e[1],f()}}}Or.needsInterpolation=function(e,t){return"string"==typeof e||"string"==typeof t};var Ir=function(e){return 0},yr=function(e,t,r){var n=t-e;return 0===n?1:(r-e)/n},jr=function(e,t,r){return-r*e+r*t+e},Cr=function(e,t){return function(r){return Boolean(Fe(r)&&He.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t))}},Er=function(e,t,r){return function(n){var i;if(!Fe(n))return n;var o=n.match(Je),a=o[0],u=o[1],c=o[2],s=o[3];return(i={})[e]=parseFloat(a),i[t]=parseFloat(u),i[r]=parseFloat(c),i.alpha=void 0!==s?parseFloat(s):1,i}},Kr=Ne(0,255),Sr=R(R({},rt),{transform:function(e){return Math.round(Kr(e))}}),Mr={test:Cr("rgb","red"),parse:Er("red","green","blue"),transform:function(e){var t=e.red,r=e.green,n=e.blue,i=e.alpha,o=void 0===i?1:i;return"rgba("+Sr.transform(t)+", "+Sr.transform(r)+", "+Sr.transform(n)+", "+Te(nt.transform(o))+")"}};var wr={test:Cr("#"),parse:function(e){var t="",r="",n="",i="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),i=e.substr(4,1),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:Mr.transform},zr={test:Cr("hsl","hue"),parse:Er("hue","saturation","lightness"),transform:function(e){var t=e.hue,r=e.saturation,n=e.lightness,i=e.alpha,o=void 0===i?1:i;return"hsla("+Math.round(t)+", "+Ve.transform(Te(r))+", "+Ve.transform(Te(n))+", "+Te(nt.transform(o))+")"}},Zr=function(e,t,r){var n=e*e,i=t*t;return Math.sqrt(Math.max(0,r*(i-n)+n))},Br=[wr,Mr,zr],Gr=function(e){return Br.find((function(t){return t.test(e)}))},kr=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},Yr=function(e,t){var r=Gr(e),n=Gr(t);Object(ee.a)(!!r,kr(e)),Object(ee.a)(!!n,kr(t)),Object(ee.a)(r.transform===n.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var i=r.parse(e),o=n.parse(t),a=R({},i),u=r===zr?jr:Zr;return function(e){for(var t in a)"alpha"!==t&&(a[t]=u(i[t],o[t],e));return a.alpha=jr(i.alpha,o.alpha,e),r.transform(a)}},xr={test:function(e){return Mr.test(e)||wr.test(e)||zr.test(e)},parse:function(e){return Mr.test(e)?Mr.parse(e):zr.test(e)?zr.parse(e):wr.parse(e)},transform:function(e){return Fe(e)?e:e.hasOwnProperty("red")?Mr.transform(e):zr.transform(e)}};function Lr(e){var t=[],r=0,n=e.match(Re);n&&(r=n.length,e=e.replace(Re,"${c}"),t.push.apply(t,n.map(xr.parse)));var i=e.match(Je);return i&&(e=e.replace(Je,"${n}"),t.push.apply(t,i.map(rt.parse))),{values:t,numColors:r,tokenised:e}}function Qr(e){return Lr(e).values}function Pr(e){var t=Lr(e),r=t.values,n=t.numColors,i=t.tokenised,o=r.length;return function(e){for(var t=i,r=0;r0},parse:Qr,createTransformer:Pr,getAnimatableNone:function(e){var t=Qr(e);return Pr(e)(t.map(Wr))}},Nr=function(e){return"number"==typeof e};function Tr(e,t){return Nr(e)?function(r){return jr(e,t,r)}:xr.test(e)?Yr(e,t):Fr(e,t)}var Jr=function(e,t){var r=U([],e),n=r.length,i=e.map((function(e,r){return Tr(e,t[r])}));return function(e){for(var t=0;t=i.numNumbers,"Complex values '"+e+"' and '"+t+"' too different to mix. Ensure all colors are of the same type."),Ar(Jr(n.parsed,i.parsed),r)},Ur=function(e,t){return function(r){return jr(e,t,r)}};function Xr(e,t,r){for(var n,i=[],o=r||("number"==typeof(n=e[0])?Ur:"string"==typeof n?xr.test(n)?Yr:Fr:Array.isArray(n)?Jr:"object"==typeof n?Rr:void 0),a=e.length-1,u=0;ue[c-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var s=Xr(t,a,u),l=2===c?function(e,t){var r=e[0],n=e[1],i=t[0];return function(e){return i(yr(r,n,e))}}(e,s):function(e,t){var r=e.length,n=r-1;return function(i){var o=0,a=!1;if(i<=e[0]?a=!0:i>=e[n]&&(o=n-1,a=!0),!a){for(var u=1;ui||u===n);u++);o=u-1}var c=yr(e[o],e[o+1],i);return t[o](c)}}(e,s);return o?function(t){return l(vr(e[0],e[c-1],t))}:l}var _r,$r=function(e){return function(t){return 1-e(1-t)}},en=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},tn=function(e){return function(t){return t*t*((e+1)*t-e)}},rn=function(e){return e},nn=(_r=2,function(e){return Math.pow(e,_r)}),on=$r(nn),an=en(nn),un=function(e){return 1-Math.sin(Math.acos(e))},cn=$r(un),sn=en(cn),ln=tn(1.525),An=$r(ln),mn=en(ln),pn=function(e){var t=tn(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}}(1.525),dn=function(e){if(1===e||0===e)return e;var t=e*e;return e<4/11?7.5625*t:e<8/11?9.075*t-9.9*e+3.4:e<.9?4356/361*t-35442/1805*e+16061/1805:10.8*e*e-20.52*e+10.72},vn=$r(dn);function qn(e,t){return e.map((function(){return t||an})).splice(0,e.length-1)}function gn(e){var t=e.from,r=void 0===t?0:t,n=e.to,i=void 0===n?1:n,o=e.ease,a=e.offset,u=e.duration,c=void 0===u?300:u,s={done:!1,value:r},l=Array.isArray(i)?i:[r,i],A=function(e,t){return e.map((function(e){return e*t}))}(a&&a.length===l.length?a:function(e){var t=e.length;return e.map((function(e,r){return 0!==r?r/(t-1):0}))}(l),c);function m(){return Vr(A,l,{ease:Array.isArray(o)?o:qn(l,o)})}var p=m();return{next:function(e){return s.value=p(e),s.done=e>=c,s},flipTarget:function(){l.reverse(),p=m()}}}var fn={keyframes:gn,spring:Or,decay:function(e){var t=e.velocity,r=void 0===t?0:t,n=e.from,i=void 0===n?0:n,o=e.power,a=void 0===o?.8:o,u=e.timeConstant,c=void 0===u?350:u,s=e.restDelta,l=void 0===s?.5:s,A=e.modifyTarget,m={done:!1,value:i},p=a*r,d=i+p,v=void 0===A?d:A(d);return v!==d&&(p=v-i),{next:function(e){var t=-p*Math.exp(-e/c);return m.done=!(t>l||t<-l),m.value=m.done?v:v+t,m},flipTarget:function(){}}}};var bn="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},hn="undefined"!=typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(bn())}),1/60*1e3)};var On=!0,In=!1,yn=!1,jn={delta:0,timestamp:0},Cn=["read","update","preRender","render","postRender"],En=Cn.reduce((function(e,t){return e[t]=function(e){var t=[],r=[],n=0,i=!1,o=new WeakSet,a={schedule:function(e,a,u){void 0===a&&(a=!1),void 0===u&&(u=!1);var c=u&&i,s=c?t:r;return a&&o.add(e),-1===s.indexOf(e)&&(s.push(e),c&&i&&(n=t.length)),e},cancel:function(e){var t=r.indexOf(e);-1!==t&&r.splice(t,1),o.delete(e)},process:function(u){var c;if(i=!0,t=(c=[r,t])[0],(r=c[1]).length=0,n=t.length)for(var s=0;s=t+r:e<=-r}(m,K,f,M)&&Z():(n.stop(),O&&O()))}return c&&(null==b||b(),(n=l(B)).start()),{stop:function(){null==h||h(),n.stop()}}}function Ln(e,t){return t?e*(1e3/t):0}var Qn=function(e){return 1e3*e},Pn=function(e,t){return 1-3*t+3*e},Wn=function(e,t){return 3*t-6*e},Dn=function(e){return 3*e},Nn=function(e,t,r){return((Pn(t,r)*e+Wn(t,r))*e+Dn(t))*e},Tn=function(e,t,r){return 3*Pn(t,r)*e*e+2*Wn(t,r)*e+Dn(t)};function Jn(e,t,r,n){if(e===t&&r===n)return rn;for(var i=new Float32Array(11),o=0;o<11;++o)i[o]=Nn(.1*o,e,r);function a(t){for(var n=0,o=1;10!==o&&i[o]<=t;++o)n+=.1;--o;var a=n+.1*((t-i[o])/(i[o+1]-i[o])),u=Tn(a,e,r);return u>=.001?function(e,t,r,n){for(var i=0;i<8;++i){var o=Tn(t,r,n);if(0===o)return t;t-=(Nn(t,r,n)-e)/o}return t}(t,a,e,r):0===u?a:function(e,t,r,n,i){var o,a,u=0;do{(o=Nn(a=t+(r-t)/2,n,i)-e)>0?r=a:t=a}while(Math.abs(o)>1e-7&&++u<10);return a}(t,n,n+.1,e,r)}return function(e){return 0===e||1===e?e:Nn(a(e),t,n)}}var Rn={linear:rn,easeIn:nn,easeInOut:an,easeOut:on,circIn:un,circInOut:sn,circOut:cn,backIn:ln,backInOut:mn,backOut:An,anticipate:pn,bounceIn:vn,bounceInOut:function(e){return e<.5?.5*(1-dn(1-2*e)):.5*dn(2*e-1)+.5},bounceOut:dn},Hn=function(e){if(Array.isArray(e)){Object(ee.a)(4===e.length,"Cubic bezier arrays must contain four numerical values.");var t=F(e,4);return Jn(t[0],t[1],t[2],t[3])}return"string"==typeof e?(Object(ee.a)(void 0!==Rn[e],"Invalid easing type '"+e+"'"),Rn[e]):e},Fn=function(e,t){return"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Dr.test(t)||t.startsWith("url(")))},Un=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Xn=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},Vn=function(){return{type:"keyframes",ease:"linear",duration:.3}},_n=function(e){return{type:"keyframes",duration:.8,values:e}},$n={x:Un,y:Un,z:Un,rotate:Un,rotateX:Un,rotateY:Un,rotateZ:Un,scaleX:Xn,scaleY:Xn,scale:Xn,opacity:Vn,backgroundColor:Vn,color:Vn,default:Xn},ei=new Set(["brightness","contrast","saturate","opacity"]);function ti(e){var t=e.slice(0,-1).split("("),r=t[0],n=t[1];if("drop-shadow"===r)return e;var i=(n.match(Je)||[])[0];if(!i)return e;var o=n.replace(i,""),a=ei.has(r)?1:0;return i!==n&&(a*=100),r+"("+a+o+")"}var ri=/([a-z-]*)\(.*?\)/g,ni=R(R({},Dr),{getAnimatableNone:function(e){var t=e.match(ri);return t?t.map(ti).join(" "):e}}),ii=R(R({},at),{color:xr,backgroundColor:xr,outlineColor:xr,fill:xr,stroke:xr,borderColor:xr,borderTopColor:xr,borderRightColor:xr,borderBottomColor:xr,borderLeftColor:xr,filter:ni,WebkitFilter:ni}),oi=function(e){return ii[e]};function ai(e,t){var r,n=oi(e);return n!==ni&&(n=Dr),null===(r=n.getAnimatableNone)||void 0===r?void 0:r.call(n,t)}var ui=!1;function ci(e){var t=e.ease,r=e.times,n=e.yoyo,i=e.flip,o=e.loop,a=H(e,["ease","times","yoyo","flip","loop"]),u=R({},a);return r&&(u.offset=r),a.duration&&(u.duration=Qn(a.duration)),a.repeatDelay&&(u.repeatDelay=Qn(a.repeatDelay)),t&&(u.ease=function(e){return Array.isArray(e)&&"number"!=typeof e[0]}(t)?t.map(Hn):Hn(t)),"tween"===a.type&&(u.type="keyframes"),(n||o||i)&&(Object(ee.b)(!ui,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),ui=!0,n?u.repeatType="reverse":o?u.repeatType="loop":i&&(u.repeatType="mirror"),u.repeat=o||n||i||a.repeat),"spring"!==a.type&&(u.type="keyframes"),u}function si(e,t,r){var n,i,o,a;return Array.isArray(t.to)&&(null!==(n=e.duration)&&void 0!==n||(e.duration=.8)),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=U([],F(e.to)),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=H(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}(e)||(e=R(R({},e),(i=r,o=t.to,a=Zt(o)?_n:$n[i]||$n.default,R({to:o},a(o))))),R(R({},t),ci(e))}function li(e,t,r,n,i){var o,a=pi(n,e),u=null!==(o=a.from)&&void 0!==o?o:t.get(),c=Fn(e,r);"none"===u&&c&&"string"==typeof r?u=ai(e,r):Ai(u)&&"string"==typeof r?u=mi(r):!Array.isArray(r)&&Ai(r)&&"string"==typeof u&&(r=mi(u));var s=Fn(e,u);return Object(ee.b)(s===c,"You are trying to animate "+e+' from "'+u+'" to "'+r+'". '+u+" is not an animatable value - to enable this animation set "+u+" to a value animatable to "+r+" via the `style` property."),s&&c&&!1!==a.type?function(){var n={from:u,to:r,velocity:t.getVelocity(),onComplete:i,onUpdate:function(e){return t.set(e)}};return"inertia"===a.type||"decay"===a.type?function(e){var t,r=e.from,n=void 0===r?0:r,i=e.velocity,o=void 0===i?0:i,a=e.min,u=e.max,c=e.power,s=void 0===c?.8:c,l=e.timeConstant,A=void 0===l?750:l,m=e.bounceStiffness,p=void 0===m?500:m,d=e.bounceDamping,v=void 0===d?10:d,q=e.restDelta,g=void 0===q?1:q,f=e.modifyTarget,b=e.driver,h=e.onUpdate,O=e.onComplete;function I(e){return void 0!==a&&eu}function y(e){return void 0===a?u:void 0===u||Math.abs(a-e)M||-1===w&&e-1&&e.splice(r,1)}var gi=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return vi(this.subscriptions,e),function(){return qi(t.subscriptions,e)}},e.prototype.notify=function(e,t,r){var n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,r);else for(var i=0;id&&g,O=Array.isArray(q)?q:[q],I=O.reduce(a,{});!1===f&&(I={});var y=v.prevResolvedValues,j=void 0===y?{}:y,C=R(R({},j),I),E=function(e){h=!0,m.delete(e),v.needsAnimating[e]=!0};for(var K in C){var S=I[K],M=j[K];p.hasOwnProperty(K)||(S!==M?Zt(S)&&Zt(M)?dr(S,M)?v.protectedKeys[K]=!0:E(K):void 0!==S?E(K):m.add(K):void 0!==S&&m.has(K)?E(K):v.protectedKeys[K]=!0)}v.prevProp=q,v.prevResolvedValues=I,v.isActive&&(p=R(R({},p),I)),o&&e.blockInitialAnimation&&(h=!1),h&&!b&&A.push.apply(A,U([],F(O.map((function(e){return{animation:e,options:R({type:i},t)}})))))},q=0;q=3;if(t||r){var i=e.point,o=Bn().timestamp;n.history.push(R(R({},i),{timestamp:o}));var a=n.handlers,u=a.onStart,c=a.onMove;t||(u&&u(n.lastMoveEvent,e),n.startEvent=n.lastMoveEvent),c&&c(n.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){n.lastMoveEvent=e,n.lastMoveEventInfo=Ti(t,n.transformPagePoint),Nt(e)&&0===e.buttons?n.handlePointerUp(e,t):Gn.update(n.updatePoint,!0)},this.handlePointerUp=function(e,t){n.end();var r=n.handlers.onEnd;if(r&&n.startEvent){var i=Ri(Ti(t,n.transformPagePoint),n.history);r&&r(e,i)}},!(Tt(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=i;var o=Ti(Ft(e),this.transformPagePoint),a=o.point,u=Bn().timestamp;this.history=[R(R({},a),{timestamp:u})];var c=t.onSessionStart;c&&c(e,Ri(o,this.history)),this.removeListeners=Ar(er(window,"pointermove",this.handlePointerMove),er(window,"pointerup",this.handlePointerUp),er(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),Sn.update(this.updatePoint)},e}();function Ti(e,t){return t?{point:t(e.point)}:e}function Ji(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ri(e,t){var r=e.point;return{point:r,delta:Ji(r,Fi(t)),offset:Ji(r,Hi(t)),velocity:Ui(t,.1)}}function Hi(e){return e[0]}function Fi(e){return e[e.length-1]}function Ui(e,t){if(e.length<2)return{x:0,y:0};for(var r=e.length-1,n=null,i=Fi(e);r>=0&&(n=e[r],!(i.timestamp-n.timestamp>Qn(t)));)r--;if(!n)return{x:0,y:0};var o=(i.timestamp-n.timestamp)/1e3;if(0===o)return{x:0,y:0};var a={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Xi(e){return e}function Vi(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}var _i={translate:0,scale:1,origin:0,originPoint:0};function $i(){return{x:R({},_i),y:R({},_i)}}function eo(e){return[e("x"),e("y")]}function to(e,t,r){var n=t.min,i=t.max;return void 0!==n&&ei&&(e=r?jr(i,e,r.max):Math.min(e,i)),e}function ro(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function no(e,t){var r,n=t.min-e.min,i=t.max-e.max;return t.max-t.minn?r=yr(t.min,t.max-n,e.min):n>i&&(r=yr(e.min,e.max-i,t.min)),vr(0,1,r)}function lo(e,t,r,n){void 0===n&&(n=.5),e.origin=n,e.originPoint=jr(t.min,t.max,e.origin),e.scale=co(r)/co(t),uo(e.scale,1,1e-4)&&(e.scale=1),e.translate=jr(r.min,r.max,e.origin)-e.originPoint,uo(e.translate)&&(e.translate=0)}function Ao(e,t,r,n){lo(e.x,t.x,r.x,mo(n.originX)),lo(e.y,t.y,r.y,mo(n.originY))}function mo(e){return"number"==typeof e?e:.5}function po(e,t,r){e.min=r.min+t.min,e.max=e.min+co(t)}var vo=function(e,t){return e.depth-t.depth};function qo(e,t){go(e,(function(){bo(function(e){var t=[],r=function(e){(e.projection.isEnabled||e.shouldResetTransform())&&t.push(e),e.children.forEach(r)};return e.children.forEach(r),t.sort(vo)}(e)),fo(e)})),!t&&e.rebaseProjectionTarget(!0,e.measureViewportBox(!1))}function go(e,t){var r=e.parent,n=e.projection.isEnabled||e.shouldResetTransform();n&&e.resetTransform(),r?go(r,t):t(),n&&e.restoreTransform()}function fo(e){if(!e.shouldResetTransform()){var t,r=e.getLayoutState();e.notifyBeforeLayoutMeasure(r.layout),r.isHydrated=!0,r.layout=e.measureViewportBox(),r.layoutCorrected=(t=r.layout,{x:R({},t.x),y:R({},t.y)}),e.notifyLayoutMeasure(r.layout,e.prevViewportBox||r.layout),Gn.update((function(){return e.rebaseProjectionTarget()}))}}function bo(e){e.forEach((function(e){return e.resetTransform()})),e.forEach(fo)}function ho(e,t){return{min:t.min-e.min,max:t.max-e.min}}function Oo(e,t){return{x:ho(e.x,t.x),y:ho(e.y,t.y)}}function Io(e,t){var r=e.getLayoutId(),n=t.getLayoutId();return r!==n||void 0===n&&e!==t}function yo(e){var t=e.getProps(),r=t.drag,n=t._dragX;return r&&!n}function jo(e,t){e.min=t.min,e.max=t.max}function Co(e,t,r){return r+t*(e-r)}function Eo(e,t,r,n,i){return void 0!==i&&(e=Co(e,i,n)),Co(e,r,n)+t}function Ko(e,t,r,n,i){void 0===t&&(t=0),void 0===r&&(r=1),e.min=Eo(e.min,t,r,n,i),e.max=Eo(e.max,t,r,n,i)}function So(e,t){var r=t.x,n=t.y;Ko(e.x,r.translate,r.scale,r.originPoint),Ko(e.y,n.translate,n.scale,n.originPoint)}function Mo(e,t,r,n){var i=F(n,3),o=i[0],a=i[1],u=i[2];e.min=t.min,e.max=t.max;var c=void 0!==r[u]?r[u]:.5,s=jr(t.min,t.max,c);Ko(e,r[o],r[a],s,r.scale)}var wo=["x","scaleX","originX"],zo=["y","scaleY","originY"];function Zo(e,t,r){Mo(e.x,t.x,r,wo),Mo(e.y,t.y,r,zo)}function Bo(e,t,r,n,i){return e=Co(e-=t,1/r,n),void 0!==i&&(e=Co(e,1/i,n)),e}function Go(e,t,r){var n=F(r,3),i=n[0],o=n[1],a=n[2];!function(e,t,r,n,i){void 0===t&&(t=0),void 0===r&&(r=1),void 0===n&&(n=.5);var o=jr(e.min,e.max,n)-t;e.min=Bo(e.min,t,r,o,i),e.max=Bo(e.max,t,r,o,i)}(e,t[i],t[o],t[a],t.scale)}function ko(e,t){Go(e.x,t,wo),Go(e.y,t,zo)}var Yo,xo=new WeakMap,Lo=function(){function e(e){var t=e.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max:1}},this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=t,this.visualElement.enableLayoutProjection(),xo.set(t,this)}return e.prototype.start=function(e,t){var r=this,n=void 0===t?{}:t,i=n.snapToCursor,o=void 0!==i&&i,a=n.cursorProgress,u=this.props.transformPagePoint;this.panSession=new Ni(e,{onSessionStart:function(t){r.stopMotion(),r.updateLayoutMeasurements(),o&&r.snapToCursor(e),r.isLayoutDrag()&&r.visualElement.lockProjectionTarget();var n=Ut(t).point;eo((function(e){var t=r.visualElement.projection.target[e],i=t.min,o=t.max;r.cursorProgress[e]=a?a[e]:yr(i,o,n[e]);var u=r.getAxisMotionValue(e);u&&(r.originPoint[e]=u.get())}))},onStart:function(e,t){var n,i,o,a=r.props,u=a.drag,c=a.dragPropagation;(!u||c||(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=or(u),r.openGlobalLock))&&(r.resolveDragConstraints(),r.isDragging=!0,r.currentDirection=null,null===(i=(n=r.props).onDragStart)||void 0===i||i.call(n,e,t),null===(o=r.visualElement.animationState)||void 0===o||o.setActive(Lt.Drag,!0))},onMove:function(e,t){var n,i,o,a,u=r.props,c=u.dragPropagation,s=u.dragDirectionLock;if(c||r.openGlobalLock){var l=t.offset;if(s&&null===r.currentDirection)return r.currentDirection=function(e,t){void 0===t&&(t=10);var r=null;Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x");return r}(l),void(null!==r.currentDirection&&(null===(i=(n=r.props).onDirectionLock)||void 0===i||i.call(n,r.currentDirection)));r.updateAxis("x",e,l),r.updateAxis("y",e,l),null===(a=(o=r.props).onDrag)||void 0===a||a.call(o,e,t),Yo=e}},onEnd:function(e,t){return r.stop(e,t)}},{transformPagePoint:u})},e.prototype.updateLayoutMeasurements=function(){qo(this.visualElement,Boolean(this.getAxisMotionValue("x")&&!this.isExternalDrag()))},e.prototype.resolveDragConstraints=function(){var e=this,t=this.props,r=t.dragConstraints,n=t.dragElastic;this.visualElement.updateLayoutProjection();var i=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!r&&(ge(r)?this.resolveRefConstraints(i,r):function(e,t){var r=t.top,n=t.left,i=t.bottom,o=t.right;return{x:ro(e.x,n,o),y:ro(e.y,r,i)}}(i,r)),this.elastic=function(e){return!1===e?e=0:!0===e&&(e=.35),{x:io(e,"left","right"),y:io(e,"top","bottom")}}(n),this.constraints&&!this.hasMutatedConstraints&&eo((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var r={};return void 0!==t.min&&(r.min=t.min-e.min),void 0!==t.max&&(r.max=t.max-e.min),r}(i[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(e,t){var r=this.props,n=r.onMeasureDragConstraints,i=r.transformPagePoint,o=t.current;Object(ee.a)(null!==o,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop."),this.constraintsBox=ao(o,i);var a=function(e,t){return{x:no(e.x,t.x),y:no(e.y,t.y)}}(e,this.constraintsBox);if(n){var u=n(function(e){var t=e.x,r=e.y;return{top:r.min,bottom:r.max,left:t.min,right:t.max}}(a));this.hasMutatedConstraints=!!u,u&&(a=Vi(u))}return a},e.prototype.cancelDrag=function(){var e;this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(Lt.Drag,!1)},e.prototype.stop=function(e,t){var r,n,i;this.visualElement.unlockProjectionTarget(),null===(r=this.panSession)||void 0===r||r.end(),this.panSession=null;var o=this.isDragging;if(this.cancelDrag(),o){var a=t.velocity;this.animateDragEnd(a),null===(i=(n=this.props).onDragEnd)||void 0===i||i.call(n,e,t)}},e.prototype.snapToCursor=function(e){var t=this;eo((function(r){if(Qo(r,t.props.drag,t.currentDirection)){var n=t.getAxisMotionValue(r);if(n){var i=Ut(e).point,o=t.visualElement.getLayoutState().layout,a=o[r].max-o[r].min,u=o[r].min+a/2,c=i[r]-u;t.originPoint[r]=i[r],n.set(c)}else t.cursorProgress[r]=.5,t.updateVisualElementAxis(r,e)}}))},e.prototype.updateAxis=function(e,t,r){if(Qo(e,this.props.drag,this.currentDirection))return this.getAxisMotionValue(e)?this.updateAxisMotionValue(e,r):this.updateVisualElementAxis(e,t)},e.prototype.updateAxisMotionValue=function(e,t){var r=this.getAxisMotionValue(e);if(t&&r){var n=this.originPoint[e]+t[e],i=this.constraints?to(n,this.constraints[e],this.elastic[e]):n;r.set(i)}},e.prototype.updateVisualElementAxis=function(e,t){var r,n=this.visualElement.getLayoutState().layout[e],i=n.max-n.min,o=this.cursorProgress[e],a=function(e,t,r,n,i){var o=e-t*r;return n?to(o,n,i):o}(Ut(t).point[e],i,o,null===(r=this.constraints)||void 0===r?void 0:r[e],this.elastic[e]);this.visualElement.setProjectionTargetAxis(e,a,a+i)},e.prototype.setProps=function(e){var t=e.drag,r=void 0!==t&&t,n=e.dragDirectionLock,i=void 0!==n&&n,o=e.dragPropagation,a=void 0!==o&&o,u=e.dragConstraints,c=void 0!==u&&u,s=e.dragElastic,l=void 0===s?.35:s,A=e.dragMomentum,m=void 0===A||A,p=H(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=R({drag:r,dragDirectionLock:i,dragPropagation:a,dragConstraints:c,dragElastic:l,dragMomentum:m},p)},e.prototype.getAxisMotionValue=function(e){var t=this.props,r=t.layout,n=t.layoutId,i="_drag"+e.toUpperCase();return this.props[i]?this.props[i]:r||void 0!==n?void 0:this.visualElement.getValue(e,0)},e.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},e.prototype.isExternalDrag=function(){var e=this.props,t=e._dragX,r=e._dragY;return t||r},e.prototype.animateDragEnd=function(e){var t=this,r=this.props,n=r.drag,i=r.dragMomentum,o=r.dragElastic,a=r.dragTransition,u=function(e,t){void 0===t&&(t=!0);var r,n=e.getProjectionParent();return!!n&&(t?ko(r=Oo(n.projection.target,e.projection.target),n.getLatestValues()):r=Oo(n.getLayoutState().layout,e.getLayoutState().layout),eo((function(t){return e.setProjectionTargetAxis(t,r[t].min,r[t].max,!0)})),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),c=this.constraints||{};if(u&&Object.keys(c).length&&this.isLayoutDrag()){var s=this.visualElement.getProjectionParent();if(s){var l=Oo(s.projection.targetFinal,c);eo((function(e){var t=l[e],r=t.min,n=t.max;c[e]={min:isNaN(r)?void 0:r,max:isNaN(n)?void 0:n}}))}}var A=eo((function(r){var s;if(Qo(r,n,t.currentDirection)){var l=null!==(s=null==c?void 0:c[r])&&void 0!==s?s:{},A=o?200:1e6,m=o?40:1e7,p=R(R({type:"inertia",velocity:i?e[r]:0,bounceStiffness:A,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10},a),l);return t.getAxisMotionValue(r)?t.startAxisValueAnimation(r,p):t.visualElement.startLayoutAnimation(r,p,u)}}));return Promise.all(A).then((function(){var e,r;null===(r=(e=t.props).onDragTransitionEnd)||void 0===r||r.call(e)}))},e.prototype.stopMotion=function(){var e=this;eo((function(t){var r=e.getAxisMotionValue(t);r?r.stop():e.visualElement.stopLayoutAnimation()}))},e.prototype.startAxisValueAnimation=function(e,t){var r=this.getAxisMotionValue(e);if(r){var n=r.get();return r.set(n),r.set(n),di(e,r,0,t)}},e.prototype.scalePoint=function(){var e=this,t=this.props,r=t.drag;if(ge(t.dragConstraints)&&this.constraintsBox){this.stopMotion();var n={x:0,y:0};eo((function(t){n[t]=so(e.visualElement.projection.target[t],e.constraintsBox[t])})),this.updateLayoutMeasurements(),this.resolveDragConstraints(),eo((function(t){if(Qo(t,r,null)){var i=function(e,t,r){var n=e.max-e.min,i=jr(t.min,t.max-n,r);return{min:i,max:i+n}}(e.visualElement.projection.target[t],e.constraintsBox[t],n[t]),o=i.min,a=i.max;e.visualElement.setProjectionTargetAxis(t,o,a)}}))}},e.prototype.mount=function(e){var t=this,r=er(e.getInstance(),"pointerdown",(function(e){var r=t.props,n=r.drag,i=r.dragListener;n&&(void 0===i||i)&&t.start(e)})),n=Wt(window,"resize",(function(){t.scalePoint()})),i=e.onLayoutUpdate((function(){t.isDragging&&t.resolveDragConstraints()})),o=e.prevDragCursor;return o&&this.start(Yo,{cursorProgress:o}),function(){null==r||r(),null==n||n(),null==i||i(),t.cancelDrag()}},e}();function Qo(e,t,r){return!(!0!==t&&t!==e||null!==r&&r!==e)}var Po,Wo,Do={pan:mr((function(e){var t=e.onPan,r=e.onPanStart,n=e.onPanEnd,i=e.onPanSessionStart,o=e.visualElement,a=t||r||n||i,u=Object(X.useRef)(null),c=Object(X.useContext)(ie).transformPagePoint,s={onSessionStart:i,onStart:r,onMove:t,onEnd:function(e,t){u.current=null,n&&n(e,t)}};Object(X.useEffect)((function(){null!==u.current&&u.current.updateHandlers(s)})),tr(o,"pointerdown",a&&function(e){u.current=new Ni(e,s,{transformPagePoint:c})}),sr((function(){return u.current&&u.current.end()}))})),drag:mr((function(e){var t=e.dragControls,r=e.visualElement,n=Object(X.useContext)(ie).transformPagePoint,i=ue((function(){return new Lo({visualElement:r})}));i.setProps(R(R({},e),{transformPagePoint:n})),Object(X.useEffect)((function(){return t&&t.subscribe(i)}),[i]),Object(X.useEffect)((function(){return i.mount(r)}),[])}))};function No(e){return"string"==typeof e&&e.startsWith("var(--")}!function(e){e[e.Entering=0]="Entering",e[e.Present=1]="Present",e[e.Exiting=2]="Exiting"}(Po||(Po={})),function(e){e[e.Hide=0]="Hide",e[e.Show=1]="Show"}(Wo||(Wo={}));var To=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Jo(e,t,r){void 0===r&&(r=1),Object(ee.a)(r<=4,'Max CSS variable fallback depth detected in property "'+e+'". This may indicate a circular fallback dependency.');var n=F(function(e){var t=To.exec(e);if(!t)return[,];var r=F(t,3);return[r[1],r[2]]}(e),2),i=n[0],o=n[1];if(i){var a=window.getComputedStyle(t).getPropertyValue(i);return a?a.trim():No(o)?Jo(o,t,r+1):o}}function Ro(e,t){return e/(t.max-t.min)*100}var Ho={process:function(e,t,r){var n=r.target;if("string"==typeof e){if(!_e.test(e))return e;e=parseFloat(e)}return Ro(e,n.x)+"% "+Ro(e,n.y)+"%"}},Fo={borderRadius:R(R({},Ho),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Ho,borderTopRightRadius:Ho,borderBottomLeftRadius:Ho,borderBottomRightRadius:Ho,boxShadow:{process:function(e,t){var r=t.delta,n=t.treeScale,i=e,o=e.includes("var("),a=[];o&&(e=e.replace(To,(function(e){return a.push(e),"_$css"})));var u=Dr.parse(e);if(u.length>5)return i;var c=Dr.createTransformer(e),s="number"!=typeof u[0]?1:0,l=r.x.scale*n.x,A=r.y.scale*n.y;u[0+s]/=l,u[1+s]/=A;var m=jr(l,A,.5);"number"==typeof u[2+s]&&(u[2+s]/=m),"number"==typeof u[3+s]&&(u[3+s]/=m);var p=c(u);if(o){var d=0;p=p.replace("_$css",(function(){var e=a[d];return d++,e}))}return p}}},Uo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},t.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},t.isAnimating={x:!1,y:!1},t.stopAxisAnimation={x:void 0,y:void 0},t.isAnimatingTree=!1,t.animate=function(e,r,n){void 0===n&&(n={});var i=n.originBox,o=n.targetBox,a=n.visibilityAction,u=n.shouldStackAnimate,c=n.onComplete,s=n.prevParent,l=H(n,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),A=t.props,m=A.visualElement,p=A.layout;if(!1===u)return t.isAnimatingTree=!1,t.safeToRemove();if(!t.isAnimatingTree||!0===u){u&&(t.isAnimatingTree=!0),r=i||r,e=o||e;var d=!1,v=m.getProjectionParent();if(v){var q=v.prevViewportBox,g=v.getLayoutState().layout;s&&(o&&(g=s.getLayoutState().layout),i&&!Io(s,v)&&s.prevViewportBox&&(q=s.prevViewportBox)),q&&ta(s,i,o)&&(d=!0,r=Oo(q,r),e=Oo(g,e))}var f=Xo(r,e),b=eo((function(n){var i,o;if("position"===p){var u=e[n].max-e[n].min;r[n].max=r[n].min+u}if(!m.projection.isTargetLocked)return void 0===a?f?t.animateAxis(n,e[n],r[n],R(R({},l),{isRelative:d})):(null===(o=(i=t.stopAxisAnimation)[n])||void 0===o||o.call(i),m.setProjectionTargetAxis(n,e[n].min,e[n].max,d)):void m.setVisibility(a===Wo.Show)}));return m.syncRender(),Promise.all(b).then((function(){t.isAnimatingTree=!1,c&&c(),m.notifyLayoutAnimationComplete()}))}},t}return J(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.visualElement;t.animateMotionValue=di,t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate),t.layoutSafeToRemove=function(){return e.safeToRemove()},function(e){for(var t in e)we[t]=e[t]}(Fo)},t.prototype.componentWillUnmount=function(){var e=this;this.unsubLayoutReady(),eo((function(t){var r,n;return null===(n=(r=e.stopAxisAnimation)[t])||void 0===n?void 0:n.call(r)}))},t.prototype.animateAxis=function(e,t,r,n){var i,o,a=this,u=void 0===n?{}:n,c=u.transition,s=u.isRelative;if(!this.isAnimating[e]||!$o(t,this.currentAnimationTarget[e])){null===(o=(i=this.stopAxisAnimation)[e])||void 0===o||o.call(i),this.isAnimating[e]=!0;var l=this.props.visualElement,A=this.frameTarget[e],m=l.getProjectionAnimationProgress()[e];m.clearListeners(),m.set(0),m.set(0);var p=function(){var n=m.get()/1e3;!function(e,t,r,n){e.min=jr(t.min,r.min,n),e.max=jr(t.max,r.max,n)}(A,r,t,n),l.setProjectionTargetAxis(e,A.min,A.max,s)};p();var d=m.onChange(p);this.stopAxisAnimation[e]=function(){a.isAnimating[e]=!1,m.stop(),d()},this.currentAnimationTarget[e]=t;var v=c||l.getDefaultTransition()||ea;return di("x"===e?"layoutX":"layoutY",m,1e3,v&&pi(v,"layout")).then(this.stopAxisAnimation[e])}},t.prototype.safeToRemove=function(){var e,t;null===(t=(e=this.props).safeToRemove)||void 0===t||t.call(e)},t.prototype.render=function(){return null},t}(X.Component);function Xo(e,t){return!(_o(e)||_o(t)||$o(e.x,t.x)&&$o(e.y,t.y))}var Vo={min:0,max:0};function _o(e){return $o(e.x,Vo)&&$o(e.y,Vo)}function $o(e,t){return e.min===t.min&&e.max===t.max}var ea={duration:.45,ease:[.4,0,.1,1]};function ta(e,t,r){return e||!e&&!(t||r)}var ra={layoutReady:function(e){return e.notifyLayoutReady()}};function na(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var r=void 0===t?ra:t,n=r.layoutReady,i=r.parent,o=Array.from(e).sort(vo);i?go(i,(function(){bo(o)})):bo(o),o.forEach(n),o.forEach((function(e){e.isPresent&&(e.presence=Po.Present)})),Mn.preRender(),Mn.render(),Gn.postRender((function(){return o.forEach(ia)})),e.clear()}}}function ia(e){e.prevViewportBox=e.projection.target}var oa=Object(X.createContext)(na()),aa=Object(X.createContext)(na());function ua(e){return!!e.forceUpdate}var ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return J(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.syncLayout,r=e.framerSyncLayout,n=e.visualElement;ua(t)&&t.register(n),ua(r)&&r.register(n),n.onUnmount((function(){ua(t)&&t.remove(n),ua(r)&&r.remove(n)}))},t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.syncLayout,r=e.visualElement;return ua(t)?t.syncUpdate():(!function(e){e.shouldResetTransform()||(e.prevViewportBox=e.measureViewportBox(!1),e.rebaseProjectionTarget(!1,e.prevViewportBox))}(r),t.add(r)),null},t.prototype.componentDidUpdate=function(){var e=this.props.syncLayout;ua(e)||e.flush()},t.prototype.render=function(){return null},t}(V.a.Component);var sa={measureLayout:function(e){var t=Object(X.useContext)(oa),r=Object(X.useContext)(aa);return V.a.createElement(ca,R({},e,{syncLayout:t,framerSyncLayout:r}))},layoutAnimation:function(e){var t=F(ce(),2)[1];return X.createElement(Uo,R({},e,{safeToRemove:t}))}};function la(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:$i(),deltaFinal:$i(),deltaTransform:""}}var Aa=la();function ma(e,t,r){var n=e.x,i=e.y,o="translate3d("+n.translate/t.x+"px, "+i.translate/t.y+"px, 0) ";if(r){var a=r.rotate,u=r.rotateX,c=r.rotateY;a&&(o+="rotate("+a+") "),u&&(o+="rotateX("+u+") "),c&&(o+="rotateY("+c+") ")}return o+="scale("+n.scale+", "+i.scale+")",r||o!==da?o:""}function pa(e){var t=e.deltaFinal;return 100*t.x.origin+"% "+100*t.y.origin+"% 0"}var da=ma(Aa.delta,Aa.treeScale,{x:1,y:1}),va=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function qa(e,t,r,n){var i,o,a=e.delta,u=e.layout,c=e.layoutCorrected,s=e.treeScale,l=t.target;o=u,jo((i=c).x,o.x),jo(i.y,o.y),function(e,t,r){var n=r.length;if(n){var i,o;t.x=t.y=1;for(var a=0;a=0;t--){var r=H.path[t];if(r.projection.isEnabled){e=r;break}}h=e}return h},resolveRelativeTargetBox:function(){var e=H.getProjectionParent();if(S.relativeTarget&&e&&(function(e,t){po(e.target.x,e.relativeTarget.x,t.target.x),po(e.target.y,e.relativeTarget.y,t.target.y)}(S,e.projection),yo(e))){var t=S.target;Zo(t,t,e.getLatestValues())}},shouldResetTransform:function(){return Boolean(v._layoutResetTransform)},pointTo:function(e){M=e.projection,w=e.getLatestValues(),null==O||O(),O=Ar(e.onSetAxisTarget(H.scheduleUpdateLayoutProjection),e.onLayoutAnimationComplete((function(){var e;H.isPresent?H.presence=Po.Present:null===(e=H.layoutSafeToRemove)||void 0===e||e.call(H)})))},isPresent:!0,presence:Po.Entering});return H}};function ba(e){e.resolveRelativeTargetBox()}function ha(e){e.updateLayoutProjection()}var Oa,Ia=U(["initial"],F(Zi)),ya=Ia.length,ja=new Set(["width","height","top","left","right","bottom","x","y"]),Ca=function(e){return ja.has(e)},Ea=function(e,t){e.set(t,!1),e.set(t)},Ka=function(e){return e===rt||e===_e};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(Oa||(Oa={}));var Sa=function(e,t){return parseFloat(e.split(", ")[t])},Ma=function(e,t){return function(r,n){var i=n.transform;if("none"===i||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return Sa(o[1],t);var a=i.match(/^matrix\((.+)\)$/);return a?Sa(a[1],e):0}},wa=new Set(["x","y","z"]),za=Ze.filter((function(e){return!wa.has(e)}));var Za={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var r=t.top;return parseFloat(r)},left:function(e,t){var r=t.left;return parseFloat(r)},bottom:function(e,t){var r=e.y,n=t.top;return parseFloat(n)+(r.max-r.min)},right:function(e,t){var r=e.x,n=t.left;return parseFloat(n)+(r.max-r.min)},x:Ma(4,13),y:Ma(5,14)},Ba=function(e,t,r,n){void 0===r&&(r={}),void 0===n&&(n={}),t=R({},t),n=R({},n);var i=Object.keys(t).filter(Ca),o=[],a=!1,u=[];if(i.forEach((function(i){var c=e.getValue(i);if(e.hasValue(i)){var s,l=r[i],A=t[i],m=Ii(l);if(Zt(A))for(var p=A.length,d=null===A[0]?1:0;d0?"mixed":"false",Object(n.createElement)("div",{role:"group","aria-labelledby":p,className:"edit-post-manage-blocks-modal__category"},Object(n.createElement)(d.CheckboxControl,{checked:v,onChange:u,className:"edit-post-manage-blocks-modal__category-title","aria-checked":l,label:Object(n.createElement)("span",{id:p},r)}),Object(n.createElement)(lu,{blockTypes:s,value:A,onItemChange:a}))}));var pu=Object(g.compose)([Object(g.withState)({search:""}),Object(v.withSelect)((function(e){var t=e(p.store),r=t.getBlockTypes,n=t.getCategories,i=t.hasBlockSupport,o=t.isMatchingSearchTerm,a=(0,e(C.a).getPreference)("hiddenBlockTypes"),u=Object(m.isArray)(a)&&a.length;return{blockTypes:r(),categories:n(),hasBlockSupport:i,isMatchingSearchTerm:o,numberOfHiddenBlocks:u}}))])((function(e){var t=e.search,r=e.setState,i=e.blockTypes,o=e.categories,a=e.hasBlockSupport,u=e.isMatchingSearchTerm,c=e.numberOfHiddenBlocks;return i=i.filter((function(e){return a(e,"inserter",!0)&&(!t||u(e,t))&&(!e.parent||Object(m.includes)(e.parent,"core/post-content"))})),Object(n.createElement)("div",{className:"edit-post-manage-blocks-modal__content"},Object(n.createElement)(d.TextControl,{type:"search",label:Object(q.__)("Search for a block"),value:t,onChange:function(e){return r({search:e})},className:"edit-post-manage-blocks-modal__search"}),!!c&&Object(n.createElement)("div",{className:"edit-post-manage-blocks-modal__disabled-blocks-count"},Object(q.sprintf)(Object(q._n)("%d block is disabled.","%d blocks are disabled.",c),c)),Object(n.createElement)("div",{tabIndex:"0",role:"region","aria-label":Object(q.__)("Available block types"),className:"edit-post-manage-blocks-modal__results"},0===i.length&&Object(n.createElement)("p",{className:"edit-post-manage-blocks-modal__no-results"},Object(q.__)("No blocks found.")),o.map((function(e){return Object(n.createElement)(mu,{key:e.slug,title:e.title,blockTypes:Object(m.filter)(i,{category:e.slug})})})),Object(n.createElement)(mu,{title:Object(q.__)("Uncategorized"),blockTypes:Object(m.filter)(i,(function(e){return!e.category}))})))}));var du=Object(g.compose)([Object(v.withSelect)((function(e){return{isActive:(0,e(C.a).isModalActive)("edit-post/manage-blocks")}})),Object(v.withDispatch)((function(e){return{closeModal:e(C.a).closeModal}}))])((function(e){var t=e.isActive,r=e.closeModal;return t?Object(n.createElement)(d.Modal,{className:"edit-post-manage-blocks-modal",title:Object(q.__)("Block Manager"),closeLabel:Object(q.__)("Close"),onRequestClose:r},Object(n.createElement)(pu,null)):null})),vu=function(e){var t=e.description,r=e.title,i=e.children;return Object(n.createElement)("section",{className:"edit-post-preferences-modal__section"},Object(n.createElement)("h2",{className:"edit-post-preferences-modal__section-title"},r),t&&Object(n.createElement)("p",{className:"edit-post-preferences-modal__section-description"},t),i)},qu=r(66);var gu=Object(v.withSelect)((function(e){var t=e("core/editor").getEditorSettings,r=e(C.a).getAllMetaBoxes;return{areCustomFieldsRegistered:void 0!==t().enableCustomFields,metaBoxes:r()}}))((function(e){var t=e.areCustomFieldsRegistered,r=e.metaBoxes,i=Object(A.a)(e,["areCustomFieldsRegistered","metaBoxes"]),o=Object(m.filter)(r,(function(e){return"postcustom"!==e.id}));return t||0!==o.length?Object(n.createElement)(vu,i,t&&Object(n.createElement)(qu.a,{label:Object(q.__)("Custom fields")}),Object(m.map)(o,(function(e){var t=e.id,r=e.title;return Object(n.createElement)(qu.c,{key:t,label:r,panelName:"meta-box-".concat(t)})}))):null}));function fu(){var e,t=Object(g.useViewportMatch)("medium"),r=Object(v.useDispatch)(C.a).closeModal,o=Object(v.useSelect)((function(e){var t=e(a.store).getEditedPostAttribute,r=(0,e(i.store).getPostType)(t("type"));return{isModalActive:e(C.a).isModalActive("edit-post/preferences"),isViewable:Object(m.get)(r,["viewable"],!1)}}),[]),u=o.isModalActive,c=o.isViewable,s=Object(v.useSelect)((function(e){var r=e(a.store).getEditorSettings,n=e(C.a),i=n.getEditorMode,o=n.isFeatureActive,u=i(),c=r().richEditingEnabled;return!o("reducedUI")&&t&&c&&"visual"===u}),[t]),l=Object(n.useMemo)((function(){return[{name:"general",tabLabel:Object(q.__)("General"),content:Object(n.createElement)(n.Fragment,null,t&&Object(n.createElement)(vu,{title:Object(q.__)("Choose your own experience")},Object(n.createElement)(qu.e,{help:Object(q.__)("Review settings such as categories and tags."),label:Object(q.__)("Include pre-publish checklist")})),Object(n.createElement)(vu,{title:Object(q.__)("Decide what to focus on")},Object(n.createElement)(qu.b,{featureName:"reducedUI",help:Object(q.__)("Compacts options and outlines in the toolbar."),label:Object(q.__)("Reduce the interface")}),Object(n.createElement)(qu.b,{featureName:"focusMode",help:Object(q.__)("Highlights the current block and fades other content."),label:Object(q.__)("Spotlight mode")}),s&&Object(n.createElement)(qu.b,{featureName:"showBlockBreadcrumbs",help:Object(q.__)("Shows block breadcrumbs at the bottom of the editor."),label:Object(q.__)("Display block breadcrumbs")})))},{name:"appearance",tabLabel:Object(q.__)("Appearance"),content:Object(n.createElement)(vu,{title:Object(q.__)("Choose the way it looks")},Object(n.createElement)(qu.b,{featureName:"showIconLabels",help:Object(q.__)("Shows text instead of icons in toolbar."),label:Object(q.__)("Display button labels")}),Object(n.createElement)(qu.b,{featureName:"themeStyles",help:Object(q.__)("Make the editor look like your theme."),label:Object(q.__)("Use theme styles")}))},{name:"blocks",tabLabel:Object(q.__)("Blocks"),content:Object(n.createElement)(vu,{title:Object(q.__)("Choose how you interact with blocks")},Object(n.createElement)(qu.b,{featureName:"mostUsedBlocks",help:Object(q.__)("Places the most frequent blocks in the block library."),label:Object(q.__)("Show most used blocks")}),Object(n.createElement)(qu.b,{featureName:"keepCaretInsideBlock",help:Object(q.__)("Aids screen readers by stopping text caret from leaving blocks."),label:Object(q.__)("Contain text cursor inside block")}))},{name:"panels",tabLabel:Object(q.__)("Panels"),content:Object(n.createElement)(n.Fragment,null,Object(n.createElement)(vu,{title:Object(q.__)("Document settings"),description:Object(q.__)("Choose what displays in the panel.")},Object(n.createElement)(qu.d.Slot,null),c&&Object(n.createElement)(qu.c,{label:Object(q.__)("Permalink"),panelName:"post-link"}),c&&Object(n.createElement)(qu.c,{label:Object(q.__)("Template"),panelName:"template"}),Object(n.createElement)(a.PostTaxonomies,{taxonomyWrapper:function(e,t){return Object(n.createElement)(qu.c,{label:Object(m.get)(t,["labels","menu_name"]),panelName:"taxonomy-panel-".concat(t.slug)})}}),Object(n.createElement)(a.PostFeaturedImageCheck,null,Object(n.createElement)(qu.c,{label:Object(q.__)("Featured image"),panelName:"featured-image"})),Object(n.createElement)(a.PostExcerptCheck,null,Object(n.createElement)(qu.c,{label:Object(q.__)("Excerpt"),panelName:"post-excerpt"})),Object(n.createElement)(a.PostTypeSupportCheck,{supportKeys:["comments","trackbacks"]},Object(n.createElement)(qu.c,{label:Object(q.__)("Discussion"),panelName:"discussion-panel"})),Object(n.createElement)(a.PageAttributesCheck,null,Object(n.createElement)(qu.c,{label:Object(q.__)("Page attributes"),panelName:"page-attributes"}))),Object(n.createElement)(vu,{title:Object(q.__)("Additional"),description:Object(q.__)("Add extra areas to the editor.")},Object(n.createElement)(gu,null)))}]}),[c,t,s]),A=Object(n.useState)("preferences-menu"),p=Object(x.a)(A,2),f=p[0],b=p[1],h=Object(n.useMemo)((function(){return l.reduce((function(e,t){var r=t.name,n=t.tabLabel,i=t.content;return e.tabs.push({name:r,title:n}),e.sectionsContentMap[r]=i,e}),{tabs:[],sectionsContentMap:{}})}),[l]),O=h.tabs,I=h.sectionsContentMap,y=Object(n.useCallback)((function(e){return I[e.name]||null}),[I]);return u?(e=t?Object(n.createElement)(d.TabPanel,{className:"edit-post-preferences__tabs",tabs:O,initialTabName:"preferences-menu"!==f?f:void 0,onSelect:b,orientation:"vertical"},y):Object(n.createElement)(d.__experimentalNavigation,{activeMenu:f,onActivateMenu:b},Object(n.createElement)(d.__experimentalNavigationMenu,{menu:"preferences-menu"},O.map((function(e){return Object(n.createElement)(d.__experimentalNavigationItem,{key:e.name,title:e.title,navigateToMenu:e.name})}))),l.map((function(e){return Object(n.createElement)(d.__experimentalNavigationMenu,{key:"".concat(e.name,"-menu"),menu:e.name,title:e.tabLabel,parentMenu:"preferences-menu"},Object(n.createElement)(d.__experimentalNavigationItem,null,e.content))}))),Object(n.createElement)(d.Modal,{className:"edit-post-preferences-modal",title:Object(q.__)("Preferences"),closeLabel:Object(q.__)("Close"),onRequestClose:r},e)):null}var bu=r(25),hu=r(26),Ou=r(33),Iu=r(34),yu=r(22);function ju(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Object(yu.a)(e);if(t){var i=Object(yu.a)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Object(Iu.a)(this,r)}}var Cu=function(e){Object(Ou.a)(r,e);var t=ju(r);function r(){var e;return Object(bu.a)(this,r),(e=t.apply(this,arguments)).state={historyId:null},e}return Object(hu.a)(r,[{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.postId,n=t.postStatus,i=t.postType,o=t.isSavingPost,a=this.state.historyId;"trash"!==n||o?r===e.postId&&r===a||"auto-draft"===n||!r||this.setBrowserURL(r):this.setTrashURL(r,i)}},{key:"setTrashURL",value:function(e,t){window.location.href=function(e,t){return Object(I.addQueryArgs)("edit.php",{trashed:1,post_type:t,ids:e})}(e,t)}},{key:"setBrowserURL",value:function(e){window.history.replaceState({id:e},"Post "+e,function(e){return Object(I.addQueryArgs)("post.php",{post:e,action:"edit"})}(e)),this.setState((function(){return{historyId:e}}))}},{key:"render",value:function(){return null}}]),r}(n.Component),Eu=Object(v.withSelect)((function(e){var t=e("core/editor"),r=t.getCurrentPost,n=t.isSavingPost,i=r(),o=i.id,a=i.status,u=i.type;return["wp_template","wp_template_part"].includes(u)&&(o=i.wp_id),{postId:o,postStatus:a,postType:u,isSavingPost:n()}}))(Cu),Ku=r(439);var Su=function(e){var t=e.showTooltip,r=e.icon,i=e.href,o=Object(v.useSelect)((function(e){var t=e("core/editor").getCurrentPostType,r=e(C.a).isFeatureActive,n=e("core/data").isResolving,i=e("core"),o=i.getEntityRecord,a=i.getPostType,u=o("root","__unstableBase",void 0)||{};return{isActive:r("fullscreenMode"),isRequestingSiteIcon:n("core","getEntityRecord",["root","__unstableBase",void 0]),postType:a(t()),siteIconUrl:u.site_icon_url}}),[]),a=o.isActive,u=o.isRequestingSiteIcon,c=o.postType,s=o.siteIconUrl;if(!a||!c)return null;var l=Object(n.createElement)(d.Icon,{size:"36px",icon:Ku.a});return s&&(l=Object(n.createElement)("img",{alt:Object(q.__)("Site Icon"),className:"edit-post-fullscreen-mode-close_site-icon",src:s})),u&&(l=null),r&&(l=Object(n.createElement)(d.Icon,{size:"36px",icon:r})),Object(n.createElement)(d.Button,{className:"edit-post-fullscreen-mode-close has-icon",href:null!=i?i:Object(I.addQueryArgs)("edit.php",{post_type:c.slug}),label:Object(m.get)(c,["labels","view_items"],Object(q.__)("Back")),showTooltip:t},l)},Mu=r(218);var wu=function(){var e,t=Object(v.useSelect)((function(e){var t=e(C.a),r=t.isEditingTemplate,n=t.getEditedPostTemplate,i=r();return{template:i?n():null,isEditing:i}}),[]),r=t.template;if(!t.isEditing||!r)return null;var i=Object(q.__)("Default");return null!=r&&null!==(e=r.title)&&void 0!==e&&e.raw?i=r.title.raw:r&&(i=r.slug),Object(n.createElement)("span",{className:"edit-post-template-title"},Object(q.sprintf)(Object(q.__)("Editing template: %s"),i))};var zu=function(){var e=Object(n.useRef)(),t=Object(v.useDispatch)(C.a).setIsInserterOpened,r=Object(v.useSelect)((function(e){var t=e("core/block-editor"),r=t.hasInserterItems,n=t.getBlockRootClientId,i=t.getBlockSelectionEnd;return{hasFixedToolbar:e(C.a).isFeatureActive("fixedToolbar"),isInserterEnabled:"visual"===e(C.a).getEditorMode()&&e("core/editor").getEditorSettings().richEditingEnabled&&r(n(i())),isInserterOpened:e(C.a).isInserterOpened(),isTextModeEnabled:"text"===e(C.a).getEditorMode(),previewDeviceType:e(C.a).__experimentalGetPreviewDeviceType(),showIconLabels:e(C.a).isFeatureActive("showIconLabels"),isNavigationTool:e("core/block-editor").isNavigationMode(),isTemplateMode:e(C.a).isEditingTemplate()}}),[]),i=r.hasFixedToolbar,u=r.isInserterEnabled,c=r.isInserterOpened,s=r.isTextModeEnabled,l=r.previewDeviceType,A=r.showIconLabels,m=r.isNavigationTool,p=r.isTemplateMode,f=Object(g.useViewportMatch)("medium"),b=Object(g.useViewportMatch)("wide"),h=Object(g.useViewportMatch)("small","<"),O=Object(v.useDispatch)("core/block-editor").setNavigationMode,I=!f||"Desktop"!==l||i,y=I?Object(q.__)("Document and block tools"):Object(q.__)("Document tools"),j=function(e){O("edit"!==e)},E=Object(n.createElement)(n.Fragment,null,Object(n.createElement)(d.ToolbarItem,{as:a.TableOfContents,hasOutlineItemsDisabled:s,repositionDropdown:A&&!b,showTooltip:!A,isTertiary:A}),Object(n.createElement)(d.ToolbarItem,{as:o.BlockNavigationDropdown,isDisabled:s,showTooltip:!A,isTertiary:A}));return Object(n.createElement)(o.NavigableToolbar,{className:"edit-post-header-toolbar","aria-label":y},Object(n.createElement)("div",{className:"edit-post-header-toolbar__left"},Object(n.createElement)(d.ToolbarItem,{ref:e,as:d.Button,className:"edit-post-header-toolbar__inserter-toggle",isPrimary:!0,isPressed:c,onMouseDown:function(e){e.preventDefault()},onClick:function(){c?e.current.focus():t(!0)},disabled:!u,icon:Mu.a,label:Object(q._x)("Toggle block inserter","Generic label for block inserter button"),showTooltip:!A},A&&Object(q.__)("Add")),(b||!A)&&Object(n.createElement)(n.Fragment,null,f&&Object(n.createElement)(d.ToolbarItem,{as:o.ToolSelector,showTooltip:!A,isTertiary:A,disabled:s}),Object(n.createElement)(d.ToolbarItem,{as:a.EditorHistoryUndo,showTooltip:!A,isTertiary:A}),Object(n.createElement)(d.ToolbarItem,{as:a.EditorHistoryRedo,showTooltip:!A,isTertiary:A}),E),!b&&!h&&A&&Object(n.createElement)(d.DropdownMenu,{position:"bottom right",label:Object(q.__)("Tools")},(function(){return Object(n.createElement)("div",{className:"edit-post-header__dropdown"},Object(n.createElement)(d.MenuGroup,{label:Object(q.__)("Modes")},Object(n.createElement)(d.MenuItemsChoice,{value:m?"select":"edit",onSelect:j,choices:[{value:"edit",label:Object(q.__)("Edit")},{value:"select",label:Object(q.__)("Select")}]})),Object(n.createElement)(d.MenuGroup,{label:Object(q.__)("Edit")},Object(n.createElement)(a.EditorHistoryUndo,{showTooltip:!A,isTertiary:A}),Object(n.createElement)(a.EditorHistoryRedo,{showTooltip:!A,isTertiary:A})),Object(n.createElement)(d.MenuGroup,null,E))}))),Object(n.createElement)(wu,null),I&&Object(n.createElement)("div",{className:Q()("edit-post-header-toolbar__block-toolbar",{"is-pushed-down":p})},Object(n.createElement)(o.BlockToolbar,{hideDragHandle:!0})))},Zu=r(309);function Bu(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 Gu(e){for(var t=1;t icon."),{InserterIconImage:Object(n.createElement)(Uc,{className:"edit-post-welcome-guide__inserter-icon"})})))},{image:Object(n.createElement)(Fc,null),content:Object(n.createElement)(n.Fragment,null,Object(n.createElement)("h1",{className:"edit-post-welcome-guide__heading"},Object(q.__)("Learn how to use the block editor")),Object(n.createElement)("p",{className:"edit-post-welcome-guide__text"},Object(q.__)("New to the block editor? Want to learn more about using it? "),Object(n.createElement)(d.ExternalLink,{href:Object(q.__)("https://wordpress.org/support/article/wordpress-editor/")},Object(q.__)("Here's a detailed guide."))))}]}):null}var Vc=Object(d.createSlotFill)("PluginPostPublishPanel"),_c=Vc.Fill,$c=Vc.Slot,es=Object(g.compose)(Object(O.withPluginContext)((function(e,t){return{icon:t.icon||e.icon}})))((function(e){var t=e.children,r=e.className,i=e.title,o=e.initialOpen,a=void 0!==o&&o,u=e.icon;return Object(n.createElement)(_c,null,Object(n.createElement)(d.PanelBody,{className:r,initialOpen:a||!i,title:i,icon:u},t))}));es.Slot=$c;var ts=es,rs=Object(d.createSlotFill)("PluginPrePublishPanel"),ns=rs.Fill,is=rs.Slot,os=Object(g.compose)(Object(O.withPluginContext)((function(e,t){return{icon:t.icon||e.icon}})))((function(e){var t=e.children,r=e.className,i=e.title,o=e.initialOpen,a=void 0!==o&&o,u=e.icon;return Object(n.createElement)(ns,null,Object(n.createElement)(d.PanelBody,{className:r,initialOpen:a||!i,title:i,icon:u},t))}));os.Slot=is;var as=os,us=Object(d.createSlotFill)("ActionsPanel"),cs=(us.Fill,us.Slot);function ss(e){var t,r=e.setEntitiesSavedStatesCallback,i=e.closeEntitiesSavedStates,o=e.isEntitiesSavedStatesOpen,u=Object(v.useDispatch)(C.a),c=u.closePublishSidebar,s=u.togglePublishSidebar,l=Object(v.useSelect)((function(e){return{publishSidebarOpened:e(C.a).isPublishSidebarOpened(),hasActiveMetaboxes:e(C.a).hasMetaBoxes(),isSavingMetaBoxes:e(C.a).isSavingMetaBoxes(),hasNonPostEntityChanges:e("core/editor").hasNonPostEntityChanges()}}),[]),A=l.publishSidebarOpened,m=l.hasActiveMetaboxes,p=l.isSavingMetaBoxes,g=l.hasNonPostEntityChanges,f=Object(n.useCallback)((function(){return r(!0)}),[]);return t=A?Object(n.createElement)(a.PostPublishPanel,{onClose:c,forceIsDirty:m,forceIsSaving:p,PrePublishExtension:as.Slot,PostPublishExtension:ts.Slot}):g?Object(n.createElement)("div",{className:"edit-post-layout__toggle-entities-saved-states-panel"},Object(n.createElement)(d.Button,{isSecondary:!0,className:"edit-post-layout__toggle-entities-saved-states-panel-button",onClick:f,"aria-expanded":!1},Object(q.__)("Open save panel"))):Object(n.createElement)("div",{className:"edit-post-layout__toggle-publish-panel"},Object(n.createElement)(d.Button,{isSecondary:!0,className:"edit-post-layout__toggle-publish-panel-button",onClick:s,"aria-expanded":!1},Object(q.__)("Open publish panel"))),Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.EntitiesSavedStates,{isOpen:o,close:i}),Object(n.createElement)(cs,{bubblesVirtually:!0}),!o&&t)}var ls={secondarySidebar:Object(q.__)("Block library"),header:Object(q.__)("Editor top bar"),body:Object(q.__)("Editor content"),sidebar:Object(q.__)("Editor settings"),actions:Object(q.__)("Editor publish"),footer:Object(q.__)("Editor footer")};var As=function(e){var t=e.styles,r=Object(g.useViewportMatch)("medium","<"),i=Object(g.useViewportMatch)("huge",">="),u=Object(v.useDispatch)(C.a),c=u.openGeneralSidebar,s=u.closeGeneralSidebar,A=u.setIsInserterOpened,m=Object(v.useSelect)((function(e){var t=e("core/editor").getEditorSettings();return{hasFixedToolbar:e(C.a).isFeatureActive("fixedToolbar"),sidebarIsOpened:!(!e(P.g).getActiveComplementaryArea(C.a.name)&&!e(C.a).isPublishSidebarOpened()),isFullscreenActive:e(C.a).isFeatureActive("fullscreenMode"),showMostUsedBlocks:e(C.a).isFeatureActive("mostUsedBlocks"),isInserterOpened:e(C.a).isInserterOpened(),mode:e(C.a).getEditorMode(),isRichEditingEnabled:t.richEditingEnabled,hasActiveMetaboxes:e(C.a).hasMetaBoxes(),previousShortcut:e(D.store).getAllShortcutRawKeyCombinations("core/edit-post/previous-region"),nextShortcut:e(D.store).getAllShortcutRawKeyCombinations("core/edit-post/next-region"),showIconLabels:e(C.a).isFeatureActive("showIconLabels"),hasReducedUI:e(C.a).isFeatureActive("reducedUI"),showBlockBreadcrumbs:e(C.a).isFeatureActive("showBlockBreadcrumbs")}}),[]),p=m.mode,f=m.isFullscreenActive,b=m.isRichEditingEnabled,h=m.sidebarIsOpened,I=m.hasActiveMetaboxes,y=m.hasFixedToolbar,j=m.previousShortcut,E=m.nextShortcut,K=m.hasBlockSelected,S=m.showMostUsedBlocks,M=m.isInserterOpened,w=m.showIconLabels,z=m.hasReducedUI,Z=m.showBlockBreadcrumbs,B=Q()("edit-post-layout","is-mode-"+p,{"is-sidebar-opened":h,"has-fixed-toolbar":y,"has-metaboxes":I,"show-icon-labels":w});Object(n.useEffect)((function(){h&&!i&&A(!1)}),[h,i]),Object(n.useEffect)((function(){M&&!i&&s()}),[M,i]);var G=Object(n.useState)(!1),k=Object(x.a)(G,2),Y=k[0],L=k[1],T=Object(n.useCallback)((function(e){"function"==typeof Y&&Y(e),L(!1)}),[Y]),J=Object(g.__experimentalUseDialog)({onClose:function(){return A(!1)}}),R=Object(x.a)(J,2),H=R[0],F=R[1];return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(P.d,{isActive:f}),Object(n.createElement)(Eu,null),Object(n.createElement)(a.UnsavedChangesWarning,null),Object(n.createElement)(a.AutosaveMonitor,null),Object(n.createElement)(a.LocalAutosaveMonitor,null),Object(n.createElement)(eu,null),Object(n.createElement)(a.EditorKeyboardShortcutsRegister,null),Object(n.createElement)(Tc,null),Object(n.createElement)(P.e,{className:B,labels:ls,header:Object(n.createElement)(ec,{setEntitiesSavedStatesCallback:L}),secondarySidebar:"visual"===p&&M&&Object(n.createElement)("div",Object(l.a)({ref:H},F,{className:"edit-post-layout__inserter-panel"}),Object(n.createElement)("div",{className:"edit-post-layout__inserter-panel-header"},Object(n.createElement)(d.Button,{icon:W.a,onClick:function(){return A(!1)}})),Object(n.createElement)("div",{className:"edit-post-layout__inserter-panel-content"},Object(n.createElement)(o.__experimentalLibrary,{showMostUsedBlocks:S,showInserterHelpPanel:!0,shouldFocusBlock:r}))),sidebar:(!r||h)&&Object(n.createElement)(n.Fragment,null,!r&&!h&&Object(n.createElement)("div",{className:"edit-post-layout__toogle-sidebar-panel"},Object(n.createElement)(d.Button,{isSecondary:!0,className:"edit-post-layout__toogle-sidebar-panel-button",onClick:function(){return c(K?"edit-post/block":"edit-post/document")},"aria-expanded":!1},K?Object(q.__)("Open block settings"):Object(q.__)("Open document settings"))),Object(n.createElement)(P.b.Slot,{scope:"core/edit-post"})),content:Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.EditorNotices,null),("text"===p||!b)&&Object(n.createElement)(N,null),b&&"visual"===p&&Object(n.createElement)($a,{styles:t}),Object(n.createElement)("div",{className:"edit-post-layout__metaboxes"},Object(n.createElement)(kc,{location:"normal"}),Object(n.createElement)(kc,{location:"advanced"})),r&&h&&Object(n.createElement)(d.ScrollLock,null)),footer:!z&&Z&&!r&&b&&"visual"===p&&Object(n.createElement)("div",{className:"edit-post-layout__footer"},Object(n.createElement)(o.BlockBreadcrumb,null)),actions:Object(n.createElement)(ss,{closeEntitiesSavedStates:T,isEntitiesSavedStatesOpen:Y,setEntitiesSavedStatesCallback:L}),shortcuts:{previous:j,next:E}}),Object(n.createElement)(du,null),Object(n.createElement)(fu,null),Object(n.createElement)(su,null),Object(n.createElement)(Xc,null),Object(n.createElement)(d.Popover.Slot,null),Object(n.createElement)(O.PluginArea,null))},ms=r(122);function ps(e){var t=e.postId;return function(e){var t=Object(v.useSelect)((function(e){return{hasBlockSelection:!!e("core/block-editor").getBlockSelectionStart(),isEditorSidebarOpened:e(ms.a).isEditorSidebarOpened()}}),[e]),r=t.hasBlockSelection,i=t.isEditorSidebarOpened,o=Object(v.useDispatch)(ms.a).openGeneralSidebar;Object(n.useEffect)((function(){i&&o(r?"edit-post/block":"edit-post/document")}),[r,i])}(t),function(e){var t=Object(v.useSelect)((function(e){return{newPermalink:e("core/editor").getCurrentPost().link}}),[e]).newPermalink,r=Object(n.useRef)();Object(n.useEffect)((function(){r.current=document.querySelector(ms.c)||document.querySelector(ms.b)}),[e]),Object(n.useEffect)((function(){t&&r.current&&r.current.setAttribute("href",t)}),[t])}(t),null}function ds(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 vs(e){for(var t=1;t0){var t=!0===i.allowedBlockTypes?Object(m.map)(y,"name"):i.allowedBlockTypes||[];e.allowedBlockTypes=m.without.apply(void 0,[t].concat(Object(G.a)(I)))}return e}),[i,q,g,f,I,y,O,j,z,w,E]),B=Object(n.useMemo)((function(){return b?i.styles:[]}),[i,b]);return h?Object(n.createElement)(n.StrictMode,null,Object(n.createElement)(Au.Provider,{value:i},Object(n.createElement)(d.SlotFillProvider,null,Object(n.createElement)(a.EditorProvider,Object(l.a)({settings:Z,post:h,initialEdits:o,useSubRegistry:!1,__unstableTemplate:K?S:void 0},c),Object(n.createElement)(a.ErrorBoundary,{onError:u},Object(n.createElement)(ps,{postId:t}),Object(n.createElement)(As,{styles:B}),Object(n.createElement)(d.KeyboardShortcuts,{shortcuts:Y})),Object(n.createElement)(a.PostLockedModal,null))))):null},gs=function(e,t){return!Array.isArray(t)||(r=e,n=t,0===Object(m.difference)(r,n).length);var r,n},fs=function(e){var t=e.allowedBlocks,r=e.icon,i=e.label,a=e.onClick,u=e.small,c=e.role;return Object(n.createElement)(o.BlockSettingsMenuControls,null,(function(e){var o=e.selectedBlocks,s=e.onClose;return gs(o,t)?Object(n.createElement)(d.MenuItem,{onClick:Object(g.compose)(a,s),icon:r,label:u?i:void 0,role:c},!u&&i):null}))},bs=Object(g.compose)(Object(O.withPluginContext)((function(e,t){return{icon:t.icon||e.icon,name:"core/edit-post/plugin-more-menu"}})))(P.a);function hs(e){return Object(n.createElement)(P.c,Object(l.a)({__unstableExplicitMenuItem:!0,scope:"core/edit-post"},e))}function Os(e,t,r,i,o){Object(n.unmountComponentAtNode)(r);var a=Os.bind(null,e,t,r,i,o);Object(n.render)(Object(n.createElement)(qs,{settings:i,onError:a,postId:t,postType:e,initialEdits:o,recovery:!0}),r)}function Is(e,t,r,i,o){var a=document.getElementById(e),c=Os.bind(null,t,r,a,i,o);Object(u.registerCoreBlocks)(),"Standards"!==("CSS1Compat"===document.compatMode?"Standards":"Quirks")&&console.warn("Your browser is using Quirks Mode. \nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening . Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins."),-1!==window.navigator.userAgent.indexOf("iPhone")&&window.addEventListener("scroll",(function(e){var t=document.getElementsByClassName("interface-interface-skeleton__body")[0];e.target===document&&(window.scrollY>100&&(t.scrollTop=t.scrollTop+window.scrollY),document.getElementsByClassName("is-mode-visual")[0]&&window.scrollTo(0,0))})),Object(n.render)(Object(n.createElement)(qs,{settings:i,onError:c,postId:r,postType:t,initialEdits:o}),a)}},46:function(e,t){e.exports=window.wp.a11y},47:function(e,t){e.exports=window.wp.keyboardShortcuts},49:function(e,t){e.exports=window.wp.dataControls},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},51:function(e,t){e.exports=window.wp.notices},55:function(e,t,r){"use strict";function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}r.d(t,"a",(function(){return n}))},59:function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=r=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},6:function(e,t){e.exports=window.wp.blockEditor},63:function(e,t,r){"use strict";r.d(t,"g",(function(){return h})),r.d(t,"b",(function(){return J})),r.d(t,"c",(function(){return P})),r.d(t,"d",(function(){return _})),r.d(t,"e",(function(){return re})),r.d(t,"f",(function(){return D})),r.d(t,"a",(function(){return L}));var n={};r.r(n),r.d(n,"enableComplementaryArea",(function(){return p})),r.d(n,"disableComplementaryArea",(function(){return d})),r.d(n,"pinItem",(function(){return q})),r.d(n,"unpinItem",(function(){return g}));var i={};r.r(i),r.d(i,"getActiveComplementaryArea",(function(){return f})),r.d(i,"isItemPinned",(function(){return b}));var o=r(4),a=r(5),u=r(2);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 s(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.itemType,i=t.scope,o=t.item;return"SET_SINGLE_ENABLE_ITEM"===r&&n&&i?s(s({},e),{},Object(a.a)({},n,s(s({},e[n]),{},Object(a.a)({},i,o||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,o=t.item,c=t.isEnable;if("SET_MULTIPLE_ENABLE_ITEM"!==r||!n||!i||!o||Object(u.get)(e,[n,i,o])===c)return e;var l=e[n]||{},A=l[i]||{};return s(s({},e),{},Object(a.a)({},n,s(s({},l),{},Object(a.a)({},i,s(s({},A),{},Object(a.a)({},o,c||!1))))))}}),A=Object(o.combineReducers)({enableItems:l});function m(e,t,r){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:r}}function p(e,t){return m("complementaryArea",e,t)}function d(e){return m("complementaryArea",e,void 0)}function v(e,t,r,n){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:r,isEnable:n}}function q(e,t){return v("pinnedItems",e,t,!0)}function g(e,t){return v("pinnedItems",e,t,!1)}function f(e,t){return function(e,t,r){return Object(u.get)(e.enableItems.singleEnableItems,[t,r])}(e,"complementaryArea",t)}function b(e,t,r){return!1!==function(e,t,r,n){return Object(u.get)(e.enableItems.multipleEnableItems,[t,r,n])}(e,"pinnedItems",t,r)}var h=Object(o.createReduxStore)("core/interface",{reducer:A,actions:n,selectors:i,persist:["enableItems"]});Object(o.registerStore)("core/interface",{reducer:A,actions:n,selectors:i,persist:["enableItems"]});var O=r(8),I=r(14),y=r(0),j=r(10),C=r.n(j),E=r(3),K=r(1),S=r(166),M=r(301),w=r(302),z=r(118),Z=r(164),B=r(73),G=Object(B.withPluginContext)((function(e,t){return{icon:t.icon||e.icon,identifier:t.identifier||"".concat(e.name,"/").concat(t.name)}}));var k=G((function(e){var t=e.as,r=void 0===t?E.Button:t,n=e.scope,i=e.identifier,a=e.icon,c=e.selectedIcon,s=Object(I.a)(e,["as","scope","identifier","icon","selectedIcon"]),l=r,A=Object(o.useSelect)((function(e){return e(h).getActiveComplementaryArea(n)===i}),[i]),m=Object(o.useDispatch)(h),p=m.enableComplementaryArea,d=m.disableComplementaryArea;return Object(y.createElement)(l,Object(O.a)({icon:c&&A?c:a,onClick:function(){A?d(n):p(n,i)}},Object(u.omit)(s,["name"])))})),Y=function(e){var t=e.smallScreenTitle,r=e.children,n=e.className,i=e.toggleButtonProps,o=Object(y.createElement)(k,Object(O.a)({icon:Z.a},i));return Object(y.createElement)(y.Fragment,null,Object(y.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},t&&Object(y.createElement)("span",{className:"interface-complementary-area-header__small-title"},t),o),Object(y.createElement)("div",{className:C()("components-panel__header","interface-complementary-area-header",n),tabIndex:-1},r,o))};function x(e){var t=e.name,r=e.as,n=void 0===r?E.Button:r,i=e.onClick,o=Object(I.a)(e,["name","as","onClick"]);return Object(y.createElement)(E.Fill,{name:t},(function(e){var t=e.onClick;return Object(y.createElement)(n,Object(O.a)({onClick:i||t?function(){(i||u.noop).apply(void 0,arguments),(t||u.noop).apply(void 0,arguments)}:void 0},o))}))}x.Slot=function(e){var t=e.name,r=e.as,n=void 0===r?E.ButtonGroup:r,i=e.fillProps,o=void 0===i?{}:i,a=e.bubblesVirtually,c=Object(I.a)(e,["name","as","fillProps","bubblesVirtually"]);return Object(y.createElement)(E.Slot,{name:t,bubblesVirtually:a,fillProps:o},(function(e){if(Object(u.isEmpty)(y.Children.toArray(e)))return null;var t=[];y.Children.forEach(e,(function(e){var r=e.props,n=r.__unstableExplicitMenuItem,i=r.__unstableTarget;i&&n&&t.push(i)}));var r=y.Children.map(e,(function(e){return!e.props.__unstableExplicitMenuItem&&t.includes(e.props.__unstableTarget)?null:e}));return Object(y.createElement)(n,c,r)}))};var L=x,Q=function(e){return Object(y.createElement)(E.MenuItem,Object(u.omit)(e,["__unstableExplicitMenuItem","__unstableTarget"]))};function P(e){var t=e.scope,r=e.target,n=e.__unstableExplicitMenuItem,i=Object(I.a)(e,["scope","target","__unstableExplicitMenuItem"]);return Object(y.createElement)(k,Object(O.a)({as:function(e){return Object(y.createElement)(L,Object(O.a)({__unstableExplicitMenuItem:n,__unstableTarget:"".concat(t,"/").concat(r),as:Q,name:"".concat(t,"/plugin-more-menu")},e))},role:"menuitemcheckbox",selectedIcon:S.a,name:r,scope:t},i))}function W(e){var t=e.scope,r=Object(I.a)(e,["scope"]);return Object(y.createElement)(E.Fill,Object(O.a)({name:"PinnedItems/".concat(t)},r))}W.Slot=function(e){var t=e.scope,r=e.className,n=Object(I.a)(e,["scope","className"]);return Object(y.createElement)(E.Slot,Object(O.a)({name:"PinnedItems/".concat(t)},n),(function(e){return!Object(u.isEmpty)(e)&&Object(y.createElement)("div",{className:C()(r,"interface-pinned-items")},e)}))};var D=W;function N(e){var t=e.scope,r=e.children,n=e.className;return Object(y.createElement)(E.Fill,{name:"ComplementaryArea/".concat(t)},Object(y.createElement)("div",{className:n},r))}var T=G((function(e){var t=e.children,r=e.className,n=e.closeLabel,i=void 0===n?Object(K.__)("Close plugin"):n,a=e.identifier,u=e.header,c=e.headerClassName,s=e.icon,l=e.isPinnable,A=void 0===l||l,m=e.panelClassName,p=e.scope,d=e.name,v=e.smallScreenTitle,q=e.title,g=e.toggleShortcut,f=e.isActiveByDefault,b=e.showIconLabels,O=void 0!==b&&b,I=Object(o.useSelect)((function(e){var t=e(h),r=t.getActiveComplementaryArea,n=t.isItemPinned,i=r(p);return{isActive:i===a,isPinned:n(p,a),activeArea:i,isSmall:e(z.store).isViewportMatch("< medium"),isLarge:e(z.store).isViewportMatch("large")}}),[a,p]),j=I.isActive,Z=I.isPinned,B=I.activeArea,G=I.isSmall,x=I.isLarge;!function(e,t,r,n,i){var a=Object(y.useRef)(!1),u=Object(y.useRef)(!1),c=Object(o.useDispatch)(h),s=c.enableComplementaryArea,l=c.disableComplementaryArea;Object(y.useEffect)((function(){n&&i&&!a.current?(l(e),u.current=!0):u.current&&!i&&a.current?(u.current=!1,s(e,t)):u.current&&r&&r!==t&&(u.current=!1),i!==a.current&&(a.current=i)}),[n,i,e,t,r])}(p,a,B,j,G);var L=Object(o.useDispatch)(h),Q=L.enableComplementaryArea,W=L.disableComplementaryArea,T=L.pinItem,J=L.unpinItem;return Object(y.useEffect)((function(){f&&void 0===B&&!G&&Q(p,a)}),[B,f,p,a,G]),Object(y.createElement)(y.Fragment,null,A&&Object(y.createElement)(D,{scope:p},Z&&Object(y.createElement)(k,{scope:p,identifier:a,isPressed:j&&(!O||x),"aria-expanded":j,label:q,icon:O?S.a:s,showTooltip:!O,isTertiary:O})),d&&A&&Object(y.createElement)(P,{target:d,scope:p,icon:s},q),j&&Object(y.createElement)(N,{className:C()("interface-complementary-area",r),scope:p},Object(y.createElement)(Y,{className:c,closeLabel:i,onClose:function(){return W(p)},smallScreenTitle:v,toggleButtonProps:{label:i,shortcut:g,scope:p,identifier:a}},u||Object(y.createElement)(y.Fragment,null,Object(y.createElement)("strong",null,q),A&&Object(y.createElement)(E.Button,{className:"interface-complementary-area__pin-unpin-item",icon:Z?M.a:w.a,label:Z?Object(K.__)("Unpin from toolbar"):Object(K.__)("Pin to toolbar"),onClick:function(){return(Z?J:T)(p,a)},isPressed:Z,"aria-expanded":Z}))),Object(y.createElement)(E.Panel,{className:m},t)))}));T.Slot=function(e){var t=e.scope,r=Object(I.a)(e,["scope"]);return Object(y.createElement)(E.Slot,Object(O.a)({name:"ComplementaryArea/".concat(t)},r))};var J=T,R=r(25),H=r(26),F=r(33),U=r(34),X=r(22);function V(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Object(X.a)(e);if(t){var i=Object(X.a)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Object(U.a)(this,r)}}var _=function(e){Object(F.a)(r,e);var t=V(r);function r(){return Object(R.a)(this,r),t.apply(this,arguments)}return Object(H.a)(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"),this.props.isActive&&document.body.classList.remove("is-fullscreen-mode")}},{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}}]),r}(y.Component),$=r(11);function ee(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 te(e){for(var t=1;t