[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> core-data.min.js (source)

   1  /*! This file is auto-generated */
   2  !function(){var e={2167:function(e){"use strict";function t(e){return t="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},t(e)}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t){var n=e._map,r=e._arrayTreeMap,i=e._objectTreeMap;if(n.has(t))return n.get(t);for(var o=Object.keys(t).sort(),s=Array.isArray(t)?r:i,a=0;a<o.length;a++){var u=o[a];if(void 0===(s=s.get(u)))return;var c=t[u];if(void 0===(s=s.get(c)))return}var l=s.get("_ekm_value");return l?(n.delete(l[0]),l[0]=t,s.set("_ekm_value",l),n.set(t,l),l):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 n=[];t.forEach((function(e,t){n.push([t,e])})),t=n}if(null!=t)for(var r=0;r<t.length;r++)this.set(t[r][0],t[r][1])}var i,o,s;return i=e,o=[{key:"set",value:function(n,r){if(null===n||"object"!==t(n))return this._map.set(n,r),this;for(var i=Object.keys(n).sort(),o=[n,r],s=Array.isArray(n)?this._arrayTreeMap:this._objectTreeMap,a=0;a<i.length;a++){var u=i[a];s.has(u)||s.set(u,new e),s=s.get(u);var c=n[u];s.has(c)||s.set(c,new e),s=s.get(c)}var l=s.get("_ekm_value");return l&&this._map.delete(l[0]),s.set("_ekm_value",o),this._map.set(n,o),this}},{key:"get",value:function(e){if(null===e||"object"!==t(e))return this._map.get(e);var n=r(this,e);return n?n[1]:void 0}},{key:"has",value:function(e){return null===e||"object"!==t(e)?this._map.has(e):void 0!==r(this,e)}},{key:"delete",value:function(e){return!!this.has(e)&&(this.set(e,void 0),!0)}},{key:"forEach",value:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(i,o){null!==o&&"object"===t(o)&&(i=i[1]),e.call(r,i,o,n)}))}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}],o&&n(i.prototype,o),s&&n(i,s),e}();e.exports=i},9756:function(e){e.exports=function(e,t){var n,r,i=0;function o(){var o,s,a=n,u=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(s=0;s<u;s++)if(a.args[s]!==arguments[s]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(o=new Array(u),s=0;s<u;s++)o[s]=arguments[s];return a={args:o,val:e.apply(null,o)},n?(n.prev=a,a.next=n):r=a,i===t.maxSize?(r=r.prev).next=null:i++,n=a,a.val}return t=t||{},o.clear=function(){n=null,r=null,i=0},o}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r),n.d(r,{EntityProvider:function(){return rn},__experimentalFetchLinkSuggestions:function(){return En},__experimentalFetchUrlData:function(){return mn},__experimentalUseEntityRecord:function(){return vn},__experimentalUseEntityRecords:function(){return yn},store:function(){return wn},useEntityBlockEditor:function(){return an},useEntityId:function(){return on},useEntityProp:function(){return sn}});var e={};n.r(e),n.d(e,{__experimentalBatch:function(){return X},__experimentalReceiveCurrentGlobalStylesId:function(){return M},__experimentalReceiveThemeBaseGlobalStyles:function(){return G},__experimentalReceiveThemeGlobalStyleVariations:function(){return B},__experimentalSaveSpecifiedEntityEdits:function(){return Z},__unstableCreateUndoLevel:function(){return W},addEntities:function(){return N},deleteEntityRecord:function(){return Q},editEntityRecord:function(){return Y},receiveAutosaves:function(){return ne},receiveCurrentTheme:function(){return q},receiveCurrentUser:function(){return D},receiveEmbedPreview:function(){return $},receiveEntityRecords:function(){return j},receiveThemeSupports:function(){return F},receiveUploadPermissions:function(){return ee},receiveUserPermission:function(){return te},receiveUserQuery:function(){return V},redo:function(){return H},saveEditedEntityRecord:function(){return J},saveEntityRecord:function(){return z},undo:function(){return K}});var t={};n.r(t),n.d(t,{__experimentalGetCurrentGlobalStylesId:function(){return ct},__experimentalGetCurrentThemeBaseGlobalStyles:function(){return _t},__experimentalGetCurrentThemeGlobalStylesVariations:function(){return bt},__experimentalGetDirtyEntityRecords:function(){return Ye},__experimentalGetEntitiesBeingSaved:function(){return Ke},__experimentalGetEntityRecordNoResolver:function(){return Be},__experimentalGetTemplateForLink:function(){return mt},canUser:function(){return pt},canUserEditEntityRecord:function(){return vt},getAuthors:function(){return Pe},getAutosave:function(){return ht},getAutosaves:function(){return yt},getBlockPatternCategories:function(){return wt},getBlockPatterns:function(){return Rt},getCurrentTheme:function(){return ut},getCurrentUser:function(){return Ve},getEditedEntityRecord:function(){return Xe},getEmbedPreview:function(){return dt},getEntitiesByKind:function(){return Ne},getEntitiesConfig:function(){return je},getEntity:function(){return qe},getEntityConfig:function(){return Me},getEntityRecord:function(){return Ge},getEntityRecordEdits:function(){return He},getEntityRecordNonTransientEdits:function(){return We},getEntityRecords:function(){return Qe},getLastEntityDeleteError:function(){return nt},getLastEntitySaveError:function(){return tt},getRawEntityRecord:function(){return Fe},getRedoEdit:function(){return ot},getReferenceByDistinctEdits:function(){return gt},getThemeSupports:function(){return lt},getUndoEdit:function(){return it},getUserQueryResults:function(){return De},hasEditsForEntityRecord:function(){return ze},hasEntityRecords:function(){return $e},hasFetchedAutosaves:function(){return Et},hasRedo:function(){return at},hasUndo:function(){return st},isAutosavingEntityRecord:function(){return Je},isDeletingEntityRecord:function(){return et},isPreviewEmbedFallback:function(){return ft},isRequestingEmbedPreview:function(){return Oe},isSavingEntityRecord:function(){return Ze}});var i={};n.r(i),n.d(i,{__experimentalGetCurrentGlobalStylesId:function(){return qt},__experimentalGetCurrentThemeBaseGlobalStyles:function(){return Mt},__experimentalGetCurrentThemeGlobalStylesVariations:function(){return Gt},__experimentalGetTemplateForLink:function(){return jt},canUser:function(){return Pt},canUserEditEntityRecord:function(){return Vt},getAuthors:function(){return kt},getAutosave:function(){return Nt},getAutosaves:function(){return Dt},getBlockPatternCategories:function(){return Ft},getBlockPatterns:function(){return Bt},getCurrentTheme:function(){return xt},getCurrentUser:function(){return St},getEditedEntityRecord:function(){return At},getEmbedPreview:function(){return Ot},getEntityRecord:function(){return It},getEntityRecords:function(){return Ut},getRawEntityRecord:function(){return Ct},getThemeSupports:function(){return Lt}});var o=window.wp.data,s=window.lodash,a=window.wp.isShallowEqual,u=n.n(a);var c=e=>t=>(n,r)=>void 0===n||e(r)?t(n,r):n;var l=e=>t=>(n,r)=>t(n,e(r));function d(e,t){if(!e)return t;let n=!1;const r={};for(const i in t)(0,s.isEqual)(e[i],t[i])?r[i]=e[i]:(n=!0,r[i]=t[i]);if(!n)return e;for(const t in e)r.hasOwnProperty(t)||(r[t]=e[t]);return r}var f,p=e=>t=>function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;const i=r[e];if(void 0===i)return n;const o=t(n[i],r);return o===n[i]?n:{...n,[i]:o}},v=window.wp.apiFetch,y=n.n(v),h=window.wp.i18n,E=new Uint8Array(16);function g(){if(!f&&!(f="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return f(E)}var m=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var _=function(e){return"string"==typeof e&&m.test(e)},b=[],R=0;R<256;++R)b.push((R+256).toString(16).substr(1));var w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(b[e[t+0]]+b[e[t+1]]+b[e[t+2]]+b[e[t+3]]+"-"+b[e[t+4]]+b[e[t+5]]+"-"+b[e[t+6]]+b[e[t+7]]+"-"+b[e[t+8]]+b[e[t+9]]+"-"+b[e[t+10]]+b[e[t+11]]+b[e[t+12]]+b[e[t+13]]+b[e[t+14]]+b[e[t+15]]).toLowerCase();if(!_(n))throw TypeError("Stringified UUID is invalid");return n};var T=function(e,t,n){var r=(e=e||{}).random||(e.rng||g)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return w(r)},k=window.wp.url,S=window.wp.deprecated,I=n.n(S);function C(e,t){return{type:"RECEIVE_ITEMS",items:(0,s.castArray)(e),persistedEdits:t}}function A(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return{type:"REMOVE_ITEMS",itemIds:(0,s.castArray)(n),kind:e,name:t,invalidateCache:r}}function U(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return{...C(e,n),query:t}}let x=null;async function L(e){if(null===x){const e=await y()({path:"/batch/v1",method:"OPTIONS"});x=e.endpoints[0].args.requests.maxItems}const t=[];for(const n of(0,s.chunk)(e,x)){const e=await y()({path:"/batch/v1",method:"POST",data:{validation:"require-all-validate",requests:n.map((e=>({path:e.path,body:e.data,method:e.method,headers:e.headers})))}});let r;r=e.failed?e.responses.map((e=>({error:null==e?void 0:e.body}))):e.responses.map((e=>{const t={};return e.status>=200&&e.status<300?t.output=e.body:t.error=e.body,t})),t.push(...r)}return t}class O{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.set=new Set(...t),this.subscribers=new Set}get size(){return this.set.size}add(e){return this.set.add(e),this.subscribers.forEach((e=>e())),this}delete(e){const t=this.set.delete(e);return this.subscribers.forEach((e=>e())),t}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}}const P="core";function V(e,t){return{type:"RECEIVE_USER_QUERY",users:(0,s.castArray)(t),queryID:e}}function D(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function N(e){return{type:"ADD_ENTITIES",entities:e}}function j(e,t,n,r){let i,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5?arguments[5]:void 0;return"postType"===e&&(n=(0,s.castArray)(n).map((e=>"auto-draft"===e.status?{...e,title:""}:e))),i=r?U(n,r,a):C(n,a),{...i,kind:e,name:t,invalidateCache:o}}function q(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function M(e){return{type:"RECEIVE_CURRENT_GLOBAL_STYLES_ID",id:e}}function G(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLES",stylesheet:e,globalStyles:t}}function B(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS",stylesheet:e,variations:t}}function F(){return I()("wp.data.dispatch( 'core' ).receiveThemeSupports",{since:"5.9"}),{type:"DO_NOTHING"}}function $(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}const Q=function(e,t,n,r){let{__unstableFetch:i=y(),throwOnError:o=!1}=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return async a=>{let{dispatch:u}=a;const c=await u(ce(e)),l=(0,s.find)(c,{kind:e,name:t});let d,f=!1;if(!l||null!=l&&l.__experimentalNoFetch)return;const p=await u.__unstableAcquireStoreLock(P,["entities","records",e,t,n],{exclusive:!0});try{u({type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:n});let s=!1;try{let o=`$l.baseURL}/$n}`;r&&(o=(0,k.addQueryArgs)(o,r)),f=await i({path:o,method:"DELETE"}),await u(A(e,t,n,!0))}catch(e){s=!0,d=e}if(u({type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:n,error:d}),s&&o)throw d;return f}finally{u.__unstableReleaseStoreLock(p)}}},Y=function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return o=>{let{select:a,dispatch:u}=o;const c=a.getEntityConfig(e,t);if(!c)throw new Error(`The entity being edited ($e}, $t}) does not have a loaded config.`);const{transientEdits:l={},mergedEdits:d={}}=c,f=a.getRawEntityRecord(e,t,n),p=a.getEditedEntityRecord(e,t,n),v={kind:e,name:t,recordId:n,edits:Object.keys(r).reduce(((e,t)=>{const n=f[t],i=p[t],o=d[t]?{...i,...r[t]}:r[t];return e[t]=(0,s.isEqual)(n,o)?void 0:o,e}),{}),transientEdits:l};u({type:"EDIT_ENTITY_RECORD",...v,meta:{undo:!i.undoIgnore&&{...v,edits:Object.keys(r).reduce(((e,t)=>(e[t]=p[t],e)),{})}}})}},K=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getUndoEdit();r&&n({type:"EDIT_ENTITY_RECORD",...r,meta:{isUndo:!0}})},H=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getRedoEdit();r&&n({type:"EDIT_ENTITY_RECORD",...r,meta:{isRedo:!0}})};function W(){return{type:"CREATE_UNDO_LEVEL"}}const z=function(e,t,n){let{isAutosave:r=!1,__unstableFetch:i=y(),throwOnError:o=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return async a=>{let{select:u,resolveSelect:c,dispatch:l}=a;const d=await l(ce(e)),f=(0,s.find)(d,{kind:e,name:t});if(!f||null!=f&&f.__experimentalNoFetch)return;const p=f.key||re,v=n[p],y=await l.__unstableAcquireStoreLock(P,["entities","records",e,t,v||T()],{exclusive:!0});try{for(const[r,i]of Object.entries(n))if("function"==typeof i){const o=i(u.getEditedEntityRecord(e,t,v));l.editEntityRecord(e,t,v,{[r]:o},{undoIgnore:!0}),n[r]=o}let s,a;l({type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:v,isAutosave:r});let d=!1;try{const o=`$f.baseURL}$v?"/"+v:""}`,a=u.getRawEntityRecord(e,t,v);if(r){const r=u.getCurrentUser(),d=r?r.id:void 0,f=await c.getAutosave(a.type,a.id,d);let p={...a,...f,...n};if(p=Object.keys(p).reduce(((e,t)=>(["title","excerpt","content"].includes(t)&&(e[t]=p[t]),e)),{status:"auto-draft"===p.status?"draft":p.status}),s=await i({path:`$o}/autosaves`,method:"POST",data:p}),a.id===s.id){let n={...a,...p,...s};n=Object.keys(n).reduce(((e,t)=>(["title","excerpt","content"].includes(t)?e[t]=n[t]:e[t]="status"===t?"auto-draft"===a.status&&"draft"===n.status?n.status:a.status:a[t],e)),{}),l.receiveEntityRecords(e,t,n,void 0,!0)}else l.receiveAutosaves(a.id,s)}else{let r=n;f.__unstablePrePersist&&(r={...r,...f.__unstablePrePersist(a,r)}),s=await i({path:o,method:v?"PUT":"POST",data:r}),l.receiveEntityRecords(e,t,s,void 0,!0,r)}}catch(e){d=!0,a=e}if(l({type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:v,error:a,isAutosave:r}),d&&o)throw a;return s}finally{l.__unstableReleaseStoreLock(y)}}},X=e=>async t=>{let{dispatch:n}=t;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L,t=0,n=[];const r=new O;return{add(e){const i=++t;r.add(i);const o=e=>new Promise(((t,o)=>{n.push({input:e,resolve:t,reject:o}),r.delete(i)}));return(0,s.isFunction)(e)?Promise.resolve(e(o)).finally((()=>{r.delete(i)})):o(e)},async run(){let t;r.size&&await new Promise((e=>{const t=r.subscribe((()=>{r.size||(t(),e(void 0))}))}));try{if(t=await e(n.map((e=>{let{input:t}=e;return t}))),t.length!==n.length)throw new Error("run: Array returned by processor must be same size as input array.")}catch(e){for(const{reject:t}of n)t(e);throw e}let i=!0;for(const e of(0,s.zip)(t,n)){const t=e[0],n=e[1];var o;null!=t&&t.error?(null==n||n.reject(t.error),i=!1):null==n||n.resolve(null!==(o=null==t?void 0:t.output)&&void 0!==o?o:t)}return n=[],i}}}(),i={saveEntityRecord:(e,t,i,o)=>r.add((r=>n.saveEntityRecord(e,t,i,{...o,__unstableFetch:r}))),saveEditedEntityRecord:(e,t,i,o)=>r.add((r=>n.saveEditedEntityRecord(e,t,i,{...o,__unstableFetch:r}))),deleteEntityRecord:(e,t,i,o,s)=>r.add((r=>n.deleteEntityRecord(e,t,i,o,{...s,__unstableFetch:r})))},o=e.map((e=>e(i))),[,...a]=await Promise.all([r.run(),...o]);return a},J=(e,t,n,r)=>async i=>{let{select:o,dispatch:a}=i;if(!o.hasEditsForEntityRecord(e,t,n))return;const u=await a(ce(e)),c=(0,s.find)(u,{kind:e,name:t});if(!c)return;const l=c.key||re,d=o.getEntityRecordNonTransientEdits(e,t,n),f={[l]:n,...d};return await a.saveEntityRecord(e,t,f,r)},Z=(e,t,n,r,i)=>async o=>{let{select:s,dispatch:a}=o;if(!s.hasEditsForEntityRecord(e,t,n))return;const u=s.getEntityRecordNonTransientEdits(e,t,n),c={};for(const e in u)r.some((t=>t===e))&&(c[e]=u[e]);return await a.saveEntityRecord(e,t,c,i)};function ee(e){return I()("wp.data.dispatch( 'core' ).receiveUploadPermissions",{since:"5.9",alternative:"receiveUserPermission"}),te("create/media",e)}function te(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function ne(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:(0,s.castArray)(t)}}const re="id",ie=["title","excerpt","content"],oe=[{label:(0,h.__)("Base"),name:"__unstableBase",kind:"root",baseURL:"/",baseURLParams:{_fields:["description","gmt_offset","home","name","site_icon","site_icon_url","site_logo","timezone_string","url"].join(",")}},{label:(0,h.__)("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",getTitle:e=>(0,s.get)(e,["title"],(0,h.__)("Site Title"))},{label:(0,h.__)("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"},rawAttributes:ie},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:(0,h.__)("Media"),rawAttributes:["caption","title","description"]},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:(0,h.__)("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",plural:"sidebars",transientEdits:{blocks:!0},label:(0,h.__)("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:(0,h.__)("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:(0,h.__)("Widget types")},{label:(0,h.__)("User"),name:"user",kind:"root",baseURL:"/wp/v2/users",baseURLParams:{context:"edit"},plural:"users"},{name:"comment",kind:"root",baseURL:"/wp/v2/comments",baseURLParams:{context:"edit"},plural:"comments",label:(0,h.__)("Comment")},{name:"menu",kind:"root",baseURL:"/wp/v2/menus",baseURLParams:{context:"edit"},plural:"menus",label:(0,h.__)("Menu")},{name:"menuItem",kind:"root",baseURL:"/wp/v2/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:(0,h.__)("Menu Item"),rawAttributes:["title","content"]},{name:"menuLocation",kind:"root",baseURL:"/wp/v2/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:(0,h.__)("Menu Location"),key:"name"},{label:(0,h.__)("Global Styles"),name:"globalStyles",kind:"root",baseURL:"/wp/v2/global-styles",baseURLParams:{context:"edit"},plural:"globalStylesVariations",getTitle:e=>{var t;return(null==e||null===(t=e.title)||void 0===t?void 0:t.rendered)||(null==e?void 0:e.title)}},{label:(0,h.__)("Themes"),name:"theme",kind:"root",baseURL:"/wp/v2/themes",baseURLParams:{context:"edit"},key:"stylesheet"},{label:(0,h.__)("Plugins"),name:"plugin",kind:"root",baseURL:"/wp/v2/plugins",baseURLParams:{context:"edit"},key:"plugin"}],se=[{kind:"postType",loadEntities:async function(){const e=await y()({path:"/wp/v2/types?context=view"});return(0,s.map)(e,((e,t)=>{var n;const r=["wp_template","wp_template_part"].includes(t);return{kind:"postType",baseURL:`/$null!==(n=null==e?void 0:e.rest_namespace)&&void 0!==n?n:"wp/v2"}/$e.rest_base}`,baseURLParams:{context:"edit"},name:t,label:e.name,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:ie,getTitle:e=>{var t;return(null==e||null===(t=e.title)||void 0===t?void 0:t.rendered)||(null==e?void 0:e.title)||(r?(0,s.startCase)(e.slug):String(e.id))},__unstablePrePersist:r?void 0:ae,__unstable_rest_base:e.rest_base}}))}},{kind:"taxonomy",loadEntities:async function(){const e=await y()({path:"/wp/v2/taxonomies?context=view"});return(0,s.map)(e,((e,t)=>{var n;return{kind:"taxonomy",baseURL:`/$null!==(n=null==e?void 0:e.rest_namespace)&&void 0!==n?n:"wp/v2"}/$e.rest_base}`,baseURLParams:{context:"edit"},name:t,label:e.name}}))}}],ae=(e,t)=>{const n={};return"auto-draft"===(null==e?void 0:e.status)&&(t.status||n.status||(n.status="draft"),t.title&&"Auto Draft"!==t.title||n.title||null!=e&&e.title&&"Auto Draft"!==(null==e?void 0:e.title)||(n.title="")),n};const ue=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"get",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=(0,s.find)(oe,{kind:e,name:t}),o="root"===e?"":(0,s.upperFirst)((0,s.camelCase)(e)),a=(0,s.upperFirst)((0,s.camelCase)(t))+(r?"s":""),u=r&&null!=i&&i.plural?(0,s.upperFirst)((0,s.camelCase)(i.plural)):a;return`$n}$o}$u}`},ce=e=>async t=>{let{select:n,dispatch:r}=t,i=n.getEntitiesConfig(e);if(i&&0!==i.length)return i;const o=(0,s.find)(se,{kind:e});return o?(i=await o.loadEntities(),r(N(i)),i):[]};var le=function(e){return"string"==typeof e?e.split(","):Array.isArray(e)?e:null};var de=function(e){const t=new WeakMap;return n=>{let r;return t.has(n)?r=t.get(n):(r=e(n),(0,s.isObjectLike)(n)&&t.set(n,r)),r}}((function(e){const t={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},n=Object.keys(e).sort();for(let o=0;o<n.length;o++){const s=n[o];let a=e[s];switch(s){case"page":t[s]=Number(a);break;case"per_page":t.perPage=Number(a);break;case"context":t.context=a;break;default:var r,i;if("_fields"===s)t.fields=null!==(r=le(a))&&void 0!==r?r:[],a=t.fields.join();if("include"===s)"number"==typeof a&&(a=a.toString()),t.include=(null!==(i=le(a))&&void 0!==i?i:[]).map(Number),a=t.include.join();t.stableKey+=(t.stableKey?"&":"")+(0,k.addQueryArgs)("",{[s]:a}).slice(1)}}return t}));function fe(e){const{query:t}=e;if(!t)return"default";return de(t).context}function pe(e,t,n,r){var i;if(1===n&&-1===r)return t;const o=(n-1)*r,s=Math.max(null!==(i=null==e?void 0:e.length)&&void 0!==i?i:0,o+t.length),a=new Array(s);for(let n=0;n<s;n++){const r=n>=o&&n<o+t.length;a[n]=r?t[n-o]:null==e?void 0:e[n]}return a}const ve=(0,s.flowRight)([c((e=>"query"in e)),l((e=>e.query?{...e,...de(e.query)}:e)),p("context"),p("stableKey")])((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;const{type:n,page:r,perPage:i,key:o=re}=t;return"RECEIVE_ITEMS"!==n?e:pe(e||[],(0,s.map)(t.items,o),r,i)}));var ye=(0,o.combineReducers)({items:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":{const n=fe(t),r=t.key||re;return{...e,[n]:{...e[n],...t.items.reduce(((t,i)=>{var o;const s=i[r];return t[s]=d(null==e||null===(o=e[n])||void 0===o?void 0:o[s],i),t}),{})}}}case"REMOVE_ITEMS":return(0,s.mapValues)(e,(e=>(0,s.omit)(e,t.itemIds)))}return e},itemIsComplete:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ITEMS":{const n=fe(t),{query:r,key:i=re}=t,o=r?de(r):{},s=!r||!Array.isArray(o.fields);return{...e,[n]:{...e[n],...t.items.reduce(((t,r)=>{var o;const a=r[i];return t[a]=(null==e||null===(o=e[n])||void 0===o?void 0:o[a])||s,t}),{})}}}case"REMOVE_ITEMS":return(0,s.mapValues)(e,(e=>(0,s.omit)(e,t.itemIds)))}return e},queries:function(){let 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":const n=t.itemIds.reduce(((e,t)=>(e[t]=!0,e)),{});return(0,s.mapValues)(e,(e=>(0,s.mapValues)(e,(e=>(0,s.filter)(e,(e=>!n[e]))))));default:return e}}});function he(e){return(0,s.flowRight)([c((t=>t.name&&t.kind&&t.name===e.name&&t.kind===e.kind)),l((t=>({...t,key:e.key||re})))])((0,o.combineReducers)({queriedData:ye,edits:function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"RECEIVE_ITEMS":if("default"!==(null!==(e=null==r||null===(t=r.query)||void 0===t?void 0:t.context)&&void 0!==e?e:"default"))return n;const i={...n};for(const e of r.items){const t=e[r.key],n=i[t];if(!n)continue;const o=Object.keys(n).reduce(((t,i)=>((0,s.isEqual)(n[i],(0,s.get)(e[i],"raw",e[i]))||r.persistedEdits&&(0,s.isEqual)(n[i],r.persistedEdits[i])||(t[i]=n[i]),t)),{});Object.keys(o).length?i[t]=o:delete i[t]}return i;case"EDIT_ENTITY_RECORD":const o={...n[r.recordId],...r.edits};return Object.keys(o).forEach((e=>{void 0===o[e]&&delete o[e]})),{...n,[r.recordId]:o}}return n},saving:function(){let 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{...e,[t.recordId]:{pending:"SAVE_ENTITY_RECORD_START"===t.type,error:t.error,isAutosave:t.isAutosave}}}return e},deleting:function(){let 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{...e,[t.recordId]:{pending:"DELETE_ENTITY_RECORD_START"===t.type,error:t.error}}}return e}}))}function Ee(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe,t=arguments.length>1?arguments[1]:void 0;return"ADD_ENTITIES"===t.type?[...e,...t.entities]:e}const ge=Object.assign([],{offset:0});let me;var _e,be,Re=(0,o.combineReducers)({terms:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_TERMS"===t.type?{...e,[t.taxonomy]:t.terms}:e},users:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{byId:{},queries:{}},t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_USER_QUERY"===t.type?{byId:{...e.byId,...(0,s.keyBy)(t.users,"id")},queries:{...e.queries,[t.queryID]:(0,s.map)(t.users,(e=>e.id))}}:e},currentTheme:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_CURRENT_THEME"===t.type?t.currentTheme.stylesheet:e},currentGlobalStylesId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_CURRENT_GLOBAL_STYLES_ID"===t.type?t.id:e},currentUser:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_CURRENT_USER"===t.type?t.currentUser:e},themeGlobalStyleVariations:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS"===t.type?{...e,[t.stylesheet]:t.variations}:e},themeBaseGlobalStyles:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_THEME_GLOBAL_STYLES"===t.type?{...e,[t.stylesheet]:t.globalStyles}:e},taxonomies:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_TAXONOMIES"===t.type?t.taxonomies:e},entities:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const n=Ee(e.config,t);let r=e.reducer;if(!r||n!==e.config){const e=(0,s.groupBy)(n,"kind");r=(0,o.combineReducers)(Object.entries(e).reduce(((e,t)=>{let[n,r]=t;const i=(0,o.combineReducers)(r.reduce(((e,t)=>({...e,[t.name]:he(t)})),{}));return e[n]=i,e}),{}))}const i=r(e.records,t);return i===e.records&&n===e.config&&r===e.reducer?e:{reducer:r,records:i,config:n}},undo:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ge,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"EDIT_ENTITY_RECORD":case"CREATE_UNDO_LEVEL":let n="CREATE_UNDO_LEVEL"===t.type;const r=!n&&(t.meta.isUndo||t.meta.isRedo);let i;if(n?t=me:r||(me=Object.keys(t.edits).some((e=>!t.transientEdits[e]))?t:{...t,edits:{...me&&me.edits,...t.edits}}),r){if(i=[...e],i.offset=e.offset+(t.meta.isUndo?-1:1),!e.flattenedUndo)return i;n=!0,me.meta.undo||(me.meta.undo={edits:{}}),t=me}if(!t.meta.undo)return e;if(!n&&!Object.keys(t.edits).some((e=>!t.transientEdits[e])))return i=[...e],i.flattenedUndo={...e.flattenedUndo,...t.edits},i.offset=e.offset,i;i=i||e.slice(0,e.offset||void 0),i.offset=i.offset||0,i.pop(),n||i.push({kind:t.meta.undo.kind,name:t.meta.undo.name,recordId:t.meta.undo.recordId,edits:{...e.flattenedUndo,...t.meta.undo.edits}});const o=Object.values(t.meta.undo.edits).filter((e=>"function"!=typeof e)),s=Object.values(t.edits).filter((e=>"function"!=typeof e));return u()(o,s)||i.push({kind:t.kind,name:t.name,recordId:t.recordId,edits:n?{...e.flattenedUndo,...t.edits}:t.edits}),i}return e},embedPreviews:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("RECEIVE_EMBED_PREVIEW"===t.type){const{url:n,preview:r}=t;return{...e,[n]:r}}return e},userPermissions:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_USER_PERMISSION"===t.type?{...e,[t.key]:t.isAllowed}:e},autosaves:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("RECEIVE_AUTOSAVES"===t.type){const{postId:n,autosaves:r}=t;return{...e,[n]:r}}return e},blockPatterns:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_BLOCK_PATTERNS"===t.type?t.patterns:e},blockPatternCategories:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"RECEIVE_BLOCK_PATTERN_CATEGORIES"===t.type?t.categories:e}});function we(e){return[e]}function Te(){var e={clear:function(){e.head=null}};return e}function ke(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Se(e,t){var n,r;function i(){n=be?new WeakMap:Te()}function o(){var n,i,o,s,a,u=arguments.length;for(s=new Array(u),o=0;o<u;o++)s[o]=arguments[o];for(a=t.apply(null,s),(n=r(a)).isUniqueByDependants||(n.lastDependants&&!ke(a,n.lastDependants,0)&&n.clear(),n.lastDependants=a),i=n.head;i;){if(ke(i.args,s,1))return i!==n.head&&(i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=n.head,i.prev=null,n.head.prev=i,n.head=i),i.val;i=i.next}return i={val:e.apply(null,s)},s[0]=null,i.args=s,n.head&&(n.head.prev=i,i.next=n.head),n.head=i,i.val}return t||(t=we),r=be?function(e){var t,r,i,o,s,a=n,u=!0;for(t=0;t<e.length;t++){if(r=e[t],!(s=r)||"object"!=typeof s){u=!1;break}a.has(r)?a=a.get(r):(i=new WeakMap,a.set(r,i),a=i)}return a.has(_e)||((o=Te()).isUniqueByDependants=u,a.set(_e,o)),a.get(_e)}:function(){return n},o.getDependants=t,o.clear=i,i(),o}_e={},be="undefined"!=typeof WeakMap;var Ie=n(2167),Ce=n.n(Ie);const Ae=new WeakMap;function Ue(e,t){var n,r;const{stableKey:i,page:o,perPage:a,include:u,fields:c,context:l}=de(t);let d;if(null!==(n=e.queries)&&void 0!==n&&null!==(r=n[l])&&void 0!==r&&r[i]&&(d=e.queries[l][i]),!d)return null;const f=-1===a?0:(o-1)*a,p=-1===a?d.length:Math.min(f+a,d.length),v=[];for(let t=f;t<p;t++){var y;const n=d[t];if(Array.isArray(u)&&!u.includes(n))continue;if(null===(y=e.items[l])||void 0===y||!y.hasOwnProperty(n))return null;const r=e.items[l][n];let i;if(Array.isArray(c)){i={};for(let e=0;e<c.length;e++){const t=c[e].split("."),n=(0,s.get)(r,t);(0,s.set)(i,t,n)}}else{var h;if(null===(h=e.itemIsComplete[l])||void 0===h||!h[n])return null;i=r}v.push(i)}return v}const xe=Se((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ae.get(e);if(n){const e=n.get(t);if(void 0!==e)return e}else n=new(Ce()),Ae.set(e,n);const r=Ue(e,t);return n.set(t,r),r}));const Le={},Oe=(0,o.createRegistrySelector)((e=>(t,n)=>e(P).isResolving("getEmbedPreview",[n])));function Pe(e,t){I()("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});const n=(0,k.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",t);return De(e,n)}function Ve(e){return e.currentUser}const De=Se(((e,t)=>{const n=e.users.queries[t];return(0,s.map)(n,(t=>e.users.byId[t]))}),((e,t)=>[e.users.queries[t],e.users.byId]));function Ne(e,t){return I()("wp.data.select( 'core' ).getEntitiesByKind()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntitiesConfig()"}),je(e,t)}function je(e,t){return(0,s.filter)(e.entities.config,{kind:t})}function qe(e,t,n){return I()("wp.data.select( 'core' ).getEntity()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntityConfig()"}),Me(e,t,n)}function Me(e,t,n){return(0,s.find)(e.entities.config,{kind:t,name:n})}const Ge=Se(((e,t,n,r,i)=>{var o,a;const u=(0,s.get)(e.entities.records,[t,n,"queriedData"]);if(!u)return;const c=null!==(o=null==i?void 0:i.context)&&void 0!==o?o:"default";if(void 0===i){var l;if(null===(l=u.itemIsComplete[c])||void 0===l||!l[r])return;return u.items[c][r]}const d=null===(a=u.items[c])||void 0===a?void 0:a[r];if(d&&i._fields){var f;const e={},t=null!==(f=le(i._fields))&&void 0!==f?f:[];for(let n=0;n<t.length;n++){const r=t[n].split("."),i=(0,s.get)(d,r);(0,s.set)(e,r,i)}return e}return d}),((e,t,n,r,i)=>{var o;const a=null!==(o=null==i?void 0:i.context)&&void 0!==o?o:"default";return[(0,s.get)(e.entities.records,[t,n,"queriedData","items",a,r]),(0,s.get)(e.entities.records,[t,n,"queriedData","itemIsComplete",a,r])]}));function Be(e,t,n,r){return Ge(e,t,n,r)}const Fe=Se(((e,t,n,r)=>{const i=Ge(e,t,n,r);return i&&Object.keys(i).reduce(((r,o)=>(!function(e,t){return(e.rawAttributes||[]).includes(t)}(Me(e,t,n),o)?r[o]=i[o]:r[o]=(0,s.get)(i[o],"raw",i[o]),r)),{})}),((e,t,n,r,i)=>{var o;const a=null!==(o=null==i?void 0:i.context)&&void 0!==o?o:"default";return[e.entities.config,(0,s.get)(e.entities.records,[t,n,"queriedData","items",a,r]),(0,s.get)(e.entities.records,[t,n,"queriedData","itemIsComplete",a,r])]}));function $e(e,t,n,r){return Array.isArray(Qe(e,t,n,r))}function Qe(e,t,n,r){const i=(0,s.get)(e.entities.records,[t,n,"queriedData"]);return i?xe(i,r):null}const Ye=Se((e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach((r=>{Object.keys(t[r]).forEach((i=>{const o=Object.keys(t[r][i].edits).filter((t=>Ge(e,r,i,t)&&ze(e,r,i,t)));if(o.length){const t=Me(e,r,i);o.forEach((o=>{var s;const a=Xe(e,r,i,o);n.push({key:a[t.key||re],title:(null==t||null===(s=t.getTitle)||void 0===s?void 0:s.call(t,a))||"",name:i,kind:r})}))}}))})),n}),(e=>[e.entities.records])),Ke=Se((e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach((r=>{Object.keys(t[r]).forEach((i=>{const o=Object.keys(t[r][i].saving).filter((t=>Ze(e,r,i,t)));if(o.length){const t=Me(e,r,i);o.forEach((o=>{var s;const a=Xe(e,r,i,o);n.push({key:a[t.key||re],title:(null==t||null===(s=t.getTitle)||void 0===s?void 0:s.call(t,a))||"",name:i,kind:r})}))}}))})),n}),(e=>[e.entities.records]));function He(e,t,n,r){return(0,s.get)(e.entities.records,[t,n,"edits",r])}const We=Se(((e,t,n,r)=>{const{transientEdits:i}=Me(e,t,n)||{},o=He(e,t,n,r)||{};return i?Object.keys(o).reduce(((e,t)=>(i[t]||(e[t]=o[t]),e)),{}):o}),((e,t,n,r)=>[e.entities.config,(0,s.get)(e.entities.records,[t,n,"edits",r])]));function ze(e,t,n,r){return Ze(e,t,n,r)||Object.keys(We(e,t,n,r)).length>0}const Xe=Se(((e,t,n,r)=>({...Fe(e,t,n,r),...He(e,t,n,r)})),((e,t,n,r,i)=>{var o;const a=null!==(o=null==i?void 0:i.context)&&void 0!==o?o:"default";return[e.entities.config,(0,s.get)(e.entities.records,[t,n,"queriedData","items",a,r]),(0,s.get)(e.entities.records,[t,n,"queriedData","itemIsComplete",a,r]),(0,s.get)(e.entities.records,[t,n,"edits",r])]}));function Je(e,t,n,r){const{pending:i,isAutosave:o}=(0,s.get)(e.entities.records,[t,n,"saving",r],{});return Boolean(i&&o)}function Ze(e,t,n,r){return(0,s.get)(e.entities.records,[t,n,"saving",r,"pending"],!1)}function et(e,t,n,r){return(0,s.get)(e.entities.records,[t,n,"deleting",r,"pending"],!1)}function tt(e,t,n,r){return(0,s.get)(e.entities.records,[t,n,"saving",r,"error"])}function nt(e,t,n,r){return(0,s.get)(e.entities.records,[t,n,"deleting",r,"error"])}function rt(e){return e.undo.offset}function it(e){return e.undo[e.undo.length-2+rt(e)]}function ot(e){return e.undo[e.undo.length+rt(e)]}function st(e){return Boolean(it(e))}function at(e){return Boolean(ot(e))}function ut(e){return Ge(e,"root","theme",e.currentTheme)}function ct(e){return e.currentGlobalStylesId}function lt(e){var t,n;return null!==(t=null===(n=ut(e))||void 0===n?void 0:n.theme_supports)&&void 0!==t?t:Le}function dt(e,t){return e.embedPreviews[t]}function ft(e,t){const n=e.embedPreviews[t],r='<a href="'+t+'">'+t+"</a>";return!!n&&n.html===r}function pt(e,t,n,r){const i=(0,s.compact)([t,n,r]).join("/");return(0,s.get)(e,["userPermissions",i])}function vt(e,t,n,r){const i=Me(e,t,n);if(!i)return!1;return pt(e,"update",i.__unstable_rest_base,r)}function yt(e,t,n){return e.autosaves[n]}function ht(e,t,n,r){if(void 0===r)return;const i=e.autosaves[n];return(0,s.find)(i,{author:r})}const Et=(0,o.createRegistrySelector)((e=>(t,n,r)=>e(P).hasFinishedResolution("getAutosaves",[n,r]))),gt=Se((()=>[]),(e=>[e.undo.length,e.undo.offset,e.undo.flattenedUndo]));function mt(e,t){const n=Qe(e,"postType","wp_template",{"find-template":t}),r=null!=n&&n.length?n[0]:null;return r?Xe(e,"postType","wp_template",r.id):r}function _t(e){const t=ut(e);return t?e.themeBaseGlobalStyles[t.stylesheet]:null}function bt(e){const t=ut(e);return t?e.themeGlobalStyleVariations[t.stylesheet]:null}function Rt(e){return e.blockPatterns}function wt(e){return e.blockPatternCategories}var Tt=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return async t=>{let{resolveSelect:r}=t;await r[e](...n)}};const kt=e=>async t=>{let{dispatch:n}=t;const r=(0,k.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",e),i=await y()({path:r});n.receiveUserQuery(r,i)},St=()=>async e=>{let{dispatch:t}=e;const n=await y()({path:"/wp/v2/users/me"});t.receiveCurrentUser(n)},It=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return async i=>{let{select:o,dispatch:a}=i;const u=await a(ce(e)),c=(0,s.find)(u,{kind:e,name:t});if(!c||null!=c&&c.__experimentalNoFetch)return;const l=await a.__unstableAcquireStoreLock(P,["entities","records",e,t,n],{exclusive:!1});try{void 0!==r&&r._fields&&(r={...r,_fields:(0,s.uniq)([...le(r._fields)||[],c.key||re]).join()});const i=(0,k.addQueryArgs)(c.baseURL+(n?"/"+n:""),{...c.baseURLParams,...r});if(void 0!==r){r={...r,include:[n]};if(o.hasEntityRecords(e,t,r))return}const u=await y()({path:i});a.receiveEntityRecords(e,t,u,r)}finally{a.__unstableReleaseStoreLock(l)}}},Ct=Tt("getEntityRecord"),At=Tt("getEntityRecord"),Ut=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return async r=>{let{dispatch:i}=r;const o=await i(ce(e)),a=(0,s.find)(o,{kind:e,name:t});if(!a||null!=a&&a.__experimentalNoFetch)return;const u=await i.__unstableAcquireStoreLock(P,["entities","records",e,t],{exclusive:!1});try{var c;n._fields&&(n={...n,_fields:(0,s.uniq)([...le(n._fields)||[],a.key||re]).join()});const r=(0,k.addQueryArgs)(a.baseURL,{...a.baseURLParams,...n});let o=Object.values(await y()({path:r}));if(n._fields&&(o=o.map((e=>(n._fields.split(",").forEach((t=>{e.hasOwnProperty(t)||(e[t]=void 0)})),e)))),i.receiveEntityRecords(e,t,o,n),!(null!==(c=n)&&void 0!==c&&c._fields||n.context)){const n=a.key||re,r=o.filter((e=>e[n])).map((r=>[e,t,r[n]]));i({type:"START_RESOLUTIONS",selectorName:"getEntityRecord",args:r}),i({type:"FINISH_RESOLUTIONS",selectorName:"getEntityRecord",args:r})}}finally{i.__unstableReleaseStoreLock(u)}}};Ut.shouldInvalidate=(e,t,n)=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&t===e.kind&&n===e.name;const xt=()=>async e=>{let{dispatch:t,resolveSelect:n}=e;const r=await n.getEntityRecords("root","theme",{status:"active"});t.receiveCurrentTheme(r[0])},Lt=Tt("getCurrentTheme"),Ot=e=>async t=>{let{dispatch:n}=t;try{const t=await y()({path:(0,k.addQueryArgs)("/oembed/1.0/proxy",{url:e})});n.receiveEmbedPreview(e,t)}catch(t){n.receiveEmbedPreview(e,!1)}},Pt=(e,t,n)=>async r=>{var i;let{dispatch:o}=r;const a={create:"POST",read:"GET",update:"PUT",delete:"DELETE"}[e];if(!a)throw new Error(`'$e}' is not a valid action.`);const u=n?`/wp/v2/$t}/$n}`:`/wp/v2/$t}`;let c;try{c=await y()({path:u,method:"OPTIONS",parse:!1})}catch(e){return}const l=null===(i=c.headers)||void 0===i?void 0:i.get("allow"),d=(0,s.compact)([e,t,n]).join("/"),f=(0,s.includes)(l,a);o.receiveUserPermission(d,f)},Vt=(e,t,n)=>async r=>{let{dispatch:i}=r;const o=await i(ce(e)),a=(0,s.find)(o,{kind:e,name:t});if(!a)return;const u=a.__unstable_rest_base;await i(Pt("update",u,n))},Dt=(e,t)=>async n=>{let{dispatch:r,resolveSelect:i}=n;const{rest_base:o}=await i.getPostType(e),s=await y()({path:`/wp/v2/$o}/$t}/autosaves?context=edit`});s&&s.length&&r.receiveAutosaves(t,s)},Nt=(e,t)=>async n=>{let{resolveSelect:r}=n;await r.getAutosaves(e,t)},jt=e=>async t=>{let n,{dispatch:r,resolveSelect:i}=t;try{n=await window.fetch((0,k.addQueryArgs)(e,{"_wp-find-template":!0})).then((e=>e.json())).then((e=>{let{data:t}=e;return t}))}catch(e){}if(!n)return;const o=await i.getEntityRecord("postType","wp_template",n.id);o&&r.receiveEntityRecords("postType","wp_template",[o],{"find-template":e})};jt.shouldInvalidate=e=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&"postType"===e.kind&&"wp_template"===e.name;const qt=()=>async e=>{let{dispatch:t,resolveSelect:n}=e;const r=await n.getEntityRecords("root","theme",{status:"active"}),i=(0,s.get)(r,[0,"_links","wp:user-global-styles",0,"href"]);if(i){const e=await y()({url:i});t.__experimentalReceiveCurrentGlobalStylesId(e.id)}},Mt=()=>async e=>{let{resolveSelect:t,dispatch:n}=e;const r=await t.getCurrentTheme(),i=await y()({path:`/wp/v2/global-styles/themes/$r.stylesheet}`});n.__experimentalReceiveThemeBaseGlobalStyles(r.stylesheet,i)},Gt=()=>async e=>{let{resolveSelect:t,dispatch:n}=e;const r=await t.getCurrentTheme(),i=await y()({path:`/wp/v2/global-styles/themes/$r.stylesheet}/variations`});n.__experimentalReceiveThemeGlobalStyleVariations(r.stylesheet,i)},Bt=()=>async e=>{let{dispatch:t}=e;const n=await y()({path:"/wp/v2/block-patterns/patterns"});t({type:"RECEIVE_BLOCK_PATTERNS",patterns:(0,s.map)(n,(e=>(0,s.mapKeys)(e,((e,t)=>{switch(t){case"block_types":return"blockTypes";case"viewport_width":return"viewportWidth";default:return t}}))))})},Ft=()=>async e=>{let{dispatch:t}=e;t({type:"RECEIVE_BLOCK_PATTERN_CATEGORIES",categories:await y()({path:"/wp/v2/block-patterns/categories"})})};function $t(e,t){const n={...e};let r=n;for(const e of t)r.children={...r.children,[e]:{locks:[],children:{},...r.children[e]}},r=r.children[e];return n}function Qt(e,t){let n=e;for(const e of t){const t=n.children[e];if(!t)return null;n=t}return n}function Yt(e,t){let{exclusive:n}=e;return!(!n||!t.length)||!(n||!t.filter((e=>e.exclusive)).length)}const Kt={requests:[],tree:{locks:[],children:{}}};function Ht(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Kt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENQUEUE_LOCK_REQUEST":{const{request:n}=t;return{...e,requests:[n,...e.requests]}}case"GRANT_LOCK_REQUEST":{const{lock:n,request:r}=t,{store:i,path:o}=r,s=[i,...o],a=$t(e.tree,s),u=Qt(a,s);return u.locks=[...u.locks,n],{...e,requests:e.requests.filter((e=>e!==r)),tree:a}}case"RELEASE_LOCK":{const{lock:n}=t,r=[n.store,...n.path],i=$t(e.tree,r),o=Qt(i,r);return o.locks=o.locks.filter((e=>e!==n)),{...e,tree:i}}}return e}function Wt(e,t,n,r){let{exclusive:i}=r;const o=[t,...n],s=e.tree;for(const e of function*(e,t){let n=e;yield n;for(const e of t){const t=n.children[e];if(!t)break;yield t,n=t}}(s,o))if(Yt({exclusive:i},e.locks))return!1;const a=Qt(s,o);if(!a)return!0;for(const e of function*(e){const t=Object.values(e.children);for(;t.length;){const e=t.pop();yield e,t.push(...Object.values(e.children))}}(a))if(Yt({exclusive:i},e.locks))return!1;return!0}function zt(){let e=Ht(void 0,{type:"@@INIT"});function t(){for(const t of function(e){return e.requests}(e)){const{store:n,path:r,exclusive:i,notifyAcquired:o}=t;if(Wt(e,n,r,{exclusive:i})){const s={store:n,path:r,exclusive:i};e=Ht(e,{type:"GRANT_LOCK_REQUEST",lock:s,request:t}),o(s)}}}return{acquire:function(n,r,i){return new Promise((o=>{e=Ht(e,{type:"ENQUEUE_LOCK_REQUEST",request:{store:n,path:r,exclusive:i,notifyAcquired:o}}),t()}))},release:function(n){e=Ht(e,{type:"RELEASE_LOCK",lock:n}),t()}}}function Xt(){const e=zt();return{__unstableAcquireStoreLock:function(t,n,r){let{exclusive:i}=r;return()=>e.acquire(t,n,i)},__unstableReleaseStoreLock:function(t){return()=>e.release(t)}}}var Jt=window.wp.element,Zt=window.wp.blocks;const en=[],tn={...oe.reduce(((e,t)=>(e[t.kind]||(e[t.kind]={}),e[t.kind][t.name]={context:(0,Jt.createContext)(void 0)},e)),{}),...se.reduce(((e,t)=>(e[t.kind]={},e)),{})},nn=(e,t)=>{if(!tn[e])throw new Error(`Missing entity config for kind: $e}.`);return tn[e][t]||(tn[e][t]={context:(0,Jt.createContext)(void 0)}),tn[e][t].context};function rn(e){let{kind:t,type:n,id:r,children:i}=e;const o=nn(t,n).Provider;return(0,Jt.createElement)(o,{value:r},i)}function on(e,t){return(0,Jt.useContext)(nn(e,t))}function sn(e,t,n,r){const i=on(e,t),s=null!=r?r:i,{value:a,fullValue:u}=(0,o.useSelect)((r=>{const{getEntityRecord:i,getEditedEntityRecord:o}=r(P),a=i(e,t,s),u=o(e,t,s);return a&&u?{value:u[n],fullValue:a[n]}:{}}),[e,t,s,n]),{editEntityRecord:c}=(0,o.useDispatch)(P);return[a,(0,Jt.useCallback)((r=>{c(e,t,s,{[n]:r})}),[e,t,s,n]),u]}function an(e,t){let{id:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=on(e,t),i=null!=n?n:r,{content:s,blocks:a}=(0,o.useSelect)((n=>{const{getEditedEntityRecord:r}=n(P),o=r(e,t,i);return{blocks:o.blocks,content:o.content}}),[e,t,i]),{__unstableCreateUndoLevel:u,editEntityRecord:c}=(0,o.useDispatch)(P);(0,Jt.useEffect)((()=>{if(s&&"function"!=typeof s&&!a){const n=(0,Zt.parse)(s);c(e,t,i,{blocks:n},{undoIgnore:!0})}}),[s]);const l=(0,Jt.useCallback)(((n,r)=>{const{selection:o}=r,s={blocks:n,selection:o};if(a===s.blocks)return u(e,t,i);s.content=e=>{let{blocks:t=[]}=e;return(0,Zt.__unstableSerializeAndClean)(t)},c(e,t,i,s)}),[e,t,i,a]),d=(0,Jt.useCallback)(((n,r)=>{const{selection:o}=r;c(e,t,i,{blocks:n,selection:o})}),[e,t,i]);return[null!=a?a:en,d,l]}var un=n(9756),cn=n.n(un)();let ln;!function(e){e.Idle="IDLE",e.Resolving="RESOLVING",e.Error="ERROR",e.Success="SUCCESS"}(ln||(ln={}));const dn=["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"];function fn(e,t){return(0,o.useSelect)(((t,n)=>e((e=>pn(t(e))),n)),t)}const pn=cn((e=>{const t={};for(const n in e)dn.includes(n)||Object.defineProperty(t,n,{get:()=>function(){const{getIsResolving:t,hasFinishedResolution:r}=e;for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];const a=!!t(n,o),u=!a&&r(n,o),c=e[n](...o);let l;return l=a?ln.Resolving:u?c?ln.Success:ln.Error:ln.Idle,{data:c,status:l,isResolving:a,hasResolved:u}}});return t}));function vn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{enabled:!0};const{data:i,...o}=fn((i=>r.enabled?i(wn).getEntityRecord(e,t,n):null),[e,t,n,r.enabled]);return{record:i,...o}}function yn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{enabled:!0};const i=(0,k.addQueryArgs)("",n),{data:o,...s}=fn((i=>r.enabled?i(wn).getEntityRecords(e,t,n):{data:[]}),[e,t,i,r.enabled]);return{records:o,...s}}var hn=window.wp.htmlEntities;var En=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{isInitialSuggestions:r=!1,type:i,subtype:o,page:s,perPage:a=(r?3:20)}=t,{disablePostFormats:u=!1}=n,c=[];return i&&"post"!==i||c.push(y()({path:(0,k.addQueryArgs)("/wp/v2/search",{search:e,page:s,per_page:a,type:"post",subtype:o})}).then((e=>e.map((e=>({...e,meta:{kind:"post-type",subtype:o}}))))).catch((()=>[]))),i&&"term"!==i||c.push(y()({path:(0,k.addQueryArgs)("/wp/v2/search",{search:e,page:s,per_page:a,type:"term",subtype:o})}).then((e=>e.map((e=>({...e,meta:{kind:"taxonomy",subtype:o}}))))).catch((()=>[]))),u||i&&"post-format"!==i||c.push(y()({path:(0,k.addQueryArgs)("/wp/v2/search",{search:e,page:s,per_page:a,type:"post-format",subtype:o})}).then((e=>e.map((e=>({...e,meta:{kind:"taxonomy",subtype:o}}))))).catch((()=>[]))),i&&"attachment"!==i||c.push(y()({path:(0,k.addQueryArgs)("/wp/v2/media",{search:e,page:s,per_page:a})}).then((e=>e.map((e=>({...e,meta:{kind:"media"}}))))).catch((()=>[]))),Promise.all(c).then((e=>e.reduce(((e,t)=>e.concat(t)),[]).filter((e=>!!e.id)).slice(0,a).map((e=>{var t;const n="attachment"===e.type;return{id:e.id,url:n?e.source_url:e.url,title:(0,hn.decodeEntities)(n?e.title.rendered:e.title||"")||(0,h.__)("(no title)"),type:e.subtype||e.type,kind:null==e||null===(t=e.meta)||void 0===t?void 0:t.kind}}))))};const gn=new Map;var mn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n="/wp-block-editor/v1/url-details",r={url:(0,k.prependHTTP)(e)};if(!(0,k.isURL)(e))return Promise.reject(`$e} is not a valid URL.`);const i=(0,k.getProtocol)(e);return i&&(0,k.isValidProtocol)(i)&&i.startsWith("http")&&/^https?:\/\/[^\/\s]/i.test(e)?gn.has(e)?gn.get(e):y()({path:(0,k.addQueryArgs)(n,r),...t}).then((t=>(gn.set(e,t),t))):Promise.reject(`$e} does not have a valid protocol. URLs must be "http" based`)};const _n=oe.reduce(((e,t)=>{const{kind:n,name:r}=t;return e[ue(n,r)]=(e,t,i)=>Ge(e,n,r,t,i),e[ue(n,r,"get",!0)]=(e,t)=>Qe(e,n,r,t),e}),{}),bn=oe.reduce(((e,t)=>{const{kind:n,name:r}=t;e[ue(n,r)]=(e,t)=>It(n,r,e,t);const i=ue(n,r,"get",!0);return e[i]=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Ut(n,r,...t)},e[i].shouldInvalidate=e=>Ut.shouldInvalidate(e,n,r),e}),{}),Rn=oe.reduce(((e,t)=>{const{kind:n,name:r}=t;return e[ue(n,r,"save")]=e=>z(n,r,e),e[ue(n,r,"delete")]=(e,t)=>Q(n,r,e,t),e}),{}),wn=(0,o.createReduxStore)(P,{reducer:Re,actions:{...e,...Rn,...Xt()},selectors:{...t,..._n},resolvers:{...i,...bn}});(0,o.register)(wn)}(),(window.wp=window.wp||{}).coreData=r}();


Generated: Sat May 21 01:00:03 2022 Cross-referenced by PHPXref 0.7.1