bibhamrokhanpin/wp-includes/js/dist/core-data.min.js
2024-04-10 17:46:06 +05:45

2 lines
60 KiB
JavaScript

/*! This file is auto-generated */
(()=>{"use strict";var e={6689:(e,t,n)=>{n.d(t,{createUndoManager:()=>a});var r=n(923),s=n.n(r);function i(e,t){const n={...e};return Object.entries(t).forEach((([e,t])=>{n[e]?n[e]={...n[e],to:t.to}:n[e]=t})),n}const o=(e,t)=>{const n=e?.findIndex((({id:e})=>"string"==typeof e?e===t.id:s()(e,t.id))),r=[...e];return-1!==n?r[n]={id:t.id,changes:i(r[n].changes,t.changes)}:r.push(t),r};function a(){let e=[],t=[],n=0;const r=()=>{e=e.slice(0,n||void 0),n=0},i=()=>{var n;const r=0===e.length?0:e.length-1;let s=null!==(n=e[r])&&void 0!==n?n:[];t.forEach((e=>{s=o(s,e)})),t=[],e[r]=s};return{addRecord(n,a=!1){const c=!n||(e=>!e.filter((({changes:e})=>Object.values(e).some((({from:e,to:t})=>"function"!=typeof e&&"function"!=typeof t&&!s()(e,t))))).length)(n);if(a){if(c)return;n.forEach((e=>{t=o(t,e)}))}else{if(r(),t.length&&i(),c)return;e.push(n)}},undo(){t.length&&(r(),i());const s=e[e.length-1+n];if(s)return n-=1,s},redo(){const t=e[e.length+n];if(t)return n+=1,t},hasUndo:()=>!!e[e.length-1+n],hasRedo:()=>!!e[e.length+n]}}},3249:e=>{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,s=e._objectTreeMap;if(n.has(t))return n.get(t);for(var i=Object.keys(t).sort(),o=Array.isArray(t)?r:s,a=0;a<i.length;a++){var c=i[a];if(void 0===(o=o.get(c)))return;var l=t[c];if(void 0===(o=o.get(l)))return}var u=o.get("_ekm_value");return u?(n.delete(u[0]),u[0]=t,o.set("_ekm_value",u),n.set(t,u),u):void 0}var s=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 s,i,o;return s=e,i=[{key:"set",value:function(n,r){if(null===n||"object"!==t(n))return this._map.set(n,r),this;for(var s=Object.keys(n).sort(),i=[n,r],o=Array.isArray(n)?this._arrayTreeMap:this._objectTreeMap,a=0;a<s.length;a++){var c=s[a];o.has(c)||o.set(c,new e),o=o.get(c);var l=n[c];o.has(l)||o.set(l,new e),o=o.get(l)}var u=o.get("_ekm_value");return u&&this._map.delete(u[0]),o.set("_ekm_value",i),this._map.set(n,i),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(s,i){null!==i&&"object"===t(i)&&(s=s[1]),e.call(r,s,i,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}}],i&&n(s.prototype,i),o&&n(s,o),e}();e.exports=s},7734:e=>{e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(s=r;0!=s--;)if(!e(t[s],n[s]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(s of t.entries())if(!n.has(s[0]))return!1;for(s of t.entries())if(!e(s[1],n.get(s[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(s of t.entries())if(!n.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(s=r;0!=s--;)if(t[s]!==n[s])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(s=r;0!=s--;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;0!=s--;){var o=i[s];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},923:e=>{e.exports=window.wp.isShallowEqual}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{n.r(r),n.d(r,{EntityProvider:()=>Zn,__experimentalFetchLinkSuggestions:()=>Zt,__experimentalFetchUrlData:()=>en,__experimentalUseEntityRecord:()=>ur,__experimentalUseEntityRecords:()=>fr,__experimentalUseResourcePermissions:()=>Er,fetchBlockPatterns:()=>tn,store:()=>vr,useEntityBlockEditor:()=>nr,useEntityId:()=>Xn,useEntityProp:()=>er,useEntityRecord:()=>lr,useEntityRecords:()=>pr,useResourcePermissions:()=>yr});var e={};n.r(e),n.d(e,{__experimentalBatch:()=>ce,__experimentalReceiveCurrentGlobalStylesId:()=>W,__experimentalReceiveThemeBaseGlobalStyles:()=>J,__experimentalReceiveThemeGlobalStyleVariations:()=>Z,__experimentalSaveSpecifiedEntityEdits:()=>ue,__unstableCreateUndoLevel:()=>oe,addEntities:()=>Y,deleteEntityRecord:()=>ne,editEntityRecord:()=>re,receiveAutosaves:()=>fe,receiveCurrentTheme:()=>z,receiveCurrentUser:()=>Q,receiveDefaultTemplateId:()=>Ee,receiveEmbedPreview:()=>te,receiveEntityRecords:()=>H,receiveNavigationFallbackId:()=>ye,receiveRevisions:()=>me,receiveThemeGlobalStyleRevisions:()=>ee,receiveThemeSupports:()=>X,receiveUploadPermissions:()=>de,receiveUserPermission:()=>pe,receiveUserQuery:()=>K,redo:()=>ie,saveEditedEntityRecord:()=>le,saveEntityRecord:()=>ae,undo:()=>se});var t={};n.r(t),n.d(t,{__experimentalGetCurrentGlobalStylesId:()=>It,__experimentalGetCurrentThemeBaseGlobalStyles:()=>Dt,__experimentalGetCurrentThemeGlobalStylesVariations:()=>Nt,__experimentalGetDirtyEntityRecords:()=>lt,__experimentalGetEntitiesBeingSaved:()=>ut,__experimentalGetEntityRecordNoResolver:()=>rt,__experimentalGetTemplateForLink:()=>jt,canUser:()=>At,canUserEditEntityRecord:()=>Ct,getAuthors:()=>ze,getAutosave:()=>Ut,getAutosaves:()=>xt,getBlockPatternCategories:()=>Vt,getBlockPatterns:()=>Mt,getCurrentTheme:()=>Tt,getCurrentThemeGlobalStylesRevisions:()=>qt,getCurrentUser:()=>We,getDefaultTemplateId:()=>Bt,getEditedEntityRecord:()=>yt,getEmbedPreview:()=>kt,getEntitiesByKind:()=>Ze,getEntitiesConfig:()=>Xe,getEntity:()=>et,getEntityConfig:()=>tt,getEntityRecord:()=>nt,getEntityRecordEdits:()=>dt,getEntityRecordNonTransientEdits:()=>pt,getEntityRecords:()=>ot,getEntityRecordsTotalItems:()=>at,getEntityRecordsTotalPages:()=>ct,getLastEntityDeleteError:()=>vt,getLastEntitySaveError:()=>gt,getRawEntityRecord:()=>st,getRedoEdit:()=>Rt,getReferenceByDistinctEdits:()=>Lt,getRevision:()=>$t,getRevisions:()=>Ft,getThemeSupports:()=>St,getUndoEdit:()=>_t,getUserPatternCategories:()=>Gt,getUserQueryResults:()=>Je,hasEditsForEntityRecord:()=>ft,hasEntityRecords:()=>it,hasFetchedAutosaves:()=>Pt,hasRedo:()=>wt,hasUndo:()=>bt,isAutosavingEntityRecord:()=>Et,isDeletingEntityRecord:()=>ht,isPreviewEmbedFallback:()=>Ot,isRequestingEmbedPreview:()=>He,isSavingEntityRecord:()=>mt});var s={};n.r(s),n.d(s,{getBlockPatternsForPostType:()=>Yt,getNavigationFallbackId:()=>Qt,getUndoManager:()=>Kt});var i={};n.r(i),n.d(i,{__experimentalGetCurrentGlobalStylesId:()=>hn,__experimentalGetCurrentThemeBaseGlobalStyles:()=>gn,__experimentalGetCurrentThemeGlobalStylesVariations:()=>vn,__experimentalGetTemplateForLink:()=>mn,canUser:()=>pn,canUserEditEntityRecord:()=>fn,getAuthors:()=>nn,getAutosave:()=>En,getAutosaves:()=>yn,getBlockPatternCategories:()=>bn,getBlockPatterns:()=>Rn,getCurrentTheme:()=>ln,getCurrentThemeGlobalStylesRevisions:()=>_n,getCurrentUser:()=>rn,getDefaultTemplateId:()=>In,getEditedEntityRecord:()=>an,getEmbedPreview:()=>dn,getEntityRecord:()=>sn,getEntityRecords:()=>cn,getNavigationFallbackId:()=>Tn,getRawEntityRecord:()=>on,getRevision:()=>kn,getRevisions:()=>Sn,getThemeSupports:()=>un,getUserPatternCategories:()=>wn});const o=window.wp.data;var a=n(7734),c=n.n(a);const l=window.wp.compose;var u=n(6689);const d=e=>t=>(n,r)=>void 0===n||e(r)?t(n,r):n,p=e=>t=>(n,r)=>t(n,e(r));const f=e=>t=>(n={},r)=>{const s=r[e];if(void 0===s)return n;const i=t(n[s],r);return i===n[s]?n:{...n,[s]:i}};var y=function(){return y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},y.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function E(e){return e.toLowerCase()}var m=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],h=/[^A-Z0-9]+/gi;function g(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?m:n,s=t.stripRegexp,i=void 0===s?h:s,o=t.transform,a=void 0===o?E:o,c=t.delimiter,l=void 0===c?" ":c,u=v(v(e,r,"$1\0$2"),i,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(a).join(l)}function v(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function _(e){return function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(e.toLowerCase())}function R(e,t){var n=e.charAt(0),r=e.substr(1).toLowerCase();return t>0&&n>="0"&&n<="9"?"_"+n+r:""+n.toUpperCase()+r}function b(e,t){return void 0===t&&(t={}),g(e,y({delimiter:"",transform:R},t))}const w=window.wp.apiFetch;var T=n.n(w);const I=window.wp.i18n,S=window.wp.richText,k={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let O;const A=new Uint8Array(16);function C(){if(!O&&(O="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!O))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return O(A)}const x=[];for(let e=0;e<256;++e)x.push((e+256).toString(16).slice(1));function U(e,t=0){return x[e[t+0]]+x[e[t+1]]+x[e[t+2]]+x[e[t+3]]+"-"+x[e[t+4]]+x[e[t+5]]+"-"+x[e[t+6]]+x[e[t+7]]+"-"+x[e[t+8]]+x[e[t+9]]+"-"+x[e[t+10]]+x[e[t+11]]+x[e[t+12]]+x[e[t+13]]+x[e[t+14]]+x[e[t+15]]}const P=function(e,t,n){if(k.randomUUID&&!t&&!e)return k.randomUUID();const r=(e=e||{}).random||(e.rng||C)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return U(r)},L=window.wp.url,j=window.wp.deprecated;var D=n.n(j);function N(e,t,n){if(!e||"object"!=typeof e)return e;const r=Array.isArray(t)?t:t.split(".");return r.reduce(((e,t,s)=>(void 0===e[t]&&(Number.isInteger(r[s+1])?e[t]=[]:e[t]={}),s===r.length-1&&(e[t]=n),e[t])),e),e}function M(e,t,n){if(!e||"object"!=typeof e||"string"!=typeof t&&!Array.isArray(t))return e;const r=Array.isArray(t)?t:t.split(".");let s=e;return r.forEach((e=>{s=s?.[e]})),void 0!==s?s:n}function V(e,t,n){return{type:"RECEIVE_ITEMS",items:Array.isArray(e)?e:[e],persistedEdits:t,meta:n}}let G=null;async function q(e){if(null===G){const e=await T()({path:"/batch/v1",method:"OPTIONS"});G=e.endpoints[0].args.requests.maxItems}const t=[];for(const n of function(e,t){const n=[...e],r=[];for(;n.length;)r.push(n.splice(0,t));return r}(e,G)){const e=await T()({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: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}function B(e=q){let t=0,n=[];const r=new F;return{add(e){const s=++t;r.add(s);const i=e=>new Promise(((t,i)=>{n.push({input:e,resolve:t,reject:i}),r.delete(s)}));return"function"==typeof e?Promise.resolve(e(i)).finally((()=>{r.delete(s)})):i(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((({input:e})=>e))),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 s=!0;return t.forEach(((e,t)=>{const r=n[t];var i;e?.error?(r?.reject(e.error),s=!1):r?.resolve(null!==(i=e?.output)&&void 0!==i?i:e)})),n=[],s}}}class F{constructor(...e){this.set=new Set(...e),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 $="core";function K(e,t){return{type:"RECEIVE_USER_QUERY",users:Array.isArray(t)?t:[t],queryID:e}}function Q(e){return{type:"RECEIVE_CURRENT_USER",currentUser:e}}function Y(e){return{type:"ADD_ENTITIES",entities:e}}function H(e,t,n,r,s=!1,i,o){let a;return"postType"===e&&(n=(Array.isArray(n)?n:[n]).map((e=>"auto-draft"===e.status?{...e,title:""}:e))),a=r?function(e,t={},n,r){return{...V(e,n,r),query:t}}(n,r,i,o):V(n,i,o),{...a,kind:e,name:t,invalidateCache:s}}function z(e){return{type:"RECEIVE_CURRENT_THEME",currentTheme:e}}function W(e){return{type:"RECEIVE_CURRENT_GLOBAL_STYLES_ID",id:e}}function J(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLES",stylesheet:e,globalStyles:t}}function Z(e,t){return{type:"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS",stylesheet:e,variations:t}}function X(){return D()("wp.data.dispatch( 'core' ).receiveThemeSupports",{since:"5.9"}),{type:"DO_NOTHING"}}function ee(e,t){return D()("wp.data.dispatch( 'core' ).receiveThemeGlobalStyleRevisions()",{since:"6.5.0",alternative:"wp.data.dispatch( 'core' ).receiveRevisions"}),{type:"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS",currentId:e,revisions:t}}function te(e,t){return{type:"RECEIVE_EMBED_PREVIEW",url:e,preview:t}}const ne=(e,t,n,r,{__unstableFetch:s=T(),throwOnError:i=!1}={})=>async({dispatch:o})=>{const a=(await o(Se(e))).find((n=>n.kind===e&&n.name===t));let c,l=!1;if(!a||a?.__experimentalNoFetch)return;const u=await o.__unstableAcquireStoreLock($,["entities","records",e,t,n],{exclusive:!0});try{o({type:"DELETE_ENTITY_RECORD_START",kind:e,name:t,recordId:n});let u=!1;try{let i=`${a.baseURL}/${n}`;r&&(i=(0,L.addQueryArgs)(i,r)),l=await s({path:i,method:"DELETE"}),await o(function(e,t,n,r=!1){return{type:"REMOVE_ITEMS",itemIds:Array.isArray(n)?n:[n],kind:e,name:t,invalidateCache:r}}(e,t,n,!0))}catch(e){u=!0,c=e}if(o({type:"DELETE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:n,error:c}),u&&i)throw c;return l}finally{o.__unstableReleaseStoreLock(u)}},re=(e,t,n,r,s={})=>({select:i,dispatch:o})=>{const a=i.getEntityConfig(e,t);if(!a)throw new Error(`The entity being edited (${e}, ${t}) does not have a loaded config.`);const{mergedEdits:l={}}=a,u=i.getRawEntityRecord(e,t,n),d=i.getEditedEntityRecord(e,t,n),p={kind:e,name:t,recordId:n,edits:Object.keys(r).reduce(((e,t)=>{const n=u[t],s=d[t],i=l[t]?{...s,...r[t]}:r[t];return e[t]=c()(n,i)?void 0:i,e}),{})};window.__experimentalEnableSync&&a.syncConfig||(s.undoIgnore||i.getUndoManager().addRecord([{id:{kind:e,name:t,recordId:n},changes:Object.keys(r).reduce(((e,t)=>(e[t]={from:d[t],to:r[t]},e)),{})}],s.isCached),o({type:"EDIT_ENTITY_RECORD",...p}))},se=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().undo();n&&t({type:"UNDO",record:n})},ie=()=>({select:e,dispatch:t})=>{const n=e.getUndoManager().redo();n&&t({type:"REDO",record:n})},oe=()=>({select:e})=>{e.getUndoManager().addRecord()},ae=(e,t,n,{isAutosave:r=!1,__unstableFetch:s=T(),throwOnError:i=!1}={})=>async({select:o,resolveSelect:a,dispatch:c})=>{const l=(await c(Se(e))).find((n=>n.kind===e&&n.name===t));if(!l||l?.__experimentalNoFetch)return;const u=l.key||he,d=n[u],p=await c.__unstableAcquireStoreLock($,["entities","records",e,t,d||P()],{exclusive:!0});try{for(const[r,s]of Object.entries(n))if("function"==typeof s){const i=s(o.getEditedEntityRecord(e,t,d));c.editEntityRecord(e,t,d,{[r]:i},{undoIgnore:!0}),n[r]=i}let u,p;c({type:"SAVE_ENTITY_RECORD_START",kind:e,name:t,recordId:d,isAutosave:r});let f=!1;try{const i=`${l.baseURL}${d?"/"+d:""}`,p=o.getRawEntityRecord(e,t,d);if(r){const r=o.getCurrentUser(),l=r?r.id:void 0,d=await a.getAutosave(p.type,p.id,l);let f={...p,...d,...n};if(f=Object.keys(f).reduce(((e,t)=>(["title","excerpt","content","meta"].includes(t)&&(e[t]=f[t]),e)),{status:"auto-draft"===f.status?"draft":f.status}),u=await s({path:`${i}/autosaves`,method:"POST",data:f}),p.id===u.id){let n={...p,...f,...u};n=Object.keys(n).reduce(((e,t)=>(["title","excerpt","content"].includes(t)?e[t]=n[t]:e[t]="status"===t?"auto-draft"===p.status&&"draft"===n.status?n.status:p.status:p[t],e)),{}),c.receiveEntityRecords(e,t,n,void 0,!0)}else c.receiveAutosaves(p.id,u)}else{let r=n;l.__unstablePrePersist&&(r={...r,...l.__unstablePrePersist(p,r)}),u=await s({path:i,method:d?"PUT":"POST",data:r}),c.receiveEntityRecords(e,t,u,void 0,!0,r)}}catch(e){f=!0,p=e}if(c({type:"SAVE_ENTITY_RECORD_FINISH",kind:e,name:t,recordId:d,error:p,isAutosave:r}),f&&i)throw p;return u}finally{c.__unstableReleaseStoreLock(p)}},ce=e=>async({dispatch:t})=>{const n=B(),r={saveEntityRecord:(e,r,s,i)=>n.add((n=>t.saveEntityRecord(e,r,s,{...i,__unstableFetch:n}))),saveEditedEntityRecord:(e,r,s,i)=>n.add((n=>t.saveEditedEntityRecord(e,r,s,{...i,__unstableFetch:n}))),deleteEntityRecord:(e,r,s,i,o)=>n.add((n=>t.deleteEntityRecord(e,r,s,i,{...o,__unstableFetch:n})))},s=e.map((e=>e(r))),[,...i]=await Promise.all([n.run(),...s]);return i},le=(e,t,n,r)=>async({select:s,dispatch:i})=>{if(!s.hasEditsForEntityRecord(e,t,n))return;const o=(await i(Se(e))).find((n=>n.kind===e&&n.name===t));if(!o)return;const a=o.key||he,c=s.getEntityRecordNonTransientEdits(e,t,n),l={[a]:n,...c};return await i.saveEntityRecord(e,t,l,r)},ue=(e,t,n,r,s)=>async({select:i,dispatch:o})=>{if(!i.hasEditsForEntityRecord(e,t,n))return;const a=i.getEntityRecordNonTransientEdits(e,t,n),c={};for(const e of r)N(c,e,M(a,e));const l=(await o(Se(e))).find((n=>n.kind===e&&n.name===t));return n&&(c[l?.key||he]=n),await o.saveEntityRecord(e,t,c,s)};function de(e){return D()("wp.data.dispatch( 'core' ).receiveUploadPermissions",{since:"5.9",alternative:"receiveUserPermission"}),pe("create/media",e)}function pe(e,t){return{type:"RECEIVE_USER_PERMISSION",key:e,isAllowed:t}}function fe(e,t){return{type:"RECEIVE_AUTOSAVES",postId:e,autosaves:Array.isArray(t)?t:[t]}}function ye(e){return{type:"RECEIVE_NAVIGATION_FALLBACK_ID",fallbackId:e}}function Ee(e,t){return{type:"RECEIVE_DEFAULT_TEMPLATE",query:e,templateId:t}}const me=(e,t,n,r,s,i=!1,o)=>async({dispatch:a})=>{const c=(await a(Se(e))).find((n=>n.kind===e&&n.name===t));a({type:"RECEIVE_ITEM_REVISIONS",key:c&&c?.revisionKey?c.revisionKey:he,items:Array.isArray(r)?r:[r],recordKey:n,meta:o,query:s,kind:e,name:t,invalidateCache:i})},he="id",ge=["title","excerpt","content"],ve=[{label:(0,I.__)("Base"),kind:"root",name:"__unstableBase",baseURL:"/",baseURLParams:{_fields:["description","gmt_offset","home","name","site_icon","site_icon_url","site_logo","timezone_string","url"].join(",")},syncConfig:{fetch:async()=>T()({path:"/"}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach((([e,t])=>{n.get(e)!==t&&n.set(e,t)}))},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/base",getSyncObjectId:()=>"index"},{label:(0,I.__)("Site"),name:"site",kind:"root",baseURL:"/wp/v2/settings",getTitle:e=>{var t;return null!==(t=e?.title)&&void 0!==t?t:(0,I.__)("Site Title")},syncConfig:{fetch:async()=>T()({path:"/wp/v2/settings"}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach((([e,t])=>{n.get(e)!==t&&n.set(e,t)}))},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/site",getSyncObjectId:()=>"index"},{label:(0,I.__)("Post Type"),name:"postType",kind:"root",key:"slug",baseURL:"/wp/v2/types",baseURLParams:{context:"edit"},syncConfig:{fetch:async e=>T()({path:`/wp/v2/types/${e}?context=edit`}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach((([e,t])=>{n.get(e)!==t&&n.set(e,t)}))},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"root/postType",getSyncObjectId:e=>e},{name:"media",kind:"root",baseURL:"/wp/v2/media",baseURLParams:{context:"edit"},plural:"mediaItems",label:(0,I.__)("Media"),rawAttributes:["caption","title","description"],supportsPagination:!0},{name:"taxonomy",kind:"root",key:"slug",baseURL:"/wp/v2/taxonomies",baseURLParams:{context:"edit"},plural:"taxonomies",label:(0,I.__)("Taxonomy")},{name:"sidebar",kind:"root",baseURL:"/wp/v2/sidebars",baseURLParams:{context:"edit"},plural:"sidebars",transientEdits:{blocks:!0},label:(0,I.__)("Widget areas")},{name:"widget",kind:"root",baseURL:"/wp/v2/widgets",baseURLParams:{context:"edit"},plural:"widgets",transientEdits:{blocks:!0},label:(0,I.__)("Widgets")},{name:"widgetType",kind:"root",baseURL:"/wp/v2/widget-types",baseURLParams:{context:"edit"},plural:"widgetTypes",label:(0,I.__)("Widget types")},{label:(0,I.__)("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,I.__)("Comment")},{name:"menu",kind:"root",baseURL:"/wp/v2/menus",baseURLParams:{context:"edit"},plural:"menus",label:(0,I.__)("Menu")},{name:"menuItem",kind:"root",baseURL:"/wp/v2/menu-items",baseURLParams:{context:"edit"},plural:"menuItems",label:(0,I.__)("Menu Item"),rawAttributes:["title"]},{name:"menuLocation",kind:"root",baseURL:"/wp/v2/menu-locations",baseURLParams:{context:"edit"},plural:"menuLocations",label:(0,I.__)("Menu Location"),key:"name"},{label:(0,I.__)("Global Styles"),name:"globalStyles",kind:"root",baseURL:"/wp/v2/global-styles",baseURLParams:{context:"edit"},plural:"globalStylesVariations",getTitle:e=>e?.title?.rendered||e?.title,getRevisionsUrl:(e,t)=>`/wp/v2/global-styles/${e}/revisions${t?"/"+t:""}`,supportsPagination:!0},{label:(0,I.__)("Themes"),name:"theme",kind:"root",baseURL:"/wp/v2/themes",baseURLParams:{context:"edit"},key:"stylesheet"},{label:(0,I.__)("Plugins"),name:"plugin",kind:"root",baseURL:"/wp/v2/plugins",baseURLParams:{context:"edit"},key:"plugin"},{label:(0,I.__)("Status"),name:"status",kind:"root",baseURL:"/wp/v2/statuses",baseURLParams:{context:"edit"},plural:"statuses",key:"slug"}],_e=[{kind:"postType",loadEntities:async function(){const e=await T()({path:"/wp/v2/types?context=view"});return Object.entries(null!=e?e:{}).map((([e,t])=>{var n;const r=["wp_template","wp_template_part"].includes(e),s=null!==(n=t?.rest_namespace)&&void 0!==n?n:"wp/v2";return{kind:"postType",baseURL:`/${s}/${t.rest_base}`,baseURLParams:{context:"edit"},name:e,label:t.name,transientEdits:{blocks:!0,selection:!0},mergedEdits:{meta:!0},rawAttributes:ge,getTitle:e=>{var t,n,s;return e?.title?.rendered||e?.title||(r?(n=null!==(t=e.slug)&&void 0!==t?t:"",void 0===s&&(s={}),g(n,y({delimiter:" ",transform:_},s))):String(e.id))},__unstablePrePersist:r?void 0:Re,__unstable_rest_base:t.rest_base,syncConfig:{fetch:async e=>T()({path:`/${s}/${t.rest_base}/${e}?context=edit`}),applyChangesToDoc:(e,t)=>{const n=e.getMap("document");Object.entries(t).forEach((([e,t])=>{"function"!=typeof t&&("blocks"===e&&(be.has(t)||be.set(t,Te(t)),t=be.get(t)),n.get(e)!==t&&n.set(e,t))}))},fromCRDTDoc:e=>e.getMap("document").toJSON()},syncObjectType:"postType/"+t.name,getSyncObjectId:e=>e,supportsPagination:!0,getRevisionsUrl:(e,n)=>`/${s}/${t.rest_base}/${e}/revisions${n?"/"+n:""}`,revisionKey:r?"wp_id":he}}))}},{kind:"taxonomy",loadEntities:async function(){const e=await T()({path:"/wp/v2/taxonomies?context=view"});return Object.entries(null!=e?e:{}).map((([e,t])=>{var n;return{kind:"taxonomy",baseURL:`/${null!==(n=t?.rest_namespace)&&void 0!==n?n:"wp/v2"}/${t.rest_base}`,baseURLParams:{context:"edit"},name:e,label:t.name}}))}}],Re=(e,t)=>{const n={};return"auto-draft"===e?.status&&(t.status||n.status||(n.status="draft"),t.title&&"Auto Draft"!==t.title||n.title||e?.title&&"Auto Draft"!==e?.title||(n.title="")),n},be=new WeakMap;function we(e){const t={...e};for(const[n,r]of Object.entries(e))r instanceof S.RichTextData&&(t[n]=r.valueOf());return t}function Te(e){return e.map((e=>{const{innerBlocks:t,attributes:n,...r}=e;return{...r,attributes:we(n),innerBlocks:Te(t)}}))}const Ie=(e,t,n="get",r=!1)=>{const s=ve.find((n=>n.kind===e&&n.name===t)),i="root"===e?"":b(e),o=b(t)+(r?"s":"");return`${n}${i}${r&&"plural"in s&&s?.plural?b(s.plural):o}`};const Se=e=>async({select:t,dispatch:n})=>{let r=t.getEntitiesConfig(e);if(r&&0!==r.length)return window.__experimentalEnableSync,r;const s=_e.find((t=>t.kind===e));return s?(r=await s.loadEntities(),window.__experimentalEnableSync,n(Y(r)),r):[]};const ke=function(e){return"string"==typeof e?e.split(","):Array.isArray(e)?e:null};const Oe=function(e){const t=new WeakMap;return n=>{let r;return t.has(n)?r=t.get(n):(r=e(n),null!==n&&"object"==typeof n&&t.set(n,r)),r}};const Ae=Oe((function(e){const t={stableKey:"",page:1,perPage:10,fields:null,include:null,context:"default"},n=Object.keys(e).sort();for(let i=0;i<n.length;i++){const o=n[i];let a=e[o];switch(o){case"page":t[o]=Number(a);break;case"per_page":t.perPage=Number(a);break;case"context":t.context=a;break;default:var r,s;if("_fields"===o)t.fields=null!==(r=ke(a))&&void 0!==r?r:[],a=t.fields.join();if("include"===o)"number"==typeof a&&(a=a.toString()),t.include=(null!==(s=ke(a))&&void 0!==s?s:[]).map(Number),a=t.include.join();t.stableKey+=(t.stableKey?"&":"")+(0,L.addQueryArgs)("",{[o]:a}).slice(1)}}return t}));function Ce(e){const{query:t}=e;if(!t)return"default";return Ae(t).context}function xe(e,t,n,r){var s;if(1===n&&-1===r)return t;const i=(n-1)*r,o=Math.max(null!==(s=e?.length)&&void 0!==s?s:0,i+t.length),a=new Array(o);for(let n=0;n<o;n++){const s=n>=i&&n<i+r;a[n]=s?t[n-i]:e?.[n]}return a}function Ue(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.some((t=>Number.isInteger(t)?t===+e:t===e)))))}const Pe=(0,l.compose)([d((e=>"query"in e)),p((e=>e.query?{...e,...Ae(e.query)}:e)),f("context"),f("stableKey")])(((e={},t)=>{const{type:n,page:r,perPage:s,key:i=he}=t;return"RECEIVE_ITEMS"!==n?e:{itemIds:xe(e?.itemIds||[],t.items.map((e=>e[i])),r,s),meta:t.meta}})),Le=(0,o.combineReducers)({items:function(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=Ce(t),r=t.key||he;return{...e,[n]:{...e[n],...t.items.reduce(((t,s)=>{const i=s[r];return t[i]=function(e,t){if(!e)return t;let n=!1;const r={};for(const s in t)c()(e[s],t[s])?r[s]=e[s]:(n=!0,r[s]=t[s]);if(!n)return e;for(const t in e)r.hasOwnProperty(t)||(r[t]=e[t]);return r}(e?.[n]?.[i],s),t}),{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map((([e,n])=>[e,Ue(n,t.itemIds)])))}return e},itemIsComplete:function(e={},t){switch(t.type){case"RECEIVE_ITEMS":{const n=Ce(t),{query:r,key:s=he}=t,i=r?Ae(r):{},o=!r||!Array.isArray(i.fields);return{...e,[n]:{...e[n],...t.items.reduce(((t,r)=>{const i=r[s];return t[i]=e?.[n]?.[i]||o,t}),{})}}}case"REMOVE_ITEMS":return Object.fromEntries(Object.entries(e).map((([e,n])=>[e,Ue(n,t.itemIds)])))}return e},queries:(e={},t)=>{switch(t.type){case"RECEIVE_ITEMS":return Pe(e,t);case"REMOVE_ITEMS":const n=t.itemIds.reduce(((e,t)=>(e[t]=!0,e)),{});return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,Object.fromEntries(Object.entries(t).map((([e,t])=>[e,{...t,itemIds:t.itemIds.filter((e=>!n[e]))}])))])));default:return e}}});const je=e=>(t,n)=>{if("UNDO"===n.type||"REDO"===n.type){const{record:r}=n;let s=t;return r.forEach((({id:{kind:t,name:r,recordId:i},changes:o})=>{s=e(s,{type:"EDIT_ENTITY_RECORD",kind:t,name:r,recordId:i,edits:Object.entries(o).reduce(((e,[t,r])=>(e[t]="UNDO"===n.type?r.from:r.to,e)),{})})})),s}return e(t,n)};function De(e){return(0,l.compose)([je,d((t=>t.name&&t.kind&&t.name===e.name&&t.kind===e.kind)),p((t=>({key:e.key||he,...t})))])((0,o.combineReducers)({queriedData:Le,edits:(e={},t)=>{var n;switch(t.type){case"RECEIVE_ITEMS":if("default"!==(null!==(n=t?.query?.context)&&void 0!==n?n:"default"))return e;const r={...e};for(const e of t.items){const n=e[t.key],s=r[n];if(!s)continue;const i=Object.keys(s).reduce(((n,r)=>{var i;return c()(s[r],null!==(i=e[r]?.raw)&&void 0!==i?i:e[r])||t.persistedEdits&&c()(s[r],t.persistedEdits[r])||(n[r]=s[r]),n}),{});Object.keys(i).length?r[n]=i:delete r[n]}return r;case"EDIT_ENTITY_RECORD":const s={...e[t.recordId],...t.edits};return Object.keys(s).forEach((e=>{void 0===s[e]&&delete s[e]})),{...e,[t.recordId]:s}}return e},saving:(e={},t)=>{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:(e={},t)=>{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},revisions:(e={},t)=>{if("RECEIVE_ITEM_REVISIONS"===t.type){const n=t.recordKey;delete t.recordKey;const r=Le(e[n],{...t,type:"RECEIVE_ITEMS"});return{...e,[n]:r}}return"REMOVE_ITEMS"===t.type?Object.fromEntries(Object.entries(e).filter((([e])=>!t.itemIds.some((t=>Number.isInteger(t)?t===+e:t===e))))):e}}))}const Ne=(0,o.combineReducers)({terms:function(e={},t){return"RECEIVE_TERMS"===t.type?{...e,[t.taxonomy]:t.terms}:e},users:function(e={byId:{},queries:{}},t){return"RECEIVE_USER_QUERY"===t.type?{byId:{...e.byId,...t.users.reduce(((e,t)=>({...e,[t.id]:t})),{})},queries:{...e.queries,[t.queryID]:t.users.map((e=>e.id))}}:e},currentTheme:function(e=void 0,t){return"RECEIVE_CURRENT_THEME"===t.type?t.currentTheme.stylesheet:e},currentGlobalStylesId:function(e=void 0,t){return"RECEIVE_CURRENT_GLOBAL_STYLES_ID"===t.type?t.id:e},currentUser:function(e={},t){return"RECEIVE_CURRENT_USER"===t.type?t.currentUser:e},themeGlobalStyleVariations:function(e={},t){return"RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS"===t.type?{...e,[t.stylesheet]:t.variations}:e},themeBaseGlobalStyles:function(e={},t){return"RECEIVE_THEME_GLOBAL_STYLES"===t.type?{...e,[t.stylesheet]:t.globalStyles}:e},themeGlobalStyleRevisions:function(e={},t){return"RECEIVE_THEME_GLOBAL_STYLE_REVISIONS"===t.type?{...e,[t.currentId]:t.revisions}:e},taxonomies:function(e=[],t){return"RECEIVE_TAXONOMIES"===t.type?t.taxonomies:e},entities:(e={},t)=>{const n=function(e=ve,t){return"ADD_ENTITIES"===t.type?[...e,...t.entities]:e}(e.config,t);let r=e.reducer;if(!r||n!==e.config){const e=n.reduce(((e,t)=>{const{kind:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{});r=(0,o.combineReducers)(Object.entries(e).reduce(((e,[t,n])=>{const r=(0,o.combineReducers)(n.reduce(((e,t)=>({...e,[t.name]:De(t)})),{}));return e[t]=r,e}),{}))}const s=r(e.records,t);return s===e.records&&n===e.config&&r===e.reducer?e:{reducer:r,records:s,config:n}},editsReference:function(e={},t){switch(t.type){case"EDIT_ENTITY_RECORD":case"UNDO":case"REDO":return{}}return e},undoManager:function(e=(0,u.createUndoManager)()){return e},embedPreviews:function(e={},t){if("RECEIVE_EMBED_PREVIEW"===t.type){const{url:n,preview:r}=t;return{...e,[n]:r}}return e},userPermissions:function(e={},t){return"RECEIVE_USER_PERMISSION"===t.type?{...e,[t.key]:t.isAllowed}:e},autosaves:function(e={},t){if("RECEIVE_AUTOSAVES"===t.type){const{postId:n,autosaves:r}=t;return{...e,[n]:r}}return e},blockPatterns:function(e=[],t){return"RECEIVE_BLOCK_PATTERNS"===t.type?t.patterns:e},blockPatternCategories:function(e=[],t){return"RECEIVE_BLOCK_PATTERN_CATEGORIES"===t.type?t.categories:e},userPatternCategories:function(e=[],t){return"RECEIVE_USER_PATTERN_CATEGORIES"===t.type?t.patternCategories:e},navigationFallbackId:function(e=null,t){return"RECEIVE_NAVIGATION_FALLBACK_ID"===t.type?t.fallbackId:e},defaultTemplates:function(e={},t){return"RECEIVE_DEFAULT_TEMPLATE"===t.type?{...e,[JSON.stringify(t.query)]:t.templateId}:e}});var Me={};function Ve(e){return[e]}function Ge(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 qe(e,t){var n,r=t||Ve;function s(){n=new WeakMap}function i(){var t,s,i,o,a,c=arguments.length;for(o=new Array(c),i=0;i<c;i++)o[i]=arguments[i];for(t=function(e){var t,r,s,i,o,a=n,c=!0;for(t=0;t<e.length;t++){if(!(o=r=e[t])||"object"!=typeof o){c=!1;break}a.has(r)?a=a.get(r):(s=new WeakMap,a.set(r,s),a=s)}return a.has(Me)||((i=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=c,a.set(Me,i)),a.get(Me)}(a=r.apply(null,o)),t.isUniqueByDependants||(t.lastDependants&&!Ge(a,t.lastDependants,0)&&t.clear(),t.lastDependants=a),s=t.head;s;){if(Ge(s.args,o,1))return s!==t.head&&(s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=t.head,s.prev=null,t.head.prev=s,t.head=s),s.val;s=s.next}return s={val:e.apply(null,o)},o[0]=null,s.args=o,t.head&&(t.head.prev=s,s.next=t.head),t.head=s,s.val}return i.getDependants=r,i.clear=s,s(),i}var Be=n(3249),Fe=n.n(Be);const $e=new WeakMap;const Ke=qe(((e,t={})=>{let n=$e.get(e);if(n){const e=n.get(t);if(void 0!==e)return e}else n=new(Fe()),$e.set(e,n);const r=function(e,t){const{stableKey:n,page:r,perPage:s,include:i,fields:o,context:a}=Ae(t);let c;if(e.queries?.[a]?.[n]&&(c=e.queries[a][n].itemIds),!c)return null;const l=-1===s?0:(r-1)*s,u=-1===s?c.length:Math.min(l+s,c.length),d=[];for(let t=l;t<u;t++){const n=c[t];if(Array.isArray(i)&&!i.includes(n))continue;if(void 0===n)continue;if(!e.items[a]?.hasOwnProperty(n))return null;const r=e.items[a][n];let s;if(Array.isArray(o)){s={};for(let e=0;e<o.length;e++){const t=o[e].split(".");let n=r;t.forEach((e=>{n=n?.[e]})),N(s,t,n)}}else{if(!e.itemIsComplete[a]?.[n])return null;s=r}d.push(s)}return d}(e,t);return n.set(t,r),r}));function Qe(e,t={}){var n;const{stableKey:r,context:s}=Ae(t);return null!==(n=e.queries?.[s]?.[r]?.meta?.totalItems)&&void 0!==n?n:null}const Ye={},He=(0,o.createRegistrySelector)((e=>(t,n)=>e($).isResolving("getEmbedPreview",[n])));function ze(e,t){D()("select( 'core' ).getAuthors()",{since:"5.9",alternative:"select( 'core' ).getUsers({ who: 'authors' })"});const n=(0,L.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",t);return Je(e,n)}function We(e){return e.currentUser}const Je=qe(((e,t)=>{var n;return(null!==(n=e.users.queries[t])&&void 0!==n?n:[]).map((t=>e.users.byId[t]))}),((e,t)=>[e.users.queries[t],e.users.byId]));function Ze(e,t){return D()("wp.data.select( 'core' ).getEntitiesByKind()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntitiesConfig()"}),Xe(e,t)}const Xe=qe(((e,t)=>e.entities.config.filter((e=>e.kind===t))),((e,t)=>e.entities.config));function et(e,t,n){return D()("wp.data.select( 'core' ).getEntity()",{since:"6.0",alternative:"wp.data.select( 'core' ).getEntityConfig()"}),tt(e,t,n)}function tt(e,t,n){return e.entities.config?.find((e=>e.kind===t&&e.name===n))}const nt=qe(((e,t,n,r,s)=>{var i;const o=e.entities.records?.[t]?.[n]?.queriedData;if(!o)return;const a=null!==(i=s?.context)&&void 0!==i?i:"default";if(void 0===s){if(!o.itemIsComplete[a]?.[r])return;return o.items[a][r]}const c=o.items[a]?.[r];if(c&&s._fields){var l;const e={},t=null!==(l=ke(s._fields))&&void 0!==l?l:[];for(let n=0;n<t.length;n++){const r=t[n].split(".");let s=c;r.forEach((e=>{s=s?.[e]})),N(e,r,s)}return e}return c}),((e,t,n,r,s)=>{var i;const o=null!==(i=s?.context)&&void 0!==i?i:"default";return[e.entities.records?.[t]?.[n]?.queriedData?.items[o]?.[r],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[o]?.[r]]}));function rt(e,t,n,r){return nt(e,t,n,r)}nt.__unstableNormalizeArgs=e=>{const t=[...e],n=t?.[2];return t[2]=/^\s*\d+\s*$/.test(n)?Number(n):n,t};const st=qe(((e,t,n,r)=>{const s=nt(e,t,n,r);return s&&Object.keys(s).reduce(((r,i)=>{var o;(function(e,t){return(e.rawAttributes||[]).includes(t)})(tt(e,t,n),i)?r[i]=null!==(o=s[i]?.raw)&&void 0!==o?o:s[i]:r[i]=s[i];return r}),{})}),((e,t,n,r,s)=>{var i;const o=null!==(i=s?.context)&&void 0!==i?i:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData?.items[o]?.[r],e.entities.records?.[t]?.[n]?.queriedData?.itemIsComplete[o]?.[r]]}));function it(e,t,n,r){return Array.isArray(ot(e,t,n,r))}const ot=(e,t,n,r)=>{const s=e.entities.records?.[t]?.[n]?.queriedData;return s?Ke(s,r):null},at=(e,t,n,r)=>{const s=e.entities.records?.[t]?.[n]?.queriedData;return s?Qe(s,r):null},ct=(e,t,n,r)=>{const s=e.entities.records?.[t]?.[n]?.queriedData;if(!s)return null;if(-1===r.per_page)return 1;const i=Qe(s,r);return i?Math.ceil(i/r.per_page):i},lt=qe((e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach((r=>{Object.keys(t[r]).forEach((s=>{const i=Object.keys(t[r][s].edits).filter((t=>nt(e,r,s,t)&&ft(e,r,s,t)));if(i.length){const t=tt(e,r,s);i.forEach((i=>{const o=yt(e,r,s,i);n.push({key:o?o[t.key||he]:void 0,title:t?.getTitle?.(o)||"",name:s,kind:r})}))}}))})),n}),(e=>[e.entities.records])),ut=qe((e=>{const{entities:{records:t}}=e,n=[];return Object.keys(t).forEach((r=>{Object.keys(t[r]).forEach((s=>{const i=Object.keys(t[r][s].saving).filter((t=>mt(e,r,s,t)));if(i.length){const t=tt(e,r,s);i.forEach((i=>{const o=yt(e,r,s,i);n.push({key:o?o[t.key||he]:void 0,title:t?.getTitle?.(o)||"",name:s,kind:r})}))}}))})),n}),(e=>[e.entities.records]));function dt(e,t,n,r){return e.entities.records?.[t]?.[n]?.edits?.[r]}const pt=qe(((e,t,n,r)=>{const{transientEdits:s}=tt(e,t,n)||{},i=dt(e,t,n,r)||{};return s?Object.keys(i).reduce(((e,t)=>(s[t]||(e[t]=i[t]),e)),{}):i}),((e,t,n,r)=>[e.entities.config,e.entities.records?.[t]?.[n]?.edits?.[r]]));function ft(e,t,n,r){return mt(e,t,n,r)||Object.keys(pt(e,t,n,r)).length>0}const yt=qe(((e,t,n,r)=>({...st(e,t,n,r),...dt(e,t,n,r)})),((e,t,n,r,s)=>{var i;const o=null!==(i=s?.context)&&void 0!==i?i:"default";return[e.entities.config,e.entities.records?.[t]?.[n]?.queriedData.items[o]?.[r],e.entities.records?.[t]?.[n]?.queriedData.itemIsComplete[o]?.[r],e.entities.records?.[t]?.[n]?.edits?.[r]]}));function Et(e,t,n,r){var s;const{pending:i,isAutosave:o}=null!==(s=e.entities.records?.[t]?.[n]?.saving?.[r])&&void 0!==s?s:{};return Boolean(i&&o)}function mt(e,t,n,r){var s;return null!==(s=e.entities.records?.[t]?.[n]?.saving?.[r]?.pending)&&void 0!==s&&s}function ht(e,t,n,r){var s;return null!==(s=e.entities.records?.[t]?.[n]?.deleting?.[r]?.pending)&&void 0!==s&&s}function gt(e,t,n,r){return e.entities.records?.[t]?.[n]?.saving?.[r]?.error}function vt(e,t,n,r){return e.entities.records?.[t]?.[n]?.deleting?.[r]?.error}function _t(e){D()("select( 'core' ).getUndoEdit()",{since:"6.3"})}function Rt(e){D()("select( 'core' ).getRedoEdit()",{since:"6.3"})}function bt(e){return e.undoManager.hasUndo()}function wt(e){return e.undoManager.hasRedo()}function Tt(e){return e.currentTheme?nt(e,"root","theme",e.currentTheme):null}function It(e){return e.currentGlobalStylesId}function St(e){var t;return null!==(t=Tt(e)?.theme_supports)&&void 0!==t?t:Ye}function kt(e,t){return e.embedPreviews[t]}function Ot(e,t){const n=e.embedPreviews[t],r='<a href="'+t+'">'+t+"</a>";return!!n&&n.html===r}function At(e,t,n,r){const s=[t,n,r].filter(Boolean).join("/");return e.userPermissions[s]}function Ct(e,t,n,r){const s=tt(e,t,n);if(!s)return!1;return At(e,"update",s.__unstable_rest_base,r)}function xt(e,t,n){return e.autosaves[n]}function Ut(e,t,n,r){if(void 0===r)return;const s=e.autosaves[n];return s?.find((e=>e.author===r))}const Pt=(0,o.createRegistrySelector)((e=>(t,n,r)=>e($).hasFinishedResolution("getAutosaves",[n,r])));function Lt(e){return e.editsReference}function jt(e,t){const n=ot(e,"postType","wp_template",{"find-template":t});return n?.length?yt(e,"postType","wp_template",n[0].id):null}function Dt(e){const t=Tt(e);return t?e.themeBaseGlobalStyles[t.stylesheet]:null}function Nt(e){const t=Tt(e);return t?e.themeGlobalStyleVariations[t.stylesheet]:null}function Mt(e){return e.blockPatterns}function Vt(e){return e.blockPatternCategories}function Gt(e){return e.userPatternCategories}function qt(e){D()("select( 'core' ).getCurrentThemeGlobalStylesRevisions()",{since:"6.5.0",alternative:"select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )"});const t=It(e);return t?e.themeGlobalStyleRevisions[t]:null}function Bt(e,t){return e.defaultTemplates[JSON.stringify(t)]}const Ft=(e,t,n,r,s)=>{const i=e.entities.records?.[t]?.[n]?.revisions?.[r];return i?Ke(i,s):null},$t=qe(((e,t,n,r,s,i)=>{var o;const a=e.entities.records?.[t]?.[n]?.revisions?.[r];if(!a)return;const c=null!==(o=i?.context)&&void 0!==o?o:"default";if(void 0===i){if(!a.itemIsComplete[c]?.[s])return;return a.items[c][s]}const l=a.items[c]?.[s];if(l&&i._fields){var u;const e={},t=null!==(u=ke(i._fields))&&void 0!==u?u:[];for(let n=0;n<t.length;n++){const r=t[n].split(".");let s=l;r.forEach((e=>{s=s?.[e]})),N(e,r,s)}return e}return l}),((e,t,n,r,s,i)=>{var o;const a=null!==(o=i?.context)&&void 0!==o?o:"default";return[e.entities.records?.[t]?.[n]?.revisions?.[r]?.items?.[a]?.[s],e.entities.records?.[t]?.[n]?.revisions?.[r]?.itemIsComplete?.[a]?.[s]]}));function Kt(e){return e.undoManager}function Qt(e){return e.navigationFallbackId}const Yt=(0,o.createRegistrySelector)((e=>qe(((t,n)=>e($).getBlockPatterns().filter((({postTypes:e})=>!e||Array.isArray(e)&&e.includes(n)))),(()=>[e($).getBlockPatterns()]))));function Ht(e,t){return 0===t?e.toLowerCase():R(e,t)}function zt(e,t){return void 0===t&&(t={}),b(e,y({transform:Ht},t))}const Wt=window.wp.htmlEntities,Jt=e=>(...t)=>async({resolveSelect:n})=>{await n[e](...t)},Zt=async(e,t={},n={})=>{const{isInitialSuggestions:r=!1,initialSuggestionsSearchOptions:s}=t,{disablePostFormats:i=!1}=n;let{type:o,subtype:a,page:c,perPage:l=(r?3:20)}=t;const u=[];return r&&s&&(o=s.type||o,a=s.subtype||a,c=s.page||c,l=s.perPage||l),o&&"post"!==o||u.push(T()({path:(0,L.addQueryArgs)("/wp/v2/search",{search:e,page:c,per_page:l,type:"post",subtype:a})}).then((e=>e.map((e=>({...e,meta:{kind:"post-type",subtype:a}}))))).catch((()=>[]))),o&&"term"!==o||u.push(T()({path:(0,L.addQueryArgs)("/wp/v2/search",{search:e,page:c,per_page:l,type:"term",subtype:a})}).then((e=>e.map((e=>({...e,meta:{kind:"taxonomy",subtype:a}}))))).catch((()=>[]))),i||o&&"post-format"!==o||u.push(T()({path:(0,L.addQueryArgs)("/wp/v2/search",{search:e,page:c,per_page:l,type:"post-format",subtype:a})}).then((e=>e.map((e=>({...e,meta:{kind:"taxonomy",subtype:a}}))))).catch((()=>[]))),o&&"attachment"!==o||u.push(T()({path:(0,L.addQueryArgs)("/wp/v2/media",{search:e,page:c,per_page:l})}).then((e=>e.map((e=>({...e,meta:{kind:"media"}}))))).catch((()=>[]))),Promise.all(u).then((e=>e.reduce(((e,t)=>e.concat(t)),[]).filter((e=>!!e.id)).slice(0,l).map((e=>{const t="attachment"===e.type;return{id:e.id,url:t?e.source_url:e.url,title:(0,Wt.decodeEntities)(t?e.title.rendered:e.title||"")||(0,I.__)("(no title)"),type:e.subtype||e.type,kind:e?.meta?.kind}}))))},Xt=new Map,en=async(e,t={})=>{const n={url:(0,L.prependHTTP)(e)};if(!(0,L.isURL)(e))return Promise.reject(`${e} is not a valid URL.`);const r=(0,L.getProtocol)(e);return r&&(0,L.isValidProtocol)(r)&&r.startsWith("http")&&/^https?:\/\/[^\/\s]/i.test(e)?Xt.has(e)?Xt.get(e):T()({path:(0,L.addQueryArgs)("/wp-block-editor/v1/url-details",n),...t}).then((t=>(Xt.set(e,t),t))):Promise.reject(`${e} does not have a valid protocol. URLs must be "http" based`)};async function tn(){const e=await T()({path:"/wp/v2/block-patterns/patterns"});return e?e.map((e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[zt(e),t]))))):[]}const nn=e=>async({dispatch:t})=>{const n=(0,L.addQueryArgs)("/wp/v2/users/?who=authors&per_page=100",e),r=await T()({path:n});t.receiveUserQuery(n,r)},rn=()=>async({dispatch:e})=>{const t=await T()({path:"/wp/v2/users/me"});e.receiveCurrentUser(t)},sn=(e,t,n="",r)=>async({select:s,dispatch:i})=>{const o=(await i(Se(e))).find((n=>n.name===t&&n.kind===e));if(!o||o?.__experimentalNoFetch)return;const a=await i.__unstableAcquireStoreLock($,["entities","records",e,t,n],{exclusive:!1});try{if(window.__experimentalEnableSync&&o.syncConfig&&!r)0;else{void 0!==r&&r._fields&&(r={...r,_fields:[...new Set([...ke(r._fields)||[],o.key||he])].join()});const a=(0,L.addQueryArgs)(o.baseURL+(n?"/"+n:""),{...o.baseURLParams,...r});if(void 0!==r){r={...r,include:[n]};if(s.hasEntityRecords(e,t,r))return}const c=await T()({path:a});i.receiveEntityRecords(e,t,c,r)}}finally{i.__unstableReleaseStoreLock(a)}},on=Jt("getEntityRecord"),an=Jt("getEntityRecord"),cn=(e,t,n={})=>async({dispatch:r})=>{const s=(await r(Se(e))).find((n=>n.name===t&&n.kind===e));if(!s||s?.__experimentalNoFetch)return;const i=await r.__unstableAcquireStoreLock($,["entities","records",e,t],{exclusive:!1});try{n._fields&&(n={...n,_fields:[...new Set([...ke(n._fields)||[],s.key||he])].join()});const i=(0,L.addQueryArgs)(s.baseURL,{...s.baseURLParams,...n});let o,a;if(s.supportsPagination&&-1!==n.per_page){const e=await T()({path:i,parse:!1});o=Object.values(await e.json()),a={totalItems:parseInt(e.headers.get("X-WP-Total"))}}else o=Object.values(await T()({path:i}));if(n._fields&&(o=o.map((e=>(n._fields.split(",").forEach((t=>{e.hasOwnProperty(t)||(e[t]=void 0)})),e)))),r.receiveEntityRecords(e,t,o,n,!1,void 0,a),!n?._fields&&!n.context){const n=s.key||he,i=o.filter((e=>e[n])).map((r=>[e,t,r[n]]));r({type:"START_RESOLUTIONS",selectorName:"getEntityRecord",args:i}),r({type:"FINISH_RESOLUTIONS",selectorName:"getEntityRecord",args:i})}}finally{r.__unstableReleaseStoreLock(i)}};cn.shouldInvalidate=(e,t,n)=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&t===e.kind&&n===e.name;const ln=()=>async({dispatch:e,resolveSelect:t})=>{const n=await t.getEntityRecords("root","theme",{status:"active"});e.receiveCurrentTheme(n[0])},un=Jt("getCurrentTheme"),dn=e=>async({dispatch:t})=>{try{const n=await T()({path:(0,L.addQueryArgs)("/oembed/1.0/proxy",{url:e})});t.receiveEmbedPreview(e,n)}catch(n){t.receiveEmbedPreview(e,!1)}},pn=(e,t,n)=>async({dispatch:r,registry:s})=>{const{hasStartedResolution:i}=s.select($),o=n?`${t}/${n}`:t,a=["create","read","update","delete"];if(!a.includes(e))throw new Error(`'${e}' is not a valid action.`);for(const r of a){if(r===e)continue;if(i("canUser",[r,t,n]))return}let c;try{c=await T()({path:`/wp/v2/${o}`,method:"OPTIONS",parse:!1})}catch(e){return}const l=c.headers?.get("allow"),u=l?.allow||l||"",d={},p={create:"POST",read:"GET",update:"PUT",delete:"DELETE"};for(const[e,t]of Object.entries(p))d[e]=u.includes(t);for(const e of a)r.receiveUserPermission(`${e}/${o}`,d[e])},fn=(e,t,n)=>async({dispatch:r})=>{const s=(await r(Se(e))).find((n=>n.name===t&&n.kind===e));if(!s)return;const i=s.__unstable_rest_base;await r(pn("update",i,n))},yn=(e,t)=>async({dispatch:n,resolveSelect:r})=>{const{rest_base:s,rest_namespace:i="wp/v2"}=await r.getPostType(e),o=await T()({path:`/${i}/${s}/${t}/autosaves?context=edit`});o&&o.length&&n.receiveAutosaves(t,o)},En=(e,t)=>async({resolveSelect:n})=>{await n.getAutosaves(e,t)},mn=e=>async({dispatch:t,resolveSelect:n})=>{let r;try{r=await T()({url:(0,L.addQueryArgs)(e,{"_wp-find-template":!0})}).then((({data:e})=>e))}catch(e){}if(!r)return;const s=await n.getEntityRecord("postType","wp_template",r.id);s&&t.receiveEntityRecords("postType","wp_template",[s],{"find-template":e})};mn.shouldInvalidate=e=>("RECEIVE_ITEMS"===e.type||"REMOVE_ITEMS"===e.type)&&e.invalidateCache&&"postType"===e.kind&&"wp_template"===e.name;const hn=()=>async({dispatch:e,resolveSelect:t})=>{const n=await t.getEntityRecords("root","theme",{status:"active"}),r=n?.[0]?._links?.["wp:user-global-styles"]?.[0]?.href;if(r){const t=await T()({url:r});e.__experimentalReceiveCurrentGlobalStylesId(t.id)}},gn=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),r=await T()({path:`/wp/v2/global-styles/themes/${n.stylesheet}`});t.__experimentalReceiveThemeBaseGlobalStyles(n.stylesheet,r)},vn=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.getCurrentTheme(),r=await T()({path:`/wp/v2/global-styles/themes/${n.stylesheet}/variations`});t.__experimentalReceiveThemeGlobalStyleVariations(n.stylesheet,r)},_n=()=>async({resolveSelect:e,dispatch:t})=>{const n=await e.__experimentalGetCurrentGlobalStylesId(),r=n?await e.getEntityRecord("root","globalStyles",n):void 0,s=r?._links?.["version-history"]?.[0]?.href;if(s){const e=await T()({url:s}),r=e?.map((e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[zt(e),t])))));t.receiveThemeGlobalStyleRevisions(n,r)}};_n.shouldInvalidate=e=>"SAVE_ENTITY_RECORD_FINISH"===e.type&&"root"===e.kind&&!e.error&&"globalStyles"===e.name;const Rn=()=>async({dispatch:e})=>{e({type:"RECEIVE_BLOCK_PATTERNS",patterns:await tn()})},bn=()=>async({dispatch:e})=>{e({type:"RECEIVE_BLOCK_PATTERN_CATEGORIES",categories:await T()({path:"/wp/v2/block-patterns/categories"})})},wn=()=>async({dispatch:e,resolveSelect:t})=>{const n=await t.getEntityRecords("taxonomy","wp_pattern_category",{per_page:-1,_fields:"id,name,description,slug",context:"view"});e({type:"RECEIVE_USER_PATTERN_CATEGORIES",patternCategories:n?.map((e=>({...e,label:(0,Wt.decodeEntities)(e.name),name:e.slug})))||[]})},Tn=()=>async({dispatch:e,select:t})=>{const n=await T()({path:(0,L.addQueryArgs)("/wp-block-editor/v1/navigation-fallback",{_embed:!0})}),r=n?._embedded?.self;if(e.receiveNavigationFallbackId(n?.id),r){const s=!t.getEntityRecord("postType","wp_navigation",n.id);e.receiveEntityRecords("postType","wp_navigation",r,void 0,s),e.finishResolution("getEntityRecord",["postType","wp_navigation",n.id])}},In=e=>async({dispatch:t})=>{const n=await T()({path:(0,L.addQueryArgs)("/wp/v2/templates/lookup",e)});n&&t.receiveDefaultTemplateId(e,n.id)},Sn=(e,t,n,r={})=>async({dispatch:s})=>{const i=(await s(Se(e))).find((n=>n.name===t&&n.kind===e));if(!i||i?.__experimentalNoFetch)return;r._fields&&(r={...r,_fields:[...new Set([...ke(r._fields)||[],i.revisionKey||he])].join()});const o=(0,L.addQueryArgs)(i.getRevisionsUrl(n),r);let a,c;const l={},u=i.supportsPagination&&-1!==r.per_page;try{c=await T()({path:o,parse:!u})}catch(e){return}if(c&&(u?(a=Object.values(await c.json()),l.totalItems=parseInt(c.headers.get("X-WP-Total"))):a=Object.values(c),r._fields&&(a=a.map((e=>(r._fields.split(",").forEach((t=>{e.hasOwnProperty(t)||(e[t]=void 0)})),e)))),s.receiveRevisions(e,t,n,a,r,!1,l),!r?._fields&&!r.context)){const r=i.key||he,o=a.filter((e=>e[r])).map((s=>[e,t,n,s[r]]));s({type:"START_RESOLUTIONS",selectorName:"getRevision",args:o}),s({type:"FINISH_RESOLUTIONS",selectorName:"getRevision",args:o})}};Sn.shouldInvalidate=(e,t,n,r)=>"SAVE_ENTITY_RECORD_FINISH"===e.type&&n===e.name&&t===e.kind&&!e.error&&r===e.recordId;const kn=(e,t,n,r,s)=>async({dispatch:i})=>{const o=(await i(Se(e))).find((n=>n.name===t&&n.kind===e));if(!o||o?.__experimentalNoFetch)return;void 0!==s&&s._fields&&(s={...s,_fields:[...new Set([...ke(s._fields)||[],o.revisionKey||he])].join()});const a=(0,L.addQueryArgs)(o.getRevisionsUrl(n,r),s);let c;try{c=await T()({path:a})}catch(e){return}c&&i.receiveRevisions(e,t,n,c,s)};function On(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 An(e,t){let n=e;for(const e of t){const t=n.children[e];if(!t)return null;n=t}return n}function Cn({exclusive:e},t){return!(!e||!t.length)||!(e||!t.filter((e=>e.exclusive)).length)}const xn={requests:[],tree:{locks:[],children:{}}};function Un(e=xn,t){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:s,path:i}=r,o=[s,...i],a=On(e.tree,o),c=An(a,o);return c.locks=[...c.locks,n],{...e,requests:e.requests.filter((e=>e!==r)),tree:a}}case"RELEASE_LOCK":{const{lock:n}=t,r=[n.store,...n.path],s=On(e.tree,r),i=An(s,r);return i.locks=i.locks.filter((e=>e!==n)),{...e,tree:s}}}return e}function Pn(e,t,n,{exclusive:r}){const s=[t,...n],i=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}}(i,s))if(Cn({exclusive:r},e.locks))return!1;const o=An(i,s);if(!o)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))}}(o))if(Cn({exclusive:r},e.locks))return!1;return!0}function Ln(){let e=Un(void 0,{type:"@@INIT"});function t(){for(const t of function(e){return e.requests}(e)){const{store:n,path:r,exclusive:s,notifyAcquired:i}=t;if(Pn(e,n,r,{exclusive:s})){const o={store:n,path:r,exclusive:s};e=Un(e,{type:"GRANT_LOCK_REQUEST",lock:o,request:t}),i(o)}}}return{acquire:function(n,r,s){return new Promise((i=>{e=Un(e,{type:"ENQUEUE_LOCK_REQUEST",request:{store:n,path:r,exclusive:s,notifyAcquired:i}}),t()}))},release:function(n){e=Un(e,{type:"RELEASE_LOCK",lock:n}),t()}}}function jn(){const e=Ln();return{__unstableAcquireStoreLock:function(t,n,{exclusive:r}){return()=>e.acquire(t,n,r)},__unstableReleaseStoreLock:function(t){return()=>e.release(t)}}}const Dn=window.wp.privateApis,{lock:Nn,unlock:Mn}=(0,Dn.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/core-data"),Vn=window.React,Gn=window.wp.element,qn=window.wp.blocks,Bn=window.wp.blockEditor;let Fn;const $n=new WeakMap;const Kn=new WeakMap;function Qn(e){if(!Kn.has(e)){const t=[];for(const n of function(e){if(Fn||(Fn=Mn(Bn.privateApis)),!$n.has(e)){const t=Fn.getRichTextValues([e]);$n.set(e,t)}return $n.get(e)}(e))n&&n.replacements.forEach((({type:e,attributes:n})=>{"core/footnote"===e&&t.push(n["data-fn"])}));Kn.set(e,t)}return Kn.get(e)}let Yn={};function Hn(e,t){const n={blocks:e};if(!t)return n;if(void 0===t.footnotes)return n;const r=function(e){return e.flatMap(Qn)}(e),s=t.footnotes?JSON.parse(t.footnotes):[];if(s.map((e=>e.id)).join("")===r.join(""))return n;const i=r.map((e=>s.find((t=>t.id===e))||Yn[e]||{id:e,content:""}));function o(e){if(!e||Array.isArray(e)||"object"!=typeof e)return e;e={...e};for(const t in e){const n=e[t];if(Array.isArray(n)){e[t]=n.map(o);continue}if("string"!=typeof n&&!(n instanceof S.RichTextData))continue;const s="string"==typeof n?S.RichTextData.fromHTMLString(n):new S.RichTextData(n);s.replacements.forEach((e=>{if("core/footnote"===e.type){const t=e.attributes["data-fn"],n=r.indexOf(t),s=(0,S.create)({html:e.innerHTML});s.text=String(n+1),s.formats=Array.from({length:s.text.length},(()=>s.formats[0])),s.replacements=Array.from({length:s.text.length},(()=>s.replacements[0])),e.innerHTML=(0,S.toHTMLString)({value:s})}})),e[t]="string"==typeof n?s.toHTMLString():s}return e}const a=function e(t){return t.map((t=>({...t,attributes:o(t.attributes),innerBlocks:e(t.innerBlocks)})))}(e);return Yn={...Yn,...s.reduce(((e,t)=>(r.includes(t.id)||(e[t.id]=t),e)),{})},{meta:{...t,footnotes:JSON.stringify(i)},blocks:a}}const zn=[],Wn={...ve.reduce(((e,t)=>(e[t.kind]||(e[t.kind]={}),e[t.kind][t.name]={context:(0,Gn.createContext)(void 0)},e)),{}),..._e.reduce(((e,t)=>(e[t.kind]={},e)),{})},Jn=(e,t)=>{if(!Wn[e])throw new Error(`Missing entity config for kind: ${e}.`);return Wn[e][t]||(Wn[e][t]={context:(0,Gn.createContext)(void 0)}),Wn[e][t].context};function Zn({kind:e,type:t,id:n,children:r}){const s=Jn(e,t).Provider;return(0,Vn.createElement)(s,{value:n},r)}function Xn(e,t){return(0,Gn.useContext)(Jn(e,t))}function er(e,t,n,r){const s=Xn(e,t),i=null!=r?r:s,{value:a,fullValue:c}=(0,o.useSelect)((r=>{const{getEntityRecord:s,getEditedEntityRecord:o}=r($),a=s(e,t,i),c=o(e,t,i);return a&&c?{value:c[n],fullValue:a[n]}:{}}),[e,t,i,n]),{editEntityRecord:l}=(0,o.useDispatch)($);return[a,(0,Gn.useCallback)((r=>{l(e,t,i,{[n]:r})}),[l,e,t,i,n]),c]}const tr=new WeakMap;function nr(e,t,{id:n}={}){const r=Xn(e,t),s=null!=n?n:r,{getEntityRecord:i,getEntityRecordEdits:a}=(0,o.useSelect)($),{content:c,editedBlocks:l,meta:u}=(0,o.useSelect)((n=>{if(!s)return{};const{getEditedEntityRecord:r}=n($),i=r(e,t,s);return{editedBlocks:i.blocks,content:i.content,meta:i.meta}}),[e,t,s]),{__unstableCreateUndoLevel:d,editEntityRecord:p}=(0,o.useDispatch)($),f=(0,Gn.useMemo)((()=>{if(!s)return;if(l)return l;if(!c||"string"!=typeof c)return zn;const n=a(e,t,s),r=!n||!Object.keys(n).length?i(e,t,s):n;let o=tr.get(r);return o||(o=(0,qn.parse)(c),tr.set(r,o)),o}),[e,t,s,l,c,i,a]),y=(0,Gn.useCallback)((e=>Hn(e,u)),[u]),E=(0,Gn.useCallback)(((n,r)=>{if(f===n)return d(e,t,s);const{selection:i,...o}=r,a={selection:i,content:({blocks:e=[]})=>(0,qn.__unstableSerializeAndClean)(e),...y(n)};p(e,t,s,a,{isCached:!1,...o})}),[e,t,s,f,y,d,p]),m=(0,Gn.useCallback)(((n,r)=>{const{selection:i,...o}=r,a={selection:i,...y(n)};p(e,t,s,a,{isCached:!0,...o})}),[e,t,s,y,p]);return[f,m,E]}const rr=function(e,t){var n,r,s=0;function i(){var i,o,a=n,c=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(o=0;o<c;o++)if(a.args[o]!==arguments[o]){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(i=new Array(c),o=0;o<c;o++)i[o]=arguments[o];return a={args:i,val:e.apply(null,i)},n?(n.prev=a,a.next=n):r=a,s===t.maxSize?(r=r.prev).next=null:s++,n=a,a.val}return t=t||{},i.clear=function(){n=null,r=null,s=0},i};let sr=function(e){return e.Idle="IDLE",e.Resolving="RESOLVING",e.Error="ERROR",e.Success="SUCCESS",e}({});const ir=["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"];function or(e,t){return(0,o.useSelect)(((t,n)=>e((e=>ar(t(e))),n)),t)}const ar=rr((e=>{const t={};for(const n in e)ir.includes(n)||Object.defineProperty(t,n,{get:()=>(...t)=>{const{getIsResolving:r,hasFinishedResolution:s}=e,i=!!r(n,t),o=!i&&s(n,t),a=e[n](...t);let c;return c=i?sr.Resolving:o?a?sr.Success:sr.Error:sr.Idle,{data:a,status:c,isResolving:i,hasResolved:o}}});return t})),cr={};function lr(e,t,n,r={enabled:!0}){const{editEntityRecord:s,saveEditedEntityRecord:i}=(0,o.useDispatch)(vr),a=(0,Gn.useMemo)((()=>({edit:(r,i={})=>s(e,t,n,r,i),save:(r={})=>i(e,t,n,{throwOnError:!0,...r})})),[s,e,t,n,i]),{editedRecord:c,hasEdits:l,edits:u}=(0,o.useSelect)((s=>r.enabled?{editedRecord:s(vr).getEditedEntityRecord(e,t,n),hasEdits:s(vr).hasEditsForEntityRecord(e,t,n),edits:s(vr).getEntityRecordNonTransientEdits(e,t,n)}:{editedRecord:cr,hasEdits:!1,edits:cr}),[e,t,n,r.enabled]),{data:d,...p}=or((s=>r.enabled?s(vr).getEntityRecord(e,t,n):{data:null}),[e,t,n,r.enabled]);return{record:d,editedRecord:c,hasEdits:l,edits:u,...p,...a}}function ur(e,t,n,r){return D()("wp.data.__experimentalUseEntityRecord",{alternative:"wp.data.useEntityRecord",since:"6.1"}),lr(e,t,n,r)}const dr=[];function pr(e,t,n={},r={enabled:!0}){const s=(0,L.addQueryArgs)("",n),{data:i,...a}=or((s=>r.enabled?s(vr).getEntityRecords(e,t,n):{data:dr}),[e,t,s,r.enabled]),{totalItems:c,totalPages:l}=(0,o.useSelect)((s=>r.enabled?{totalItems:s(vr).getEntityRecordsTotalItems(e,t,n),totalPages:s(vr).getEntityRecordsTotalPages(e,t,n)}:{totalItems:null,totalPages:null}),[e,t,s,r.enabled]);return{records:i,totalItems:c,totalPages:l,...a}}function fr(e,t,n,r){return D()("wp.data.__experimentalUseEntityRecords",{alternative:"wp.data.useEntityRecords",since:"6.1"}),pr(e,t,n,r)}function yr(e,t){return or((n=>{const{canUser:r}=n(vr),s=r("create",e);if(!t){const t=r("read",e),n=s.isResolving||t.isResolving,i=s.hasResolved&&t.hasResolved;let o=sr.Idle;return n?o=sr.Resolving:i&&(o=sr.Success),{status:o,isResolving:n,hasResolved:i,canCreate:s.hasResolved&&s.data,canRead:t.hasResolved&&t.data}}const i=r("read",e,t),o=r("update",e,t),a=r("delete",e,t),c=i.isResolving||s.isResolving||o.isResolving||a.isResolving,l=i.hasResolved&&s.hasResolved&&o.hasResolved&&a.hasResolved;let u=sr.Idle;return c?u=sr.Resolving:l&&(u=sr.Success),{status:u,isResolving:c,hasResolved:l,canRead:l&&i.data,canCreate:l&&s.data,canUpdate:l&&o.data,canDelete:l&&a.data}}),[e,t])}function Er(e,t){return D()("wp.data.__experimentalUseResourcePermissions",{alternative:"wp.data.useResourcePermissions",since:"6.1"}),yr(e,t)}const mr=ve.reduce(((e,t)=>{const{kind:n,name:r}=t;return e[Ie(n,r)]=(e,t,s)=>nt(e,n,r,t,s),e[Ie(n,r,"get",!0)]=(e,t)=>ot(e,n,r,t),e}),{}),hr=ve.reduce(((e,t)=>{const{kind:n,name:r}=t;e[Ie(n,r)]=(e,t)=>sn(n,r,e,t);const s=Ie(n,r,"get",!0);return e[s]=(...e)=>cn(n,r,...e),e[s].shouldInvalidate=e=>cn.shouldInvalidate(e,n,r),e}),{}),gr=ve.reduce(((e,t)=>{const{kind:n,name:r}=t;return e[Ie(n,r,"save")]=(e,t)=>ae(n,r,e,t),e[Ie(n,r,"delete")]=(e,t,s)=>ne(n,r,e,t,s),e}),{}),vr=(0,o.createReduxStore)($,{reducer:Ne,actions:{...e,...gr,...jn()},selectors:{...t,...mr},resolvers:{...i,...hr}});Mn(vr).registerPrivateSelectors(s),(0,o.register)(vr)})(),(window.wp=window.wp||{}).coreData=r})();