/*! This file is auto-generated */ this.wp=this.wp||{},this.wp.coreData=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.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 a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));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=448)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.blocks}()},126:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(a,o){null!==o&&"object"===n(o)&&(a=a[1]),e.call(r,a,o,t)}))}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}])&&a(t.prototype,r),c&&a(t,c),e}();e.exports=c},14:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(38);var a=r(29),o=r(39);function c(e,t){return Object(n.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,o=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){a=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(a)throw o}}return r}}(e,t)||Object(a.a)(e,t)||Object(o.a)()}},18:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(26);var a=r(35),o=r(29);function c(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||Object(a.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.")}()}},2:function(e,t){!function(){e.exports=this.lodash}()},24:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},26: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);r0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,a=n[e];if(void 0===a)return r;var o=t(r[a],n);return o===r[a]?r:O({},r,Object(c.a)({},a,o))}}},g=r(24),E=r.n(g),m=r(1);function j(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 w(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return w({},x(e),{query:t})}var k=r(45),_=r.n(k);function P(e){return{type:"API_FETCH",request:e}}function T(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n4&&void 0!==arguments[4]&&arguments[4];return"postType"===e&&(r=Object(f.castArray)(r).map((function(e){return"auto-draft"===e.status?N({},e,{title:""}):e}))),N({},n?R(r,n):x(r),{kind:e,name:t,invalidateCache:a})}function F(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function H(e){return{type:"RECEIVE_THEME_SUPPORTS",themeSupports:e}}function W(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}function K(e,t,r,n){var a,o,c,u,i,s,d,l,p,b=arguments;return E.a.wrap((function(v){for(;;)switch(v.prev=v.next){case 0:return a=b.length>4&&void 0!==b[4]?b[4]:{},v.next=3,T("getEntity",e,t);case 3:if(o=v.sent){v.next=6;break}throw new Error("The entity being edited (".concat(e,", ").concat(t,") does not have a loaded config."));case 6:return c=o.transientEdits,u=void 0===c?{}:c,i=o.mergedEdits,s=void 0===i?{}:i,v.next=9,T("getRawEntityRecord",e,t,r);case 9:return d=v.sent,v.next=12,T("getEditedEntityRecord",e,t,r);case 12:return l=v.sent,p={kind:e,name:t,recordId:r,edits:Object.keys(n).reduce((function(e,t){var r=d[t],a=l[t],o=s[t]?N({},a,{},n[t]):n[t];return e[t]=Object(f.isEqual)(r,o)?void 0:o,e}),{}),transientEdits:u},v.abrupt("return",N({type:"EDIT_ENTITY_RECORD"},p,{meta:{undo:!a.undoIgnore&&N({},p,{edits:Object.keys(n).reduce((function(e,t){return e[t]=l[t],e}),{})})}}));case 15:case"end":return v.stop()}}),A)}function Q(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T("getUndoEdit");case 2:if(e=t.sent){t.next=5;break}return t.abrupt("return");case 5:return t.next=7,N({type:"EDIT_ENTITY_RECORD"},e,{meta:{isUndo:!0}});case 7:case"end":return t.stop()}}),D)}function G(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T("getRedoEdit");case 2:if(e=t.sent){t.next=5;break}return t.abrupt("return");case 5:return t.next=7,N({type:"EDIT_ENTITY_RECORD"},e,{meta:{isRedo:!0}});case 7:case"end":return t.stop()}}),U)}function z(){return{type:"CREATE_UNDO_LEVEL"}}function $(e,t,r){var n,a,o,u,s,d,l,p,b,v,y,O,h,g,m,j,w,x,R,k,_,S,I,A,D,U=arguments;return E.a.wrap((function(E){for(;;)switch(E.prev=E.next){case 0:return n=U.length>3&&void 0!==U[3]?U[3]:{isAutosave:!1},a=n.isAutosave,o=void 0!==a&&a,E.next=3,fe(e);case 3:if(u=E.sent,s=Object(f.find)(u,{kind:e,name:t})){E.next=7;break}return E.abrupt("return");case 7:d=s.key||ae,l=r[d],p=0,b=Object.entries(r);case 10:if(!(p2&&void 0!==arguments[2]?arguments[2]:"get",n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=Object(f.find)(oe,{kind:e,name:t}),o="root"===e?"":Object(f.upperFirst)(Object(f.camelCase)(e)),c=Object(f.upperFirst)(Object(f.camelCase)(t))+(n?"s":""),u=n&&a.plural?Object(f.upperFirst)(Object(f.camelCase)(a.plural)):c;return"".concat(r).concat(o).concat(u)};function fe(e){var t,r;return E.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,T("getEntitiesByKind",e);case 2:if(!(t=n.sent)||0===t.length){n.next=5;break}return n.abrupt("return",t);case 5:if(r=Object(f.find)(ce,{name:e})){n.next=8;break}return n.abrupt("return",[]);case 8:return n.next=10,r.loadEntities();case 10:return t=n.sent,n.next=13,Y(t);case 13:return n.abrupt("return",t);case 14:case"end":return n.stop()}}),ne)}var de=r(30);var le=function(e){var t=new WeakMap;return function(r){var n;return t.has(r)?n=t.get(r):(n=e(r),Object(f.isObjectLike)(r)&&t.set(r,n)),n}}((function(e){for(var t={stableKey:"",page:1,perPage:10},r=Object.keys(e).sort(),n=0;n=a&&u0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.page,a=t.perPage,o=t.key,c=void 0===o?ae:o;return"RECEIVE_ITEMS"!==r?e:ve(e||[],Object(f.map)(t.items,c),n,a)})),Oe=Object(u.combineReducers)({items:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":var r=t.key||ae;return be({},e,{},t.items.reduce((function(t,n){var a=n[r];return t[a]=v(e[a],n),t}),{}))}return e},queries:ye});function he(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return ge(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(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ge(e,t)}(e))){var t=0,r=function(){};return{s:r,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r}}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 n,a,o=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){c=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(c)throw a}}}}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":var r,n=me({},e),a=he(t.items);try{var o=function(){var e=r.value,a=e[t.key],o=n[a];if(!o)return"continue";var c=Object.keys(o).reduce((function(t,r){return Object(f.isEqual)(o[r],Object(f.get)(e[r],"raw",e[r]))||(t[r]=o[r]),t}),{});Object.keys(c).length?n[a]=c:delete n[a]};for(a.s();!(r=a.n()).done;)o()}catch(e){a.e(e)}finally{a.f()}return n;case"EDIT_ENTITY_RECORD":var u=me({},e[t.recordId],{},t.edits);return Object.keys(u).forEach((function(e){void 0===u[e]&&delete u[e]})),me({},e,Object(c.a)({},t.recordId,u))}return e},saving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SAVE_ENTITY_RECORD_START":case"SAVE_ENTITY_RECORD_FINISH":return me({},e,Object(c.a)({},t.recordId,{pending:"SAVE_ENTITY_RECORD_START"===t.type,error:t.error,isAutosave:t.isAutosave}))}return e}}))}function we(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_ENTITIES":return[].concat(Object(s.a)(e),Object(s.a)(t.entities))}return e}var xe,Re=[];Re.offset=0;var ke=Object(u.combineReducers)({terms:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_TERMS":return me({},e,Object(c.a)({},t.taxonomy,t.terms))}return e},users:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{byId:{},queries:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_USER_QUERY":return{byId:me({},e.byId,{},Object(f.keyBy)(t.users,"id")),queries:me({},e.queries,Object(c.a)({},t.queryID,Object(f.map)(t.users,(function(e){return e.id}))))}}return e},currentTheme:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CURRENT_THEME":return t.currentTheme.stylesheet}return e},currentUser:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CURRENT_USER":return t.currentUser}return e},taxonomies:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_TAXONOMIES":return t.taxonomies}return e},themes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CURRENT_THEME":return me({},e,Object(c.a)({},t.currentTheme.stylesheet,t.currentTheme))}return e},themeSupports:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_THEME_SUPPORTS":return me({},e,{},t.themeSupports)}return e},entities:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=we(e.config,t),n=e.reducer;if(!n||r!==e.config){var a=Object(f.groupBy)(r,"kind");n=Object(u.combineReducers)(Object.entries(a).reduce((function(e,t){var r=Object(i.a)(t,2),n=r[0],a=r[1],o=Object(u.combineReducers)(a.reduce((function(e,t){return me({},e,Object(c.a)({},t.name,je(t)))}),{}));return e[n]=o,e}),{}))}var o=n(e.data,t);return o===e.data&&r===e.config&&n===e.reducer?e:{reducer:n,data:o,config:r}},undo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Re,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"EDIT_ENTITY_RECORD":case"CREATE_UNDO_LEVEL":var r,n="CREATE_UNDO_LEVEL"===t.type,a=!n&&(t.meta.isUndo||t.meta.isRedo);if(n?t=xe:a||(xe=Object.keys(t.edits).some((function(e){return!t.transientEdits[e]}))?t:me({},t,{edits:me({},xe&&xe.edits,{},t.edits)})),a){if((r=Object(s.a)(e)).offset=e.offset+(t.meta.isUndo?-1:1),!e.flattenedUndo)return r;n=!0,t=xe}if(!t.meta.undo)return e;if(!n&&!Object.keys(t.edits).some((function(e){return!t.transientEdits[e]})))return(r=Object(s.a)(e)).flattenedUndo=me({},e.flattenedUndo,{},t.edits),r.offset=e.offset,r;(r=r||e.slice(0,e.offset||void 0)).offset=r.offset||0,r.pop(),n||r.push({kind:t.meta.undo.kind,name:t.meta.undo.name,recordId:t.meta.undo.recordId,edits:me({},e.flattenedUndo,{},t.meta.undo.edits)});var o=Object.values(t.meta.undo.edits).filter((function(e){return"function"!=typeof e})),c=Object.values(t.edits).filter((function(e){return"function"!=typeof e}));return l()(o,c)||r.push({kind:t.kind,name:t.name,recordId:t.recordId,edits:n?me({},e.flattenedUndo,{},t.edits):t.edits}),r}return e},embedPreviews:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_EMBED_PREVIEW":var r=t.url,n=t.preview;return me({},e,Object(c.a)({},r,n))}return e},userPermissions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_USER_PERMISSION":return me({},e,Object(c.a)({},t.key,t.isAllowed))}return e},autosaves:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_AUTOSAVES":var r=t.postId,n=t.autosaves;return me({},e,Object(c.a)({},r,n))}return e}}),_e=r(42),Pe=r(37),Te=r.n(Pe),Se=r(126),Ie=r.n(Se),Ae=new WeakMap;function De(e,t){var r=le(t),n=r.stableKey,a=r.page,o=r.perPage;if(!e.queries[n])return null;var c=e.queries[n];if(!c)return null;for(var u=-1===o?0:(a-1)*o,i=-1===o?c.length:Math.min(u+o,c.length),s=[],f=u;f1&&void 0!==arguments[1]?arguments[1]:{},r=Ae.get(e);if(r){var n=r.get(t);if(void 0!==n)return n}else r=new Ie.a,Ae.set(e,r);var a=De(e,t);return r.set(t,a),a}));function Ce(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}var Me=Object(u.createRegistrySelector)((function(e){return function(t,r){return e("core/data").isResolving("core","getEmbedPreview",[r])}}));function Ve(e){return Le(e,"authors")}function Ne(e){return e.currentUser}var Le=Object(_e.a)((function(e,t){var r=e.users.queries[t];return Object(f.map)(r,(function(t){return e.users.byId[t]}))}),(function(e,t){return[e.users.queries[t],e.users.byId]}));function qe(e,t){return Object(f.filter)(e.entities.config,{kind:t})}function Ye(e,t,r){return Object(f.find)(e.entities.config,{kind:t,name:r})}function Be(e,t,r,n){return Object(f.get)(e.entities.data,[t,r,"queriedData","items",n])}function Fe(e,t,r,n){return Be(e,t,r,n)}var He=Object(_e.a)((function(e,t,r,n){var a=Be(e,t,r,n);return a&&Object.keys(a).reduce((function(e,t){return e[t]=Object(f.get)(a[t],"raw",a[t]),e}),{})}),(function(e){return[e.entities.data]}));function We(e,t,r,n){var a=Object(f.get)(e.entities.data,[t,r,"queriedData"]);return a?Ue(a,n):[]}var Ke=Object(_e.a)((function(e){var t=e.entities.data,r=[];return Object.keys(t).forEach((function(n){Object.keys(t[n]).forEach((function(a){var o=Object.keys(t[n][a].edits).filter((function(t){return ze(e,n,a,t)}));if(o.length){var c=Ye(e,n,a);o.forEach((function(t){var o=Be(e,n,a,t);r.push({key:o[c.key||ae],title:c.getTitle?c.getTitle(o):"",name:a,kind:n})}))}}))})),r}),(function(e){return[e.entities.data]}));function Qe(e,t,r,n){return Object(f.get)(e.entities.data,[t,r,"edits",n])}var Ge=Object(_e.a)((function(e,t,r,n){var a=(Ye(e,t,r)||{}).transientEdits,o=Qe(e,t,r,n)||{};return a?Object.keys(o).reduce((function(e,t){return a[t]||(e[t]=o[t]),e}),{}):o}),(function(e){return[e.entities.config,e.entities.data]}));function ze(e,t,r,n){return Je(e,t,r,n)||Object.keys(Ge(e,t,r,n)).length>0}var $e=Object(_e.a)((function(e,t,r,n){return function(e){for(var t=1;t'+t+"";return!!r&&r.html===n}function st(e){return Te()("select( 'core' ).hasUploadPermissions()",{alternative:"select( 'core' ).canUser( 'create', 'media' )"}),Object(f.defaultTo)(ft(e,"create","media"),!0)}function ft(e,t,r,n){var a=Object(f.compact)([t,r,n]).join("/");return Object(f.get)(e,["userPermissions",a])}function dt(e,t,r){return e.autosaves[r]}function lt(e,t,r,n){if(void 0!==n){var a=e.autosaves[r];return Object(f.find)(a,{author:n})}}var pt=Object(u.createRegistrySelector)((function(e){return function(t,r,n){return e("core").hasFinishedResolution("getAutosaves",[r,n])}})),bt=Object(_e.a)((function(){return[]}),(function(e){return[e.undo.length,e.undo.offset]})),vt=r(36),yt=function(e,t){return E.a.mark((function r(){var n,a,o,c=arguments;return E.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:for(n=c.length,a=new Array(n),o=0;o2&&void 0!==c[2]?c[2]:"",u.next=3,fe(e);case 3:if(n=u.sent,a=Object(f.find)(n,{kind:e,name:t})){u.next=7;break}return u.abrupt("return");case 7:return u.next=9,P({path:"".concat(a.baseURL,"/").concat(r,"?context=edit")});case 9:return o=u.sent,u.next=12,B(e,t,o);case 12:case"end":return u.stop()}}),mt)}var Dt=yt(At,"getEntityRecord"),Ut=yt(Dt,"getRawEntityRecord");function Ct(e,t){var r,n,a,o,c,u=arguments;return E.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return r=u.length>2&&void 0!==u[2]?u[2]:{},i.next=3,fe(e);case 3:if(n=i.sent,a=Object(f.find)(n,{kind:e,name:t})){i.next=7;break}return i.abrupt("return");case 7:return o=Object(de.addQueryArgs)(a.baseURL,ht({},r,{context:"edit"})),i.next=10,P({path:o});case 10:return c=i.sent,i.next=13,B(e,t,Object.values(c),r);case 13:case"end":return i.stop()}}),jt)}function Mt(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P({path:"/wp/v2/themes?status=active"});case 2:return e=t.sent,t.next=5,F(e[0]);case 5:case"end":return t.stop()}}),wt)}function Vt(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P({path:"/wp/v2/themes?status=active"});case 2:return e=t.sent,t.next=5,H(e[0].theme_supports);case 5:case"end":return t.stop()}}),xt)}function Nt(e){var t;return E.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,P({path:Object(de.addQueryArgs)("/oembed/1.0/proxy",{url:e})});case 3:return t=r.sent,r.next=6,W(e,t);case 6:r.next=12;break;case 8:return r.prev=8,r.t0=r.catch(0),r.next=12,W(e,!1);case 12:case"end":return r.stop()}}),Rt,null,[[0,8]])}function Lt(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Te()("select( 'core' ).hasUploadPermissions()",{alternative:"select( 'core' ).canUser( 'create', 'media' )"}),e.delegateYield(qt("create","media"),"t0",2);case 2:case"end":return e.stop()}}),kt)}function qt(e,t,r){var n,a,o,c,u,i;return E.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(n={create:"POST",read:"GET",update:"PUT",delete:"DELETE"}[e]){s.next=4;break}throw new Error("'".concat(e,"' is not a valid action."));case 4:return a=r?"/wp/v2/".concat(t,"/").concat(r):"/wp/v2/".concat(t),s.prev=5,s.next=8,P({path:a,method:r?"GET":"OPTIONS",parse:!1});case 8:o=s.sent,s.next=14;break;case 11:return s.prev=11,s.t0=s.catch(5),s.abrupt("return");case 14:return c=Object(f.hasIn)(o,["headers","get"])?o.headers.get("allow"):Object(f.get)(o,["headers","Allow"],""),u=Object(f.compact)([e,t,r]).join("/"),i=Object(f.includes)(c,n),s.next=19,Z(u,i);case 19:case"end":return s.stop()}}),_t,null,[[5,11]])}function Yt(e,t){var r,n,a;return E.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,S("getPostType",e);case 2:return r=o.sent,n=r.rest_base,o.next=6,P({path:"/wp/v2/".concat(n,"/").concat(t,"/autosaves?context=edit")});case 6:if(!(a=o.sent)||!a.length){o.next=10;break}return o.next=10,ee(t,a);case 10:case"end":return o.stop()}}),Pt)}function Bt(e,t){return E.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,S("getAutosaves",e,t);case 2:case"end":return r.stop()}}),Tt)}Ct.shouldInvalidate=function(e,t,r){return"RECEIVE_ITEMS"===e.type&&e.invalidateCache&&t===e.kind&&r===e.name};var Ft=r(0),Ht=r(10);function Wt(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}var Kt=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},n=r.initialEdits,a=r.blocksProp,o=void 0===a?"blocks":a,c=r.contentProp,s=void 0===c?"content":c,f=r.id,d=zt(e,t),l=null!=f?f:d,p=$t(e,t,s,l),b=Object(i.a)(p,2),v=b[0],y=b[1],O=Object(u.useDispatch)("core"),h=O.editEntityRecord;Object(Ft.useEffect)((function(){n&&h(e,t,l,n,{undoIgnore:!0})}),[l]);var g=Object(Ft.useMemo)((function(){if(v&&"function"!=typeof v){var e=Object(Ht.parse)(v);return e.length?e:[]}return[]}),[v]),E=$t(e,t,o,l),m=Object(i.a)(E,2),j=m[0],w=void 0===j?g:j,x=m[1],R=Object(Ft.useCallback)((function(e){x(e),y((function(e){var t=e.blocks;return Object(Ht.serialize)(t)}))}),[x,y]);return[w,x,R]}function Jt(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 Zt(e){for(var t=1;t1?t-1:0),c=1;c1?a-1:0),c=1;c