WordPress/wp-includes/js/dist/core-data.min.js

2 lines
49 KiB
JavaScript

/*! 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 c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,r),c.l=!0,c.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 c in e)r.d(n,c,function(t){return e[t]}.bind(null,c));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="dsJ0")}({"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},"25BE":function(e,t,r){"use strict";function n(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}r.d(t,"a",(function(){return n}))},"51Zz":function(e,t){!function(){e.exports=this.wp.dataControls}()},BsWD:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r("a3WO");function c(e,t){if(e){if("string"==typeof e)return Object(n.a)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n.a)(e,t):void 0}}},DSFK:function(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,"a",(function(){return n}))},FtRg: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 c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t){var r=e._map,n=e._arrayTreeMap,c=e._objectTreeMap;if(r.has(t))return r.get(t);for(var a=Object.keys(t).sort(),i=Array.isArray(t)?n:c,o=0;o<a.length;o++){var u=a[o];if(void 0===(i=i.get(u)))return;var s=t[u];if(void 0===(i=i.get(s)))return}var f=i.get("_ekm_value");return f?(r.delete(f[0]),f[0]=t,i.set("_ekm_value",f),r.set(t,f),f):void 0}var i=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clear(),t instanceof e){var r=[];t.forEach((function(e,t){r.push([t,e])})),t=r}if(null!=t)for(var n=0;n<t.length;n++)this.set(t[n][0],t[n][1])}var t,r,i;return t=e,(r=[{key:"set",value:function(t,r){if(null===t||"object"!==n(t))return this._map.set(t,r),this;for(var c=Object.keys(t).sort(),a=[t,r],i=Array.isArray(t)?this._arrayTreeMap:this._objectTreeMap,o=0;o<c.length;o++){var u=c[o];i.has(u)||i.set(u,new e),i=i.get(u);var s=t[u];i.has(s)||i.set(s,new e),i=i.get(s)}var f=i.get("_ekm_value");return f&&this._map.delete(f[0]),i.set("_ekm_value",a),this._map.set(t,a),this}},{key:"get",value:function(e){if(null===e||"object"!==n(e))return this._map.get(e);var t=a(this,e);return t?t[1]:void 0}},{key:"has",value:function(e){return null===e||"object"!==n(e)?this._map.has(e):void 0!==a(this,e)}},{key:"delete",value:function(e){return!!this.has(e)&&(this.set(e,void 0),!0)}},{key:"forEach",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(c,a){null!==a&&"object"===n(a)&&(c=c[1]),e.call(r,c,a,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}}])&&c(t.prototype,r),i&&c(t,i),e}();e.exports=i},GRId:function(e,t){!function(){e.exports=this.wp.element}()},HSyU:function(e,t){!function(){e.exports=this.wp.blocks}()},KQm4:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r("a3WO");var c=r("25BE"),a=r("BsWD");function i(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||Object(c.a)(e)||Object(a.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.")}()}},Mmq9:function(e,t){!function(){e.exports=this.wp.url}()},NMb1:function(e,t){!function(){e.exports=this.wp.deprecated}()},ODXe:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r("DSFK");var c=r("BsWD"),a=r("PYwp");function i(e,t){return Object(n.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,c=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){c=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(c)throw a}}return r}}(e,t)||Object(c.a)(e,t)||Object(a.a)()}},PYwp:function(e,t,r){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,"a",(function(){return n}))},YLtl:function(e,t){!function(){e.exports=this.lodash}()},a3WO: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<t;r++)n[r]=e[r];return n}r.d(t,"a",(function(){return n}))},dsJ0:function(e,t,r){"use strict";r.r(t),r.d(t,"EntityProvider",(function(){return tr})),r.d(t,"useEntityId",(function(){return rr})),r.d(t,"useEntityProp",(function(){return nr})),r.d(t,"useEntityBlockEditor",(function(){return cr}));var n={};r.r(n),r.d(n,"receiveUserQuery",(function(){return N})),r.d(n,"receiveCurrentUser",(function(){return V})),r.d(n,"addEntities",(function(){return L})),r.d(n,"receiveEntityRecords",(function(){return q})),r.d(n,"receiveCurrentTheme",(function(){return F})),r.d(n,"receiveThemeSupports",(function(){return Y})),r.d(n,"receiveEmbedPreview",(function(){return B})),r.d(n,"deleteEntityRecord",(function(){return W})),r.d(n,"editEntityRecord",(function(){return Q})),r.d(n,"undo",(function(){return H})),r.d(n,"redo",(function(){return K})),r.d(n,"__unstableCreateUndoLevel",(function(){return G})),r.d(n,"saveEntityRecord",(function(){return z})),r.d(n,"saveEditedEntityRecord",(function(){return X})),r.d(n,"receiveUploadPermissions",(function(){return Z})),r.d(n,"receiveUserPermission",(function(){return J})),r.d(n,"receiveAutosaves",(function(){return $}));var c={};r.r(c),r.d(c,"isRequestingEmbedPreview",(function(){return Ne})),r.d(c,"getAuthors",(function(){return Ve})),r.d(c,"__unstableGetAuthor",(function(){return Le})),r.d(c,"getCurrentUser",(function(){return qe})),r.d(c,"getUserQueryResults",(function(){return Fe})),r.d(c,"getEntitiesByKind",(function(){return Ye})),r.d(c,"getEntity",(function(){return Be})),r.d(c,"getEntityRecord",(function(){return We})),r.d(c,"__experimentalGetEntityRecordNoResolver",(function(){return Qe})),r.d(c,"getRawEntityRecord",(function(){return He})),r.d(c,"hasEntityRecords",(function(){return Ke})),r.d(c,"getEntityRecords",(function(){return Ge})),r.d(c,"__experimentalGetDirtyEntityRecords",(function(){return ze})),r.d(c,"getEntityRecordEdits",(function(){return Xe})),r.d(c,"getEntityRecordNonTransientEdits",(function(){return Ze})),r.d(c,"hasEditsForEntityRecord",(function(){return Je})),r.d(c,"getEditedEntityRecord",(function(){return $e})),r.d(c,"isAutosavingEntityRecord",(function(){return et})),r.d(c,"isSavingEntityRecord",(function(){return tt})),r.d(c,"isDeletingEntityRecord",(function(){return rt})),r.d(c,"getLastEntitySaveError",(function(){return nt})),r.d(c,"getLastEntityDeleteError",(function(){return ct})),r.d(c,"getUndoEdit",(function(){return it})),r.d(c,"getRedoEdit",(function(){return ot})),r.d(c,"hasUndo",(function(){return ut})),r.d(c,"hasRedo",(function(){return st})),r.d(c,"getCurrentTheme",(function(){return ft})),r.d(c,"getThemeSupports",(function(){return dt})),r.d(c,"getEmbedPreview",(function(){return lt})),r.d(c,"isPreviewEmbedFallback",(function(){return pt})),r.d(c,"hasUploadPermissions",(function(){return bt})),r.d(c,"canUser",(function(){return vt})),r.d(c,"getAutosaves",(function(){return yt})),r.d(c,"getAutosave",(function(){return Ot})),r.d(c,"hasFetchedAutosaves",(function(){return ht})),r.d(c,"getReferenceByDistinctEdits",(function(){return gt}));var a={};r.r(a),r.d(a,"getAuthors",(function(){return Ct})),r.d(a,"__unstableGetAuthor",(function(){return Mt})),r.d(a,"getCurrentUser",(function(){return Nt})),r.d(a,"getEntityRecord",(function(){return Vt})),r.d(a,"getRawEntityRecord",(function(){return Lt})),r.d(a,"getEditedEntityRecord",(function(){return qt})),r.d(a,"getEntityRecords",(function(){return Ft})),r.d(a,"getCurrentTheme",(function(){return Yt})),r.d(a,"getThemeSupports",(function(){return Bt})),r.d(a,"getEmbedPreview",(function(){return Wt})),r.d(a,"hasUploadPermissions",(function(){return Qt})),r.d(a,"canUser",(function(){return Ht})),r.d(a,"getAutosaves",(function(){return Kt})),r.d(a,"getAutosave",(function(){return Gt}));var i=r("rePB"),o=r("1ZqX"),u=r("51Zz"),s=r("ODXe"),f=r("KQm4"),d=r("YLtl"),l=r("rl8x"),p=r.n(l),b=function(e){return function(t){return function(r,n){return void 0===r||e(n)?t(r,n):r}}},v=function(e){return function(t){return function(r,n){return t(r,e(n))}}};function y(e,t){if(!e)return t;var r=!1,n={};for(var c in t)Object(d.isEqual)(e[c],t[c])?n[c]=e[c]:(r=!0,n[c]=t[c]);if(!r)return e;for(var a in e)n.hasOwnProperty(a)||(n[a]=e[a]);return n}function O(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 h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var g=function(e){return function(t){return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,c=n[e];if(void 0===c)return r;var a=t(r[c],n);return a===r[c]?r:h(h({},r),{},Object(i.a)({},c,a))}}},j=r("dvlR"),E=r.n(j),m=r("l3Sj"),w=r("Mmq9");function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function k(e){return{type:"RECEIVE_ITEMS",items:Object(d.castArray)(e)}}function x(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return{type:"REMOVE_ITEMS",itemIds:Object(d.castArray)(r),kind:e,name:t,invalidateCache:n}}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return R(R({},k(e)),{},{query:t})}var T=E.a.mark(W),P=E.a.mark(Q),I=E.a.mark(H),D=E.a.mark(K),A=E.a.mark(z),U=E.a.mark(X);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 M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function N(e,t){return{type:"RECEIVE_USER_QUERY",users:Object(d.castArray)(t),queryID:e}}function V(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function L(e){return{type:"ADD_ENTITIES",entities:e}}function q(e,t,r,n){var c=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return"postType"===e&&(r=Object(d.castArray)(r).map((function(e){return"auto-draft"===e.status?M(M({},e),{},{title:""}):e}))),M(M({},n?S(r,n):k(r)),{},{kind:e,name:t,invalidateCache:c})}function F(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function Y(e){return{type:"RECEIVE_THEME_SUPPORTS",themeSupports:e}}function B(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}function W(e,t,r,n){var c,a,i,o,s;return E.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,se(e);case 2:if(c=f.sent,a=Object(d.find)(c,{kind:e,name:t}),o=!1,a){f.next=7;break}return f.abrupt("return");case 7:return f.next=9,{type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:r};case 9:return f.prev=9,s="".concat(a.baseURL,"/").concat(r),n&&(s=Object(w.addQueryArgs)(s,n)),f.next=14,Object(u.apiFetch)({path:s,method:"DELETE"});case 14:return o=f.sent,f.next=17,x(e,t,r,!0);case 17:f.next=22;break;case 19:f.prev=19,f.t0=f.catch(9),i=f.t0;case 22:return f.next=24,{type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:r,error:i};case 24:return f.abrupt("return",o);case 25:case"end":return f.stop()}}),T,null,[[9,19]])}function Q(e,t,r,n){var c,a,i,o,s,f,l,p,b,v=arguments;return E.a.wrap((function(y){for(;;)switch(y.prev=y.next){case 0:return c=v.length>4&&void 0!==v[4]?v[4]:{},y.next=3,Object(u.syncSelect)("core","getEntity",e,t);case 3:if(a=y.sent){y.next=6;break}throw new Error("The entity being edited (".concat(e,", ").concat(t,") does not have a loaded config."));case 6:return i=a.transientEdits,o=void 0===i?{}:i,s=a.mergedEdits,f=void 0===s?{}:s,y.next=9,Object(u.syncSelect)("core","getRawEntityRecord",e,t,r);case 9:return l=y.sent,y.next=12,Object(u.syncSelect)("core","getEditedEntityRecord",e,t,r);case 12:return p=y.sent,b={kind:e,name:t,recordId:r,edits:Object.keys(n).reduce((function(e,t){var r=l[t],c=p[t],a=f[t]?M(M({},c),n[t]):n[t];return e[t]=Object(d.isEqual)(r,a)?void 0:a,e}),{}),transientEdits:o},y.abrupt("return",M(M({type:"EDIT_ENTITY_RECORD"},b),{},{meta:{undo:!c.undoIgnore&&M(M({},b),{},{edits:Object.keys(n).reduce((function(e,t){return e[t]=p[t],e}),{})})}}));case 15:case"end":return y.stop()}}),P)}function H(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.syncSelect)("core","getUndoEdit");case 2:if(e=t.sent){t.next=5;break}return t.abrupt("return");case 5:return t.next=7,M(M({type:"EDIT_ENTITY_RECORD"},e),{},{meta:{isUndo:!0}});case 7:case"end":return t.stop()}}),I)}function K(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.syncSelect)("core","getRedoEdit");case 2:if(e=t.sent){t.next=5;break}return t.abrupt("return");case 5:return t.next=7,M(M({type:"EDIT_ENTITY_RECORD"},e),{},{meta:{isRedo:!0}});case 7:case"end":return t.stop()}}),D)}function G(){return{type:"CREATE_UNDO_LEVEL"}}function z(e,t,r){var n,c,a,o,f,l,p,b,v,y,O,h,g,j,m,w,_,R,k,x,S,T,P,I,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},c=n.isAutosave,a=void 0!==c&&c,E.next=3,se(e);case 3:if(o=E.sent,f=Object(d.find)(o,{kind:e,name:t})){E.next=7;break}return E.abrupt("return");case 7:l=f.key||ne,p=r[l],b=0,v=Object.entries(r);case 10:if(!(b<v.length)){E.next=24;break}if(y=Object(s.a)(v[b],2),O=y[0],"function"!=typeof(h=y[1])){E.next=21;break}return E.t0=h,E.next=16,Object(u.syncSelect)("core","getEditedEntityRecord",e,t,p);case 16:return E.t1=E.sent,g=(0,E.t0)(E.t1),E.next=20,Q(e,t,p,Object(i.a)({},O,g),{undoIgnore:!0});case 20:r[O]=g;case 21:b++,E.next=10;break;case 24:return E.next=26,{type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:p,isAutosave:a};case 26:return E.prev=26,R="".concat(f.baseURL).concat(p?"/"+p:""),E.next=30,Object(u.syncSelect)("core","getRawEntityRecord",e,t,p);case 30:if(k=E.sent,!a){E.next=55;break}return E.next=34,Object(u.syncSelect)("core","getCurrentUser");case 34:return x=E.sent,S=x?x.id:void 0,E.next=38,Object(u.syncSelect)("core","getAutosave",k.type,k.id,S);case 38:return T=E.sent,P=M(M(M({},k),T),r),P=Object.keys(P).reduce((function(e,t){return["title","excerpt","content"].includes(t)&&(e[t]=Object(d.get)(P[t],"raw",P[t])),e}),{status:"auto-draft"===P.status?"draft":P.status}),E.next=43,Object(u.apiFetch)({path:"".concat(R,"/autosaves"),method:"POST",data:P});case 43:if(j=E.sent,k.id!==j.id){E.next=51;break}return I=M(M(M({},k),P),j),I=Object.keys(I).reduce((function(e,t){return["title","excerpt","content"].includes(t)?e[t]=Object(d.get)(I[t],"raw",I[t]):e[t]="status"===t?"auto-draft"===k.status&&"draft"===I.status?I.status:k.status:Object(d.get)(k[t],"raw",k[t]),e}),{}),E.next=49,q(e,t,I,void 0,!0);case 49:E.next=53;break;case 51:return E.next=53,$(k.id,j);case 53:E.next=70;break;case 55:return D=r,"postType"===e&&k&&"auto-draft"===k.status&&(D.status||(D=M(M({},D),{},{status:"draft"})),D.title&&"Auto Draft"!==D.title||(D=M(M({},D),{},{title:""}))),E.next=59,Object(u.syncSelect)("core","__experimentalGetEntityRecordNoResolver",e,t,p);case 59:return w=E.sent,E.next=62,Object(u.syncSelect)("core","getEntityRecordEdits",e,t,p);case 62:return _=E.sent,E.next=65,q(e,t,M(M({},w),D),void 0,!0);case 65:return E.next=67,Object(u.apiFetch)({path:R,method:p?"PUT":"POST",data:D});case 67:return j=E.sent,E.next=70,q(e,t,j,void 0,!0);case 70:E.next=91;break;case 72:if(E.prev=72,E.t2=E.catch(26),m=E.t2,!w||!_){E.next=91;break}return E.next=78,q(e,t,w,void 0,!0);case 78:return E.t3=Q,E.t4=e,E.t5=t,E.t6=p,E.t7=M,E.t8=M({},_),E.next=86,Object(u.syncSelect)("core","getEntityRecordEdits",e,t,p);case 86:return E.t9=E.sent,E.t10=(0,E.t7)(E.t8,E.t9),E.t11={undoIgnore:!0},E.next=91,(0,E.t3)(E.t4,E.t5,E.t6,E.t10,E.t11);case 91:return E.next=93,{type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:p,error:m,isAutosave:a};case 93:return E.abrupt("return",j);case 94:case"end":return E.stop()}}),A,null,[[26,72]])}function X(e,t,r,n){var c,a;return E.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Object(u.syncSelect)("core","hasEditsForEntityRecord",e,t,r);case 2:if(i.sent){i.next=4;break}return i.abrupt("return");case 4:return i.next=6,Object(u.syncSelect)("core","getEntityRecordNonTransientEdits",e,t,r);case 6:return c=i.sent,a=M({id:r},c),i.delegateYield(z(e,t,a,n),"t0",9);case 9:case"end":return i.stop()}}),U)}function Z(e){return{type:"RECEIVE_USER_PERMISSION",key:"create/media",isAllowed:e}}function J(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function $(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:Object(d.castArray)(t)}}var ee=E.a.mark(ie),te=E.a.mark(oe),re=E.a.mark(se),ne="id",ce=[{label:Object(m.__)("Base"),name:"__unstableBase",kind:"root",baseURL:""},{label:Object(m.__)("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",getTitle:function(e){return Object(d.get)(e,["title"],Object(m.__)("Site Title"))}},{label:Object(m.__)("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types"},{name:"media",kind:"root",baseURL:"/wp/v2/media",plural:"mediaItems",label:Object(m.__)("Media")},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",plural:"taxonomies",label:Object(m.__)("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",plural:"sidebars",transientEdits:{blocks:!0},label:Object(m.__)("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",plural:"widgets",transientEdits:{blocks:!0},label:Object(m.__)("Widgets")},{label:Object(m.__)("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",plural:"users"},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",plural:"comments",label:Object(m.__)("Comment")},{name:"menu",kind:"root",baseURL:"/__experimental/menus",plural:"menus",label:Object(m.__)("Menu")},{name:"menuItem",kind:"root",baseURL:"/__experimental/menu-items",plural:"menuItems",label:Object(m.__)("Menu Item")},{name:"menuLocation",kind:"root",baseURL:"/__experimental/menu-locations",plural:"menuLocations",label:Object(m.__)("Menu Location"),key:"name"}],ae=[{name:"postType",loadEntities:ie},{name:"taxonomy",loadEntities:oe}];function ie(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.apiFetch)({path:"/wp/v2/types?context=edit"});case 2:return e=t.sent,t.abrupt("return",Object(d.map)(e,(function(e,t){return{kind:"postType",baseURL:"/wp/v2/"+e.rest_base,name:t,label:e.labels.singular_name,transientEdits:{blocks:!0,selectionStart:!0,selectionEnd:!0},mergedEdits:{meta:!0},getTitle:function(e){return"wp_template_part"===t||"wp_template"===t?Object(d.startCase)(e.slug):Object(d.get)(e,["title","rendered"],e.id)}}})));case 4:case"end":return t.stop()}}),ee)}function oe(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.apiFetch)({path:"/wp/v2/taxonomies?context=edit"});case 2:return e=t.sent,t.abrupt("return",Object(d.map)(e,(function(e,t){return{kind:"taxonomy",baseURL:"/wp/v2/"+e.rest_base,name:t,label:e.labels.singular_name}})));case 4:case"end":return t.stop()}}),te)}var ue=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"get",n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=Object(d.find)(ce,{kind:e,name:t}),a="root"===e?"":Object(d.upperFirst)(Object(d.camelCase)(e)),i=Object(d.upperFirst)(Object(d.camelCase)(t))+(n?"s":""),o=n&&c.plural?Object(d.upperFirst)(Object(d.camelCase)(c.plural)):i;return"".concat(r).concat(a).concat(o)};function se(e){var t,r;return E.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(u.syncSelect)("core","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(d.find)(ae,{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,L(t);case 13:return n.abrupt("return",t);case 14:case"end":return n.stop()}}),re)}var fe=function(e){return"string"==typeof e?e.split(","):Array.isArray(e)?e:null};var de=function(e){var t=new WeakMap;return function(r){var n;return t.has(r)?n=t.get(r):(n=e(r),Object(d.isObjectLike)(r)&&t.set(r,n)),n}}((function(e){for(var t={stableKey:"",page:1,perPage:10,fields:null,include:null},r=Object.keys(e).sort(),n=0;n<r.length;n++){var c=r[n],a=e[c];switch(c){case"page":t[c]=Number(a);break;case"per_page":t.perPage=Number(a);break;case"include":t.include=fe(a).map(Number);break;default:"_fields"===c&&(t.fields=fe(a),a=t.fields.join()),t.stableKey+=(t.stableKey?"&":"")+Object(w.addQueryArgs)("",Object(i.a)({},c,a)).slice(1)}}return t}));function le(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 pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?le(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function be(e,t,r,n){if(1===r&&-1===n)return t;for(var c=(r-1)*n,a=Math.max(e.length,c+t.length),i=new Array(a),o=0;o<a;o++){var u=o>=c&&o<c+t.length;i[o]=u?t[o-c]:e[o]}return i}var ve=Object(d.flowRight)([b((function(e){return"query"in e})),v((function(e){return e.query?pe(pe({},e),de(e.query)):e})),g("stableKey")])((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.page,c=t.perPage,a=t.key,i=void 0===a?ne:a;return"RECEIVE_ITEMS"!==r?e:be(e||[],Object(d.map)(t.items,i),n,c)})),ye=Object(o.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||ne;return pe(pe({},e),t.items.reduce((function(t,n){var c=n[r];return t[c]=y(e[c],n),t}),{}));case"REMOVE_ITEMS":var n=Object(d.omit)(e,t.itemIds);return n}return e},itemIsComplete: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.query,c=t.key,a=void 0===c?ne:c;if("RECEIVE_ITEMS"!==r)return e;var i=!n||!Array.isArray(de(n).fields);return pe(pe({},e),t.items.reduce((function(t,r){var n=r[a];return t[n]=e[n]||i,t}),{}))},queries: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":return ve(e,t);case"REMOVE_ITEMS":var r=pe({},e),n=t.itemIds.reduce((function(e,t){return e[t]=!0,e}),{});return Object(d.forEach)(r,(function(e,t){r[t]=Object(d.filter)(e,(function(e){return!n[e]}))})),r;default:return e}}});function Oe(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 he(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 he(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}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 a,i=!0,o=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(o)throw a}}}}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ge(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 je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ge(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ee(e){return Object(d.flowRight)([b((function(t){return t.name&&t.kind&&t.name===e.name&&t.kind===e.kind})),v((function(t){return je(je({},t),{},{key:e.key||ne})}))])(Object(o.combineReducers)({queriedData:ye,edits: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,n=je({},e),c=Oe(t.items);try{var a=function(){var e=r.value,c=e[t.key],a=n[c];if(!a)return"continue";var i=Object.keys(a).reduce((function(t,r){return Object(d.isEqual)(a[r],Object(d.get)(e[r],"raw",e[r]))||(t[r]=a[r]),t}),{});Object.keys(i).length?n[c]=i:delete n[c]};for(c.s();!(r=c.n()).done;)a()}catch(e){c.e(e)}finally{c.f()}return n;case"EDIT_ENTITY_RECORD":var o=je(je({},e[t.recordId]),t.edits);return Object.keys(o).forEach((function(e){void 0===o[e]&&delete o[e]})),je(je({},e),{},Object(i.a)({},t.recordId,o))}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 je(je({},e),{},Object(i.a)({},t.recordId,{pending:"SAVE_ENTITY_RECORD_START"===t.type,error:t.error,isAutosave:t.isAutosave}))}return e},deleting:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"DELETE_ENTITY_RECORD_START":case"DELETE_ENTITY_RECORD_FINISH":return je(je({},e),{},Object(i.a)({},t.recordId,{pending:"DELETE_ENTITY_RECORD_START"===t.type,error:t.error}))}return e}}))}function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_ENTITIES":return[].concat(Object(f.a)(e),Object(f.a)(t.entities))}return e}var we,_e=[];_e.offset=0;var Re=Object(o.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 je(je({},e),{},Object(i.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:je(je({},e.byId),Object(d.keyBy)(t.users,"id")),queries:je(je({},e.queries),{},Object(i.a)({},t.queryID,Object(d.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 je(je({},e),{},Object(i.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 je(je({},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=me(e.config,t),n=e.reducer;if(!n||r!==e.config){var c=Object(d.groupBy)(r,"kind");n=Object(o.combineReducers)(Object.entries(c).reduce((function(e,t){var r=Object(s.a)(t,2),n=r[0],c=r[1],a=Object(o.combineReducers)(c.reduce((function(e,t){return je(je({},e),{},Object(i.a)({},t.name,Ee(t)))}),{}));return e[n]=a,e}),{}))}var a=n(e.data,t);return a===e.data&&r===e.config&&n===e.reducer?e:{reducer:n,data:a,config:r}},undo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_e,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,c=!n&&(t.meta.isUndo||t.meta.isRedo);if(n?t=we:c||(we=Object.keys(t.edits).some((function(e){return!t.transientEdits[e]}))?t:je(je({},t),{},{edits:je(je({},we&&we.edits),t.edits)})),c){if((r=Object(f.a)(e)).offset=e.offset+(t.meta.isUndo?-1:1),!e.flattenedUndo)return r;n=!0,t=we}if(!t.meta.undo)return e;if(!n&&!Object.keys(t.edits).some((function(e){return!t.transientEdits[e]})))return(r=Object(f.a)(e)).flattenedUndo=je(je({},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:je(je({},e.flattenedUndo),t.meta.undo.edits)});var a=Object.values(t.meta.undo.edits).filter((function(e){return"function"!=typeof e})),i=Object.values(t.edits).filter((function(e){return"function"!=typeof e}));return p()(a,i)||r.push({kind:t.kind,name:t.name,recordId:t.recordId,edits:n?je(je({},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 je(je({},e),{},Object(i.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 je(je({},e),{},Object(i.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 je(je({},e),{},Object(i.a)({},r,n))}return e}}),ke=r("pPDe"),xe=r("NMb1"),Se=r.n(xe),Te=r("FtRg"),Pe=r.n(Te),Ie=new WeakMap;function De(e,t){var r,n=de(t),c=n.stableKey,a=n.page,i=n.perPage,o=n.include,u=n.fields;if(Array.isArray(o)&&!c?r=o:e.queries[c]&&(r=e.queries[c]),!r)return null;for(var s=-1===i?0:(a-1)*i,f=-1===i?r.length:Math.min(s+i,r.length),l=[],p=s;p<f;p++){var b=r[p];if(!Array.isArray(o)||o.includes(b)){if(!e.items.hasOwnProperty(b))return null;var v=e.items[b],y=void 0;if(Array.isArray(u)){y={};for(var O=0;O<u.length;O++){var h=u[O].split("."),g=Object(d.get)(v,h);Object(d.set)(y,h,g)}}else{if(!e.itemIsComplete[b])return null;y=v}l.push(y)}}return l}var Ae=Object(ke.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Ie.get(e);if(r){var n=r.get(t);if(void 0!==n)return n}else r=new Pe.a,Ie.set(e,r);var c=De(e,t);return r.set(t,c),c}));function Ue(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 Ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ue(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Me=[],Ne=Object(o.createRegistrySelector)((function(e){return function(t,r){return e("core/data").isResolving("core","getEmbedPreview",[r])}}));function Ve(e,t){var r=Object(w.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",t);return Fe(e,r)}function Le(e,t){return Object(d.get)(e,["users","byId",t],null)}function qe(e){return e.currentUser}var Fe=Object(ke.a)((function(e,t){var r=e.users.queries[t];return Object(d.map)(r,(function(t){return e.users.byId[t]}))}),(function(e,t){return[e.users.queries[t],e.users.byId]}));function Ye(e,t){return Object(d.filter)(e.entities.config,{kind:t})}function Be(e,t,r){return Object(d.find)(e.entities.config,{kind:t,name:r})}function We(e,t,r,n,c){var a=Object(d.get)(e.entities.data,[t,r,"queriedData"]);if(a){if(void 0===c){if(!a.itemIsComplete[n])return;return a.items[n]}var i=a.items[n];if(i&&c._fields){for(var o={},u=fe(c._fields),s=0;s<u.length;s++){var f=u[s].split("."),l=Object(d.get)(i,f);Object(d.set)(o,f,l)}return o}return i}}function Qe(e,t,r,n){return We(e,t,r,n)}var He=Object(ke.a)((function(e,t,r,n){var c=We(e,t,r,n);return c&&Object.keys(c).reduce((function(e,t){return e[t]=Object(d.get)(c[t],"raw",c[t]),e}),{})}),(function(e){return[e.entities.data]}));function Ke(e,t,r,n){return Array.isArray(Ge(e,t,r,n))}function Ge(e,t,r,n){var c=Object(d.get)(e.entities.data,[t,r,"queriedData"]);return c?Ae(c,n):Me}var ze=Object(ke.a)((function(e){var t=e.entities.data,r=[];return Object.keys(t).forEach((function(n){Object.keys(t[n]).forEach((function(c){var a=Object.keys(t[n][c].edits).filter((function(t){return Je(e,n,c,t)}));if(a.length){var i=Be(e,n,c);a.forEach((function(t){var a=$e(e,n,c,t);r.push({key:a[i.key||ne],title:i.getTitle?i.getTitle(a):"",name:c,kind:n})}))}}))})),r}),(function(e){return[e.entities.data]}));function Xe(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"edits",n])}var Ze=Object(ke.a)((function(e,t,r,n){var c=(Be(e,t,r)||{}).transientEdits,a=Xe(e,t,r,n)||{};return c?Object.keys(a).reduce((function(e,t){return c[t]||(e[t]=a[t]),e}),{}):a}),(function(e){return[e.entities.config,e.entities.data]}));function Je(e,t,r,n){return tt(e,t,r,n)||Object.keys(Ze(e,t,r,n)).length>0}var $e=Object(ke.a)((function(e,t,r,n){return Ce(Ce({},He(e,t,r,n)),Xe(e,t,r,n))}),(function(e){return[e.entities.data]}));function et(e,t,r,n){var c=Object(d.get)(e.entities.data,[t,r,"saving",n],{}),a=c.pending,i=c.isAutosave;return Boolean(a&&i)}function tt(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"saving",n,"pending"],!1)}function rt(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"deleting",n,"pending"],!1)}function nt(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"saving",n,"error"])}function ct(e,t,r,n){return Object(d.get)(e.entities.data,[t,r,"deleting",n,"error"])}function at(e){return e.undo.offset}function it(e){return e.undo[e.undo.length-2+at(e)]}function ot(e){return e.undo[e.undo.length+at(e)]}function ut(e){return Boolean(it(e))}function st(e){return Boolean(ot(e))}function ft(e){return e.themes[e.currentTheme]}function dt(e){return e.themeSupports}function lt(e,t){return e.embedPreviews[t]}function pt(e,t){var r=e.embedPreviews[t],n='<a href="'+t+'">'+t+"</a>";return!!r&&r.html===n}function bt(e){return Se()("select( 'core' ).hasUploadPermissions()",{alternative:"select( 'core' ).canUser( 'create', 'media' )"}),Object(d.defaultTo)(vt(e,"create","media"),!0)}function vt(e,t,r,n){var c=Object(d.compact)([t,r,n]).join("/");return Object(d.get)(e,["userPermissions",c])}function yt(e,t,r){return e.autosaves[r]}function Ot(e,t,r,n){if(void 0!==n){var c=e.autosaves[r];return Object(d.find)(c,{author:n})}}var ht=Object(o.createRegistrySelector)((function(e){return function(t,r,n){return e("core").hasFinishedResolution("getAutosaves",[r,n])}})),gt=Object(ke.a)((function(){return[]}),(function(e){return[e.undo.length,e.undo.offset,e.undo.flattenedUndo]})),jt=function(e,t){return E.a.mark((function r(){var n,c,a,i=arguments;return E.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:for(n=i.length,c=new Array(n),a=0;a<n;a++)c[a]=i[a];return r.next=3,Object(u.select)("core","hasStartedResolution",t,c);case 3:if(r.sent){r.next=6;break}return r.delegateYield(e.apply(void 0,c),"t0",6);case 6:case"end":return r.stop()}}),r)}))};function Et(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 mt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Et(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var wt=E.a.mark(Ct),_t=E.a.mark(Mt),Rt=E.a.mark(Nt),kt=E.a.mark(Vt),xt=E.a.mark(Ft),St=E.a.mark(Yt),Tt=E.a.mark(Bt),Pt=E.a.mark(Wt),It=E.a.mark(Qt),Dt=E.a.mark(Ht),At=E.a.mark(Kt),Ut=E.a.mark(Gt);function Ct(e){var t,r;return E.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=Object(w.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",e),n.next=3,Object(u.apiFetch)({path:t});case 3:return r=n.sent,n.next=6,N(t,r);case 6:case"end":return n.stop()}}),wt)}function Mt(e){var t,r;return E.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t="/wp/v2/users?who=authors&include=".concat(e),n.next=3,Object(u.apiFetch)({path:t});case 3:return r=n.sent,n.next=6,N("author",r);case 6:case"end":return n.stop()}}),_t)}function Nt(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.apiFetch)({path:"/wp/v2/users/me"});case 2:return e=t.sent,t.next=5,V(e);case 5:case"end":return t.stop()}}),Rt)}function Vt(e,t){var r,n,c,a,i,o,s=arguments;return E.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return r=s.length>2&&void 0!==s[2]?s[2]:"",n=s.length>3?s[3]:void 0,l.next=4,se(e);case 4:if(c=l.sent,a=Object(d.find)(c,{kind:e,name:t})){l.next=8;break}return l.abrupt("return");case 8:if(void 0!==n&&n._fields&&(n=mt(mt({},n),{},{_fields:Object(d.uniq)([].concat(Object(f.a)(fe(n._fields)||[]),[a.key||ne])).join()})),i=Object(w.addQueryArgs)(a.baseURL+"/"+r,mt(mt({},n),{},{context:"edit"})),void 0===n){l.next=17;break}return n=mt(mt({},n),{},{include:[r]}),l.next=14,Object(u.syncSelect)("core","hasEntityRecords",e,t,n);case 14:if(!l.sent){l.next=17;break}return l.abrupt("return");case 17:return l.next=19,Object(u.apiFetch)({path:i});case 19:return o=l.sent,l.next=22,q(e,t,o,n);case 22:case"end":return l.stop()}}),kt)}var Lt=jt(Vt,"getEntityRecord"),qt=jt(Lt,"getRawEntityRecord");function Ft(e,t){var r,n,c,a,i,o=arguments;return E.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return r=o.length>2&&void 0!==o[2]?o[2]:{},s.next=3,se(e);case 3:if(n=s.sent,c=Object(d.find)(n,{kind:e,name:t})){s.next=7;break}return s.abrupt("return");case 7:return r._fields&&(r=mt(mt({},r),{},{_fields:Object(d.uniq)([].concat(Object(f.a)(fe(r._fields)||[]),[c.key||ne])).join()})),a=Object(w.addQueryArgs)(c.baseURL,mt(mt({},r),{},{context:"edit"})),s.t0=Object,s.next=12,Object(u.apiFetch)({path:a});case 12:return s.t1=s.sent,i=s.t0.values.call(s.t0,s.t1),r._fields&&(i=i.map((function(e){return r._fields.split(",").forEach((function(t){e.hasOwnProperty(t)||(e[t]=void 0)})),e}))),s.next=17,q(e,t,i,r);case 17:case"end":return s.stop()}}),xt)}function Yt(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.apiFetch)({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()}}),St)}function Bt(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(u.apiFetch)({path:"/wp/v2/themes?status=active"});case 2:return e=t.sent,t.next=5,Y(e[0].theme_supports);case 5:case"end":return t.stop()}}),Tt)}function Wt(e){var t;return E.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Object(u.apiFetch)({path:Object(w.addQueryArgs)("/oembed/1.0/proxy",{url:e})});case 3:return t=r.sent,r.next=6,B(e,t);case 6:r.next=12;break;case 8:return r.prev=8,r.t0=r.catch(0),r.next=12,B(e,!1);case 12:case"end":return r.stop()}}),Pt,null,[[0,8]])}function Qt(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Se()("select( 'core' ).hasUploadPermissions()",{alternative:"select( 'core' ).canUser( 'create', 'media' )"}),e.delegateYield(Ht("create","media"),"t0",2);case 2:case"end":return e.stop()}}),It)}function Ht(e,t,r){var n,c,a,i,o,s;return E.a.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:if(n={create:"POST",read:"GET",update:"PUT",delete:"DELETE"}[e]){f.next=4;break}throw new Error("'".concat(e,"' is not a valid action."));case 4:return c=r?"/wp/v2/".concat(t,"/").concat(r):"/wp/v2/".concat(t),f.prev=5,f.next=8,Object(u.apiFetch)({path:c,method:r?"GET":"OPTIONS",parse:!1});case 8:a=f.sent,f.next=14;break;case 11:return f.prev=11,f.t0=f.catch(5),f.abrupt("return");case 14:return i=Object(d.hasIn)(a,["headers","get"])?a.headers.get("allow"):Object(d.get)(a,["headers","Allow"],""),o=Object(d.compact)([e,t,r]).join("/"),s=Object(d.includes)(i,n),f.next=19,J(o,s);case 19:case"end":return f.stop()}}),Dt,null,[[5,11]])}function Kt(e,t){var r,n,c;return E.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Object(u.select)("core","getPostType",e);case 2:return r=a.sent,n=r.rest_base,a.next=6,Object(u.apiFetch)({path:"/wp/v2/".concat(n,"/").concat(t,"/autosaves?context=edit")});case 6:if(!(c=a.sent)||!c.length){a.next=10;break}return a.next=10,$(t,c);case 10:case"end":return a.stop()}}),At)}function Gt(e,t){return E.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(u.select)("core","getAutosaves",e,t);case 2:case"end":return r.stop()}}),Ut)}Ft.shouldInvalidate=function(e,t,r){return("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&t===e.kind&&r===e.name};var zt=r("GRId"),Xt=r("HSyU");function Zt(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 Jt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $t=Jt(Jt({},ce.reduce((function(e,t){return e[t.kind]||(e[t.kind]={}),e[t.kind][t.name]={context:Object(zt.createContext)()},e}),{})),ae.reduce((function(e,t){return e[t.name]={},e}),{})),er=function(e,t){if(!$t[e])throw new Error("Missing entity config for kind: ".concat(e,"."));return $t[e][t]||($t[e][t]={context:Object(zt.createContext)()}),$t[e][t]};function tr(e){var t=e.kind,r=e.type,n=e.id,c=e.children,a=er(t,r).context.Provider;return Object(zt.createElement)(a,{value:n},c)}function rr(e,t){return Object(zt.useContext)(er(e,t).context)}function nr(e,t,r,n){var c=rr(e,t),a=null!=n?n:c,u=Object(o.useSelect)((function(n){var c=n("core"),i=c.getEntityRecord,o=c.getEditedEntityRecord,u=i(e,t,a),s=o(e,t,a);return u&&s?{value:s[r],fullValue:u[r]}:{}}),[e,t,a,r]),s=u.value,f=u.fullValue,d=Object(o.useDispatch)("core").editEntityRecord;return[s,Object(zt.useCallback)((function(n){d(e,t,a,Object(i.a)({},r,n))}),[e,t,a,r]),f]}function cr(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.initialEdits,c=r.blocksProp,a=void 0===c?"blocks":c,i=r.contentProp,u=void 0===i?"content":i,f=r.id,d=rr(e,t),l=null!=f?f:d,p=nr(e,t,u,l),b=Object(s.a)(p,2),v=b[0],y=b[1],O=Object(o.useDispatch)("core"),h=O.editEntityRecord;Object(zt.useEffect)((function(){n&&h(e,t,l,n,{undoIgnore:!0})}),[l]);var g=Object(zt.useMemo)((function(){if(v&&"function"!=typeof v){var e=Object(Xt.parse)(v);return e.length?e:[]}return[]}),[v]),j=nr(e,t,a,l),E=Object(s.a)(j,2),m=E[0],w=void 0===m?g:m,_=E[1],R=Object(zt.useCallback)((function(e){_(e),y((function(e){var t=e.blocks;return Object(Xt.serialize)(t)}))}),[_,y]);return[w,_,R]}function ar(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 ir(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ar(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ar(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var or=ce.reduce((function(e,t){var r=t.kind,n=t.name;return e[ue(r,n)]=function(e,t){return We(e,r,n,t)},e[ue(r,n,"get",!0)]=function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];return Ge.apply(c,[e,r,n].concat(a))},e}),{}),ur=ce.reduce((function(e,t){var r=t.kind,n=t.name;e[ue(r,n)]=function(e){return Vt(r,n,e)};var c=ue(r,n,"get",!0);return e[c]=function(){for(var e=arguments.length,t=new Array(e),c=0;c<e;c++)t[c]=arguments[c];return Ft.apply(a,[r,n].concat(t))},e[c].shouldInvalidate=function(e){for(var t,c=arguments.length,a=new Array(c>1?c-1:0),i=1;i<c;i++)a[i-1]=arguments[i];return(t=Ft).shouldInvalidate.apply(t,[e,r,n].concat(a))},e}),{}),sr=ce.reduce((function(e,t){var r=t.kind,n=t.name;return e[ue(r,n,"save")]=function(e){return z(r,n,e)},e[ue(r,n,"delete")]=function(e,t){return W(r,n,e,t)},e}),{});Object(o.registerStore)("core",{reducer:Re,controls:u.controls,actions:ir(ir({},n),sr),selectors:ir(ir({},c),or),resolvers:ir(ir({},a),ur)})},dvlR:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},l3Sj:function(e,t){!function(){e.exports=this.wp.i18n}()},pPDe:function(e,t,r){"use strict";var n,c;function a(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function o(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}n={},c="undefined"!=typeof WeakMap,t.a=function(e,t){var r,u;function s(){r=c?new WeakMap:i()}function f(){var r,n,c,a,i,s=arguments.length;for(a=new Array(s),c=0;c<s;c++)a[c]=arguments[c];for(i=t.apply(null,a),(r=u(i)).isUniqueByDependants||(r.lastDependants&&!o(i,r.lastDependants,0)&&r.clear(),r.lastDependants=i),n=r.head;n;){if(o(n.args,a,1))return n!==r.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=r.head,n.prev=null,r.head.prev=n,r.head=n),n.val;n=n.next}return n={val:e.apply(null,a)},a[0]=null,n.args=a,r.head&&(r.head.prev=n,n.next=r.head),r.head=n,n.val}return t||(t=a),u=c?function(e){var t,c,a,o,u,s=r,f=!0;for(t=0;t<e.length;t++){if(c=e[t],!(u=c)||"object"!=typeof u){f=!1;break}s.has(c)?s=s.get(c):(a=new WeakMap,s.set(c,a),s=a)}return s.has(n)||((o=i()).isUniqueByDependants=f,s.set(n,o)),s.get(n)}:function(){return r},f.getDependants=t,f.clear=s,s(),f}},rePB: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}))},rl8x:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()}});