golden hour
/home/doctorbruno/public_html/corporate-astrology.guru/wp-includes/js/dist
⬆️ Go Up
Upload
File/Folder
Size
Actions
a11y.js
5.56 KB
Del
OK
a11y.min.js
2.55 KB
Del
OK
annotations.js
15.58 KB
Del
OK
annotations.min.js
5.84 KB
Del
OK
api-fetch.js
19.53 KB
Del
OK
api-fetch.min.js
7.33 KB
Del
OK
autop.js
9.78 KB
Del
OK
autop.min.js
5.56 KB
Del
OK
base-styles.js
115 B
Del
OK
base-styles.min.js
142 B
Del
OK
blob.js
2.35 KB
Del
OK
blob.min.js
1.21 KB
Del
OK
block-directory.js
372.69 KB
Del
OK
block-directory.min.js
126.54 KB
Del
OK
block-editor.js
3.6 MB
Del
OK
block-editor.min.js
1.35 MB
Del
OK
block-library.js
2.89 MB
Del
OK
block-library.min.js
1.24 MB
Del
OK
block-serialization-default-parser.js
6.64 KB
Del
OK
block-serialization-default-parser.min.js
2.5 KB
Del
OK
block-serialization-spec-parser.js
50.58 KB
Del
OK
block-serialization-spec-parser.min.js
10.48 KB
Del
OK
blocks.js
292.88 KB
Del
OK
blocks.min.js
142.99 KB
Del
OK
commands.js
128.65 KB
Del
OK
commands.min.js
55.89 KB
Del
OK
components.js
3.64 MB
Del
OK
components.min.js
817.08 KB
Del
OK
compose.js
83.74 KB
Del
OK
compose.min.js
29.39 KB
Del
OK
core-commands.js
29.11 KB
Del
OK
core-commands.min.js
12.2 KB
Del
OK
core-data.js
660 KB
Del
OK
core-data.min.js
226.52 KB
Del
OK
customize-widgets.js
111.55 KB
Del
OK
customize-widgets.min.js
43.42 KB
Del
OK
data-controls.js
4.2 KB
Del
OK
data-controls.min.js
1.84 KB
Del
OK
data.js
83.69 KB
Del
OK
data.min.js
26.04 KB
Del
OK
date.js
176.69 KB
Del
OK
date.min.js
141.35 KB
Del
OK
deprecated.js
3.11 KB
Del
OK
deprecated.min.js
1.35 KB
Del
OK
development
-
Del
OK
dom-ready.js
1.53 KB
Del
OK
dom-ready.min.js
881 B
Del
OK
dom.js
35.12 KB
Del
OK
dom.min.js
12.86 KB
Del
OK
edit-post.js
441.28 KB
Del
OK
edit-post.min.js
156.59 KB
Del
OK
edit-site.js
2.2 MB
Del
OK
edit-site.min.js
884.08 KB
Del
OK
edit-widgets.js
180.29 KB
Del
OK
edit-widgets.min.js
68.81 KB
Del
OK
editor.js
3.79 MB
Del
OK
editor.min.js
1.5 MB
Del
OK
element.js
27.32 KB
Del
OK
element.min.js
12.18 KB
Del
OK
escape-html.js
2.36 KB
Del
OK
escape-html.min.js
1.13 KB
Del
OK
format-library.js
229.45 KB
Del
OK
format-library.min.js
96.19 KB
Del
OK
hooks.js
12.01 KB
Del
OK
hooks.min.js
4.99 KB
Del
OK
html-entities.js
1.71 KB
Del
OK
html-entities.min.js
950 B
Del
OK
i18n.js
15.36 KB
Del
OK
i18n.min.js
5.66 KB
Del
OK
is-shallow-equal.js
2.77 KB
Del
OK
is-shallow-equal.min.js
1.17 KB
Del
OK
keyboard-shortcuts.js
10.26 KB
Del
OK
keyboard-shortcuts.min.js
3.6 KB
Del
OK
keycodes.js
8.36 KB
Del
OK
keycodes.min.js
2.97 KB
Del
OK
list-reusable-blocks.js
13.34 KB
Del
OK
list-reusable-blocks.min.js
5.41 KB
Del
OK
media-utils.js
1.02 MB
Del
OK
media-utils.min.js
381.85 KB
Del
OK
notices.js
9.55 KB
Del
OK
notices.min.js
3.85 KB
Del
OK
nux.js
4.32 KB
Del
OK
nux.min.js
1.71 KB
Del
OK
patterns.js
88.07 KB
Del
OK
patterns.min.js
37.4 KB
Del
OK
plugins.js
20.72 KB
Del
OK
plugins.min.js
7.08 KB
Del
OK
preferences-persistence.js
17.3 KB
Del
OK
preferences-persistence.min.js
5.58 KB
Del
OK
preferences.js
21.03 KB
Del
OK
preferences.min.js
7.84 KB
Del
OK
primitives.js
5.15 KB
Del
OK
primitives.min.js
2.04 KB
Del
OK
priority-queue.js
10.1 KB
Del
OK
priority-queue.min.js
3.42 KB
Del
OK
private-apis.js
4.42 KB
Del
OK
private-apis.min.js
2.95 KB
Del
OK
react-i18n.js
3.97 KB
Del
OK
react-i18n.min.js
1.59 KB
Del
OK
redux-routine.js
24.75 KB
Del
OK
redux-routine.min.js
9.72 KB
Del
OK
reusable-blocks.js
21.87 KB
Del
OK
reusable-blocks.min.js
7.99 KB
Del
OK
rich-text.js
104.89 KB
Del
OK
rich-text.min.js
42.17 KB
Del
OK
router.js
36.21 KB
Del
OK
router.min.js
14.21 KB
Del
OK
script-modules
-
Del
OK
server-side-render.js
11.32 KB
Del
OK
server-side-render.min.js
4.1 KB
Del
OK
shortcode.js
8.02 KB
Del
OK
shortcode.min.js
3.35 KB
Del
OK
style-engine.js
18.37 KB
Del
OK
style-engine.min.js
6.78 KB
Del
OK
theme.js
135.48 KB
Del
OK
theme.min.js
59.71 KB
Del
OK
token-list.js
6.18 KB
Del
OK
token-list.min.js
1.68 KB
Del
OK
undo-manager.js
5.36 KB
Del
OK
undo-manager.min.js
1.77 KB
Del
OK
upload-media.js
116.33 KB
Del
OK
upload-media.min.js
49.3 KB
Del
OK
url.js
23.4 KB
Del
OK
url.min.js
10.18 KB
Del
OK
vendor
-
Del
OK
viewport.js
7.14 KB
Del
OK
viewport.min.js
2.32 KB
Del
OK
warning.js
1.58 KB
Del
OK
warning.min.js
816 B
Del
OK
widgets.js
50.14 KB
Del
OK
widgets.min.js
20.97 KB
Del
OK
wordcount.js
7 KB
Del
OK
wordcount.min.js
2.51 KB
Del
OK
Edit: patterns.min.js
/*! This file is auto-generated */ (function() { var wp;(wp||={}).patterns=(()=>{var _r=Object.create;var ke=Object.defineProperty;var vr=Object.getOwnPropertyDescriptor;var br=Object.getOwnPropertyNames;var wr=Object.getPrototypeOf,xr=Object.prototype.hasOwnProperty;var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Je=(e,t)=>{for(var a in t)ke(e,a,{get:t[a],enumerable:!0})},Rt=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of br(t))!xr.call(e,o)&&o!==a&&ke(e,o,{get:()=>t[o],enumerable:!(r=vr(t,o))||r.enumerable});return e};var s=(e,t,a)=>(a=e!=null?_r(wr(e)):{},Rt(t||!e||!e.__esModule?ke(a,"default",{value:e,enumerable:!0}):a,e)),Sr=e=>Rt(ke({},"__esModule",{value:!0}),e);var P=b((so,Tt)=>{Tt.exports=window.wp.data});var Ee=b((no,At)=>{At.exports=window.wp.blocks});var V=b((lo,Bt)=>{Bt.exports=window.wp.coreData});var W=b((fo,zt)=>{zt.exports=window.wp.blockEditor});var Ut=b((co,Dt)=>{Dt.exports=window.wp.privateApis});var I=b((bo,Vt)=>{Vt.exports=window.wp.components});var R=b((wo,Ft)=>{Ft.exports=window.wp.element});var N=b((xo,Ht)=>{Ht.exports=window.wp.i18n});var C=b((Co,qt)=>{qt.exports=window.ReactJSXRuntime});var de=b((Po,Qt)=>{Qt.exports=window.React});var ft=b((ls,Sa)=>{Sa.exports=window.wp.a11y});var ka=b((fs,Ca)=>{Ca.exports=window.wp.primitives});var Ra=b((ps,Ea)=>{Ea.exports=window.wp.compose});var me=b((_s,Na)=>{Na.exports=window.wp.notices});var Le=b((vs,Aa)=>{Aa.exports=window.wp.htmlEntities});var Ka=b((Ys,Qa)=>{Qa.exports=window.wp.url});var ro={};Je(ro,{privateApis:()=>hr,store:()=>O});var Ae=s(P(),1);var Pt=s(P(),1);function Cr(e={},t){return t?.type==="SET_EDITING_PATTERN"?{...e,[t.clientId]:t.isEditing}:e}var Nt=(0,Pt.combineReducers)({isEditingPattern:Cr});var Ze={};Je(Ze,{convertSyncedPatternToStatic:()=>Rr,createPattern:()=>kr,createPatternFromFile:()=>Er,setEditingPattern:()=>Tr});var Ne=s(Ee(),1),Mt=s(V(),1),Pe=s(W(),1);var ee={theme:"pattern",user:"wp_block"},Re="all-patterns",Ot="my-patterns",It=["core","pattern-directory/core","pattern-directory/featured"],w={full:"fully",unsynced:"unsynced"},Te="core/pattern-overrides";var kr=(e,t,a,r)=>async({registry:o})=>{let i=t===w.unsynced?{wp_pattern_sync_status:t}:void 0,l={title:e,content:a,status:"publish",meta:i,wp_pattern_category:r};return await o.dispatch(Mt.store).saveEntityRecord("postType","wp_block",l)},Er=(e,t)=>async({dispatch:a})=>{let r=await e.text(),o;try{o=JSON.parse(r)}catch{throw new Error("Invalid JSON file")}if(o.__file!=="wp_block"||!o.title||!o.content||typeof o.title!="string"||typeof o.content!="string"||o.syncStatus&&typeof o.syncStatus!="string")throw new Error("Invalid pattern JSON file");return await a.createPattern(o.title,o.syncStatus,o.content,t)},Rr=e=>({registry:t})=>{let a=t.select(Pe.store).getBlock(e),r=a.attributes?.content;function o(l){return l.map(n=>{let f=n.attributes.metadata;if(f&&(f={...f},delete f.id,delete f.bindings,r?.[f.name]))for(let[d,m]of Object.entries(r[f.name]))(0,Ne.getBlockType)(n.name)?.attributes[d]&&(n.attributes[d]=m);return(0,Ne.cloneBlock)(n,{metadata:f&&Object.keys(f).length>0?f:void 0},o(n.innerBlocks))})}let i=t.select(Pe.store).getBlocks(a.clientId);t.dispatch(Pe.store).replaceBlocks(a.clientId,o(i))};function Tr(e,t){return{type:"SET_EDITING_PATTERN",clientId:e,isEditing:t}}var Lt="core/patterns";var Xe={};Je(Xe,{isEditingPattern:()=>Pr});function Pr(e,t){return e.isEditingPattern[t]}var jt=s(Ut(),1),{lock:Yt,unlock:z}=(0,jt.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/patterns");var Nr={reducer:Nt},O=(0,Ae.createReduxStore)(Lt,{...Nr});(0,Ae.register)(O);z(O).registerPrivateActions(Ze);z(O).registerPrivateSelectors(Xe);var fe=s(W(),1),Gt=s(I(),1),Qe=s(P(),1),Wt=s(R(),1),$t=s(N(),1);function Be(e){return!!e.attributes.metadata?.name&&!!e.attributes.metadata?.bindings&&Object.values(e.attributes.metadata.bindings).some(t=>t.source==="core/pattern-overrides")}var Ke=s(C(),1),{BlockQuickNavigation:Ar}=z(fe.privateApis);function Jt(){let{allClientIds:e,supportedBlockTypesRaw:t}=(0,Qe.useSelect)(o=>({allClientIds:o(fe.store).getClientIdsWithDescendants(),supportedBlockTypesRaw:o(fe.store).getSettings()?.__experimentalBlockBindingsSupportedAttributes}),[]),{getBlock:a}=(0,Qe.useSelect)(fe.store),r=(0,Wt.useMemo)(()=>{let o=Object.keys(t??{});return e.filter(i=>{let l=a(i);return o.includes(l.name)&&Be(l)})},[e,a,t]);return r?.length?(0,Ke.jsx)(Gt.PanelBody,{title:(0,$t.__)("Overrides"),children:(0,Ke.jsx)(Ar,{clientIds:r})}):null}var F=s(I(),1);function Zt(e){var t,a,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(a=Zt(e[t]))&&(r&&(r+=" "),r+=a)}else for(a in e)e[a]&&(r&&(r+=" "),r+=a);return r}function Br(){for(var e,t,a=0,r="",o=arguments.length;a<o;a++)(e=arguments[a])&&(t=Zt(e))&&(r&&(r+=" "),r+=t);return r}var Xt=Br;var ea=s(de(),1),Kt={};function et(e,t){let a=ea.useRef(Kt);return a.current===Kt&&(a.current=e(t)),a}function zr(e,t){return function(r,...o){let i=new URL(e);return i.searchParams.set("code",r.toString()),o.forEach(l=>i.searchParams.append("args[]",l)),`${t} error #${r}; visit ${i} for the full message.`}}var Or=zr("https://base-ui.com/production-error","Base UI"),ta=Or;var ae=s(de(),1);function tt(e,t,a,r){let o=et(ra).current;return Ir(o,e,t,a,r)&&oa(o,[e,t,a,r]),o.callback}function aa(e){let t=et(ra).current;return Mr(t,e)&&oa(t,e),t.callback}function ra(){return{callback:null,cleanup:null,refs:[]}}function Ir(e,t,a,r,o){return e.refs[0]!==t||e.refs[1]!==a||e.refs[2]!==r||e.refs[3]!==o}function Mr(e,t){return e.refs.length!==t.length||e.refs.some((a,r)=>a!==t[r])}function oa(e,t){if(e.refs=t,t.every(a=>a==null)){e.callback=null;return}e.callback=a=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),a!=null){let r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){let i=t[o];if(i!=null)switch(typeof i){case"function":{let l=i(a);typeof l=="function"&&(r[o]=l);break}case"object":{i.current=a;break}default:}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){let i=t[o];if(i!=null)switch(typeof i){case"function":{let l=r[o];typeof l=="function"?l():i(null);break}case"object":{i.current=null;break}default:}}}}}}var na=s(de(),1);var sa=s(de(),1),Lr=parseInt(sa.version,10);function ia(e){return Lr>=e}function at(e){if(!na.isValidElement(e))return null;let t=e,a=t.props;return(ia(19)?a?.ref:t.ref)??null}function he(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var Do=Object.freeze([]),ue=Object.freeze({});function la(e,t){let a={};for(let r in e){let o=e[r];if(t?.hasOwnProperty(r)){let i=t[r](o);i!=null&&Object.assign(a,i);continue}o===!0?a[`data-${r.toLowerCase()}`]="":o&&(a[`data-${r.toLowerCase()}`]=o.toString())}return a}function fa(e,t){return typeof e=="function"?e(t):e}function da(e,t){return typeof e=="function"?e(t):e}var rt={};function te(e,t,a,r,o){if(!a&&!r&&!o&&!e)return ze(t);let i=ze(e);return t&&(i=ye(i,t)),a&&(i=ye(i,a)),r&&(i=ye(i,r)),o&&(i=ye(i,o)),i}function ua(e){if(e.length===0)return rt;if(e.length===1)return ze(e[0]);let t=ze(e[0]);for(let a=1;a<e.length;a+=1)t=ye(t,e[a]);return t}function ze(e){return ot(e)?{...pa(e,rt)}:Dr(e)}function ye(e,t){return ot(t)?pa(t,e):Ur(e,t)}function Dr(e){let t={...e};for(let a in t){let r=t[a];ma(a,r)&&(t[a]=ca(r))}return t}function Ur(e,t){if(!t)return e;for(let a in t){let r=t[a];switch(a){case"style":{e[a]=he(e.style,r);break}case"className":{e[a]=st(e.className,r);break}default:ma(a,r)?e[a]=jr(e[a],r):e[a]=r}}return e}function ma(e,t){let a=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return a===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function ot(e){return typeof e=="function"}function pa(e,t){return ot(e)?e(t):e??rt}function jr(e,t){return t?e?(...a)=>{let r=a[0];if(ha(r)){let i=r;ga(i);let l=t(...a);return i.baseUIHandlerPrevented||e?.(...a),l}let o=t(...a);return e?.(...a),o}:ca(t):e}function ca(e){return e&&((...t)=>{let a=t[0];return ha(a)&&ga(a),e(...t)})}function ga(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function st(e,t){return t?e?t+" "+e:t:e}function ha(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var it=s(de(),1);function ya(e,t,a={}){let r=t.render,o=Yr(t,a);if(a.enabled===!1)return null;let i=a.state??ue;return Hr(e,r,o,i)}function Yr(e,t={}){let{className:a,style:r,render:o}=e,{state:i=ue,ref:l,props:n,stateAttributesMapping:f,enabled:d=!0}=t,m=d?fa(a,i):void 0,p=d?da(r,i):void 0,c=d?la(i,f):ue,h=d&&n?Vr(n):void 0,u=d?he(c,h)??{}:ue;return typeof document<"u"&&(d?Array.isArray(l)?u.ref=aa([u.ref,at(o),...l]):u.ref=tt(u.ref,at(o),l):tt(null,null)),d?(m!==void 0&&(u.className=st(u.className,m)),p!==void 0&&(u.style=he(u.style,p)),u):ue}function Vr(e){return Array.isArray(e)?ua(e):te(void 0,e)}var Fr=Symbol.for("react.lazy");function Hr(e,t,a,r){if(t){if(typeof t=="function")return t(a,r);let o=te(a,t.props);o.ref=a.ref;let i=t;return i?.$$typeof===Fr&&(i=ae.Children.toArray(t)[0]),ae.cloneElement(i,o)}if(e&&typeof e=="string")return qr(e,a);throw new Error(ta(8))}function qr(e,t){return e==="button"?(0,it.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,it.createElement)("img",{alt:"",...t,key:t.key}):ae.createElement(e,t)}function Oe(e){return ya(e.defaultTagName??"div",e,e)}var ba=s(R(),1),nt="data-wp-hash";function lt(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Wr(document)),e.__wpStyleRuntime}function Gr(e,t){if(!e.head)return!1;for(let a of e.head.querySelectorAll(`style[${nt}]`))if(a.getAttribute(nt)===t)return!0;return!1}function wa(e,t,a){if(!e.head)return;let r=lt(),o=r.injectedStyles.get(e);if(o||(o=new Set,r.injectedStyles.set(e,o)),o.has(t))return;if(Gr(e,t)){o.add(t);return}let i=e.createElement("style");i.setAttribute(nt,t),i.appendChild(e.createTextNode(a)),e.head.appendChild(i),o.add(t)}function Wr(e){let t=lt();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[a,r]of t.styles)wa(e,a,r);return()=>{let a=t.documents.get(e);if(a!==void 0){if(a<=1){t.documents.delete(e);return}t.documents.set(e,a-1)}}}function xa(e,t){let a=lt();a.styles.set(e,t);for(let r of a.documents.keys())wa(r,e,t)}typeof process>"u",xa("a495f9d138",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');var _a={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"};typeof process>"u",xa("af6d9984a6","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var va={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},Ie=(0,ba.forwardRef)(function({variant:t="body-md",render:a,className:r,...o},i){return Oe({render:a,defaultTagName:"span",ref:i,props:te(o,{className:Xt(_a.text,va.heading,va.p,_a[t],r)})})});var Me=s(ka(),1),dt=s(C(),1),ut=(0,dt.jsx)(Me.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,dt.jsx)(Me.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});var Ta=s(R(),1),mt="data-wp-hash";function pt(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Jr(document)),e.__wpStyleRuntime}function $r(e,t){if(!e.head)return!1;for(let a of e.head.querySelectorAll(`style[${mt}]`))if(a.getAttribute(mt)===t)return!0;return!1}function Pa(e,t,a){if(!e.head)return;let r=pt(),o=r.injectedStyles.get(e);if(o||(o=new Set,r.injectedStyles.set(e,o)),o.has(t))return;if($r(e,t)){o.add(t);return}let i=e.createElement("style");i.setAttribute(mt,t),i.appendChild(e.createTextNode(a)),e.head.appendChild(i),o.add(t)}function Jr(e){let t=pt();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[a,r]of t.styles)Pa(e,a,r);return()=>{let a=t.documents.get(e);if(a!==void 0){if(a<=1){t.documents.delete(e);return}t.documents.set(e,a-1)}}}function Zr(e,t){let a=pt();a.styles.set(e,t);for(let r of a.documents.keys())Pa(r,e,t)}typeof process>"u",Zr("32aba35fe1","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");var Xr={stack:"_19ce0419607e1896__stack"},Qr={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},x=(0,Ta.forwardRef)(function({direction:t,gap:a,align:r,justify:o,wrap:i,render:l,...n},f){let d={gap:a&&Qr[a],alignItems:r,justifyContent:o,flexDirection:t,flexWrap:i};return Oe({render:l,ref:f,props:te(n,{style:d,className:Xr.stack})})});var $=s(N(),1),_e=s(R(),1),ve=s(P(),1),Ua=s(me(),1),ja=s(V(),1);var Ba=s(N(),1),De=s(R(),1),za=s(I(),1),Oa=s(Ra(),1),Ia=s(Le(),1),Ma=s(C(),1),Kr=e=>(0,Ia.decodeEntities)(e),Ue="wp_pattern_category";function La({categoryTerms:e,onChange:t,categoryMap:a}){let[r,o]=(0,De.useState)(""),i=(0,Oa.useDebounce)(o,500),l=(0,De.useMemo)(()=>Array.from(a.values()).map(f=>Kr(f.label)).filter(f=>r!==""?f.toLowerCase().includes(r.toLowerCase()):!0).sort((f,d)=>f.localeCompare(d)),[r,a]);function n(f){let d=f.reduce((m,p)=>(m.some(c=>c.toLowerCase()===p.toLowerCase())||m.push(p),m),[]);t(d)}return(0,Ma.jsx)(za.FormTokenField,{className:"patterns-menu-items__convert-modal-categories",value:e,suggestions:l,onChange:n,onInputChange:i,label:(0,Ba.__)("Categories"),tokenizeOnBlur:!0,__experimentalExpandOnFocus:!0})}var je=s(P(),1),ct=s(V(),1),Da=s(R(),1);function Ye(){let{saveEntityRecord:e,invalidateResolution:t}=(0,je.useDispatch)(ct.store),{corePatternCategories:a,userPatternCategories:r}=(0,je.useSelect)(l=>{let{getUserPatternCategories:n,getBlockPatternCategories:f}=l(ct.store);return{corePatternCategories:f(),userPatternCategories:n()}},[]),o=(0,Da.useMemo)(()=>{let l=new Map;return r.forEach(n=>{l.set(n.label.toLowerCase(),{label:n.label,name:n.name,id:n.id})}),a.forEach(n=>{!l.has(n.label.toLowerCase())&&n.name!=="query"&&l.set(n.label.toLowerCase(),{label:n.label,name:n.name})}),l},[r,a]);async function i(l){try{let n=o.get(l.toLowerCase());if(n?.id)return n.id;let f=n?{name:n.label,slug:n.name}:{name:l},d=await e("taxonomy",Ue,f,{throwOnError:!0});return t("getUserPatternCategories"),d.id}catch(n){if(n.code!=="term_exists")throw n;return n.data.term_id}}return{categoryMap:o,findOrCreateTerm:i}}var A=s(C(),1);function pe({className:e="patterns-menu-items__convert-modal",modalTitle:t,...a}){let r=(0,ve.useSelect)(o=>o(ja.store).getPostType(ee.user)?.labels?.add_new_item,[]);return(0,A.jsx)(F.Modal,{title:t||r,onRequestClose:a.onClose,overlayClassName:e,focusOnMount:"firstContentElement",size:"small",children:(0,A.jsx)(gt,{...a})})}function gt({confirmLabel:e=(0,$.__)("Add"),defaultCategories:t=[],content:a,onClose:r,onError:o,onSuccess:i,defaultSyncType:l=w.full,defaultTitle:n=""}){let[f,d]=(0,_e.useState)(l),[m,p]=(0,_e.useState)(t),[c,h]=(0,_e.useState)(n),[u,g]=(0,_e.useState)(!1),{createPattern:E}=z((0,ve.useDispatch)(O)),{createErrorNotice:v}=(0,ve.useDispatch)(Ua.store),{categoryMap:L,findOrCreateTerm:B}=Ye();async function S(T,K){if(!(!c||u))try{g(!0);let y=await Promise.all(m.map(G=>B(G))),kt=await E(T,K,typeof a=="function"?a():a,y);i({pattern:kt,categoryId:Re})}catch(y){v(y.message,{type:"snackbar",id:"pattern-create"}),o?.()}finally{g(!1),p([]),h("")}}return(0,A.jsx)("form",{onSubmit:T=>{T.preventDefault(),S(c,f)},children:(0,A.jsxs)(x,{direction:"column",gap:"lg",children:[(0,A.jsx)(F.TextControl,{label:(0,$.__)("Name"),value:c,onChange:h,placeholder:(0,$.__)("My pattern"),className:"patterns-create-modal__name-input"}),(0,A.jsx)(La,{categoryTerms:m,onChange:p,categoryMap:L}),(0,A.jsx)(F.ToggleControl,{label:(0,$._x)("Synced","pattern (singular)"),help:(0,$.__)("Sync this pattern across multiple locations."),checked:f===w.full,onChange:()=>{d(f===w.full?w.unsynced:w.full)}}),(0,A.jsxs)(x,{gap:"sm",justify:"end",children:[(0,A.jsx)(F.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{r(),h("")},children:(0,$.__)("Cancel")}),(0,A.jsx)(F.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!c||u,isBusy:u,children:e})]})]})})}var Ya=s(V(),1),Ve=s(P(),1),H=s(N(),1),Va=s(me(),1);var Fa=s(C(),1);function eo(e,t){return e.type!==ee.user?t.core?.filter(a=>e.categories?.includes(a.name)).map(a=>a.label):t.user?.filter(a=>e.wp_pattern_category?.includes(a.id)).map(a=>a.label)}function ht({pattern:e,onSuccess:t}){let{createSuccessNotice:a}=(0,Ve.useDispatch)(Va.store),r=(0,Ve.useSelect)(o=>{let{getUserPatternCategories:i,getBlockPatternCategories:l}=o(Ya.store);return{core:l(),user:i()}});return e?{content:e.content,defaultCategories:eo(e,r),defaultSyncType:e.type!==ee.user?w.unsynced:e.wp_pattern_sync_status||w.full,defaultTitle:(0,H.sprintf)((0,H._x)("%s (Copy)","pattern"),typeof e.title=="string"?e.title:e.title.raw),onSuccess:({pattern:o})=>{a((0,H.sprintf)((0,H._x)('"%s" duplicated.',"pattern"),o.title.raw),{type:"snackbar",id:"patterns-create"}),t?.({pattern:o})}}:null}function Ha({pattern:e,onClose:t,onSuccess:a}){let r=ht({pattern:e,onSuccess:a});return e?(0,Fa.jsx)(pe,{modalTitle:(0,H.__)("Duplicate pattern"),confirmLabel:(0,H.__)("Duplicate"),onClose:t,onError:t,...r}):null}var oe=s(I(),1);var qa=s(V(),1),yt=s(P(),1),_t=s(R(),1),Ga=s(Le(),1),re=s(N(),1),Wa=s(me(),1),q=s(C(),1);function $a({onClose:e,onError:t,onSuccess:a,pattern:r,...o}){let i=(0,Ga.decodeEntities)(r.title),[l,n]=(0,_t.useState)(i),[f,d]=(0,_t.useState)(!1),{editEntityRecord:m,__experimentalSaveSpecifiedEntityEdits:p}=(0,yt.useDispatch)(qa.store),{createSuccessNotice:c,createErrorNotice:h}=(0,yt.useDispatch)(Wa.store),u=async E=>{if(E.preventDefault(),!(!l||l===r.title||f))try{await m("postType",r.type,r.id,{title:l}),d(!0),n(""),e?.();let v=await p("postType",r.type,r.id,["title"],{throwOnError:!0});a?.(v),c((0,re.__)("Pattern renamed"),{type:"snackbar",id:"pattern-update"})}catch(v){t?.();let L=v.message&&v.code!=="unknown_error"?v.message:(0,re.__)("An error occurred while renaming the pattern.");h(L,{type:"snackbar",id:"pattern-update"})}finally{d(!1),n("")}},g=()=>{e?.(),n("")};return(0,q.jsx)(oe.Modal,{title:(0,re.__)("Rename"),...o,onRequestClose:e,focusOnMount:"firstContentElement",size:"small",children:(0,q.jsx)("form",{onSubmit:u,children:(0,q.jsxs)(x,{direction:"column",gap:"lg",children:[(0,q.jsx)(oe.TextControl,{label:(0,re.__)("Name"),value:l,onChange:n,required:!0}),(0,q.jsxs)(x,{gap:"sm",justify:"end",children:[(0,q.jsx)(oe.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:g,children:(0,re.__)("Cancel")}),(0,q.jsx)(oe.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,re.__)("Save")})]})]})})})}var or=s(W(),1);var D=s(Ee(),1),be=s(W(),1),Fe=s(R(),1),Ja=s(I(),1);var J=s(P(),1),vt=s(V(),1),se=s(N(),1),Za=s(me(),1);var ie=s(C(),1);function Xa({clientIds:e,rootClientId:t,closeBlockSettingsMenu:a}){let{createSuccessNotice:r}=(0,J.useDispatch)(Za.store),{replaceBlocks:o,updateBlockAttributes:i}=(0,J.useDispatch)(be.store),{setEditingPattern:l}=z((0,J.useDispatch)(O)),[n,f]=(0,Fe.useState)(!1),{getBlockAttributes:d}=(0,J.useSelect)(be.store),m=(0,J.useSelect)(u=>{let{canUser:g}=u(vt.store),{getBlocksByClientId:E,canInsertBlockType:v,getBlockRootClientId:L}=u(be.store),B=t||(e.length>0?L(e[0]):void 0),S=E(e)??[],T=G=>{let Et=(0,D.getBlockType)(G),yr=Et&&"parent"in Et;return(0,D.hasBlockSupport)(G,"reusable",!yr)},K=S.length===1&&S[0]&&(0,D.isReusableBlock)(S[0])&&!!u(vt.store).getEntityRecord("postType","wp_block",S[0].attributes.ref);return!(S.length===1&&S?.[0]?.attributes?.metadata?.patternName)&&!K&&v("core/block",B)&&S.every(G=>!!G&&G.isValid&&T(G.name))&&!!g("create",{kind:"postType",name:"wp_block"})},[e,t]),{getBlocksByClientId:p}=(0,J.useSelect)(be.store),c=(0,Fe.useCallback)(()=>(0,D.serialize)(p(e)),[p,e]);if(!m)return null;let h=({pattern:u})=>{if(u.wp_pattern_sync_status===w.unsynced){if(e?.length===1){let g=d(e[0]);i(e[0],{metadata:{...g?.metadata?g.metadata:{},patternName:`core/block/${u.id}`,name:u.title.raw}})}}else{let g=(0,D.createBlock)("core/block",{ref:u.id});o(e,g),l(g.clientId,!0)}r(u.wp_pattern_sync_status===w.unsynced?(0,se.sprintf)((0,se.__)("Unsynced pattern created: %s"),u.title.raw):(0,se.sprintf)((0,se.__)("Synced pattern created: %s"),u.title.raw),{type:"snackbar",id:"convert-to-pattern-success"}),f(!1),a()};return(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(Ja.MenuItem,{icon:ut,onClick:()=>f(!0),"aria-expanded":n,"aria-haspopup":"dialog",children:(0,se.__)("Create pattern")}),n&&(0,ie.jsx)(pe,{content:c,onSuccess:u=>{h(u)},onError:()=>{f(!1)},onClose:()=>{f(!1)}})]})}var we=s(I(),1),ne=s(N(),1),er=s(Ee(),1),xe=s(P(),1),tr=s(R(),1),bt=s(W(),1),wt=s(Ka(),1),ar=s(V(),1);var U=s(C(),1);function to({clientId:e,onClose:t}){let[a,r]=(0,tr.useState)(!1),{attributes:o,canDetach:i,isVisible:l,managePatternsUrl:n,isSyncedPattern:f,isUnsyncedPattern:d,canEdit:m}=(0,xe.useSelect)(u=>{let{canRemoveBlock:g,getBlock:E,canEditBlock:v}=u(bt.store),{canUser:L}=u(ar.store),B=E(e),S=!!B?.attributes?.metadata?.patternName,T=!!B&&(0,er.isReusableBlock)(B)&&!!L("update",{kind:"postType",name:"wp_block",id:B.attributes.ref});return{attributes:B.attributes,canEdit:v(e),canDetach:S||T&&g(e),isUnsyncedPattern:S,isSyncedPattern:T,isVisible:S||T,managePatternsUrl:L("create",{kind:"postType",name:"wp_template"})?(0,wt.addQueryArgs)("site-editor.php",{p:"/pattern"}):(0,wt.addQueryArgs)("edit.php",{post_type:"wp_block"})}},[e]),{updateBlockAttributes:p}=(0,xe.useDispatch)(bt.store),{convertSyncedPatternToStatic:c}=z((0,xe.useDispatch)(O));if(!l||!m)return null;let h=()=>{if(f&&c(e),d){let{patternName:u,...g}=o?.metadata??{};p(e,{metadata:g})}t?.(),r(!1)};return(0,U.jsxs)(U.Fragment,{children:[i&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(we.MenuItem,{onClick:()=>r(!0),children:(0,ne.__)("Detach")}),(0,U.jsx)(we.__experimentalConfirmDialog,{isOpen:a,onConfirm:h,onCancel:()=>r(!1),confirmButtonText:(0,ne.__)("Detach"),size:"medium",title:(0,ne.__)("Detach pattern?"),__experimentalHideHeader:!1,children:f?(0,ne.__)("The blocks will be separated from the original pattern and will be fully editable. Future changes to the pattern will not apply here."):(0,ne.__)("Blocks will no longer be associated with this pattern and will be fully editable.")})]}),(0,U.jsx)(we.MenuItem,{href:n,children:(0,ne.__)("Manage patterns")})]})}var rr=to;var Z=s(C(),1);function sr({rootClientId:e}){return(0,Z.jsx)(or.BlockSettingsMenuControls,{children:({selectedClientIds:t,onClose:a})=>(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Xa,{clientIds:t,rootClientId:e,closeBlockSettingsMenu:a}),t.length===1&&(0,Z.jsx)(rr,{clientId:t[0],onClose:a})]})})}var le=s(I(),1);var ir=s(V(),1),xt=s(P(),1),Q=s(R(),1),nr=s(Le(),1),X=s(N(),1),lr=s(me(),1),St=s(ft(),1);var M=s(C(),1);function fr({category:e,existingCategories:t,onClose:a,onError:r,onSuccess:o,...i}){let l=(0,Q.useId)(),n=(0,Q.useRef)(),[f,d]=(0,Q.useState)((0,nr.decodeEntities)(e.name)),[m,p]=(0,Q.useState)(!1),[c,h]=(0,Q.useState)(!1),u=c?`patterns-rename-pattern-category-modal__validation-message-${l}`:void 0,{saveEntityRecord:g,invalidateResolution:E}=(0,xt.useDispatch)(ir.store),{createErrorNotice:v,createSuccessNotice:L}=(0,xt.useDispatch)(lr.store),B=K=>{c&&h(void 0),d(K)},S=async K=>{if(K.preventDefault(),!m){if(!f||f===e.name){let y=(0,X.__)("Please enter a new name for this category.");(0,St.speak)(y,"assertive"),h(y),n.current?.focus();return}if(t.patternCategories.find(y=>y.id!==e.id&&y.label.toLowerCase()===f.toLowerCase())){let y=(0,X.__)("This category already exists. Please use a different name.");(0,St.speak)(y,"assertive"),h(y),n.current?.focus();return}try{p(!0);let y=await g("taxonomy",Ue,{id:e.id,slug:e.slug,name:f});E("getUserPatternCategories"),o?.(y),a(),L((0,X.__)("Pattern category renamed."),{type:"snackbar",id:"pattern-category-update"})}catch(y){r?.(),v(y.message,{type:"snackbar",id:"pattern-category-update"})}finally{p(!1),d("")}}},T=()=>{a(),d("")};return(0,M.jsx)(le.Modal,{title:(0,X.__)("Rename"),onRequestClose:T,...i,children:(0,M.jsx)("form",{onSubmit:S,children:(0,M.jsxs)(x,{direction:"column",gap:"lg",children:[(0,M.jsxs)(x,{direction:"column",gap:"sm",children:[(0,M.jsx)(le.TextControl,{ref:n,label:(0,X.__)("Name"),value:f,onChange:B,"aria-describedby":u,required:!0}),c&&(0,M.jsx)("span",{className:"patterns-rename-pattern-category-modal__validation-message",id:u,children:c})]}),(0,M.jsxs)(x,{gap:"sm",justify:"end",children:[(0,M.jsx)(le.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:T,children:(0,X.__)("Cancel")}),(0,M.jsx)(le.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!f||f===e.name||m,isBusy:m,children:(0,X.__)("Save")})]})]})})})}var Ce=s(R(),1),He=s(W(),1),qe=s(I(),1),ce=s(N(),1);var j=s(I(),1);var k=s(N(),1),Se=s(R(),1),dr=s(ft(),1),_=s(C(),1);function ur({placeholder:e,initialName:t="",onClose:a,onSave:r}){let[o,i]=(0,Se.useState)(t),l=(0,Se.useId)(),n=!!o.trim(),f=()=>{if(o!==t){let d=(0,k.sprintf)((0,k.__)('Block name changed to: "%s".'),o);(0,dr.speak)(d,"assertive")}r(o),a()};return(0,_.jsx)(j.Modal,{title:(0,k.__)("Enable overrides"),onRequestClose:a,focusOnMount:"firstContentElement",aria:{describedby:l},size:"small",children:(0,_.jsx)("form",{onSubmit:d=>{d.preventDefault(),n&&f()},children:(0,_.jsxs)(x,{direction:"column",gap:"xl",children:[(0,_.jsx)(Ie,{id:l,children:(0,k.__)("Overrides are changes you make to a block within a synced pattern instance. Use overrides to customize a synced pattern instance to suit its new context. Name this block to specify an override.")}),(0,_.jsx)(j.TextControl,{value:o,label:(0,k.__)("Name"),help:(0,k.__)('For example, if you are creating a recipe pattern, you use "Recipe Title", "Recipe Description", etc.'),placeholder:e,onChange:i}),(0,_.jsxs)(x,{gap:"sm",justify:"end",children:[(0,_.jsx)(j.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:a,children:(0,k.__)("Cancel")}),(0,_.jsx)(j.Button,{__next40pxDefaultSize:!0,"aria-disabled":!n,variant:"primary",type:"submit",children:(0,k.__)("Enable")})]})]})})})}function mr({onClose:e,onSave:t}){let a=(0,Se.useId)();return(0,_.jsx)(j.Modal,{title:(0,k.__)("Disable overrides"),onRequestClose:e,aria:{describedby:a},size:"small",children:(0,_.jsx)("form",{onSubmit:r=>{r.preventDefault(),t(),e()},children:(0,_.jsxs)(x,{direction:"column",gap:"xl",children:[(0,_.jsx)(Ie,{id:a,children:(0,k.__)("Are you sure you want to disable overrides? Disabling overrides will revert all applied overrides for this block throughout instances of this pattern.")}),(0,_.jsxs)(x,{gap:"sm",justify:"end",children:[(0,_.jsx)(j.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,k.__)("Cancel")}),(0,_.jsx)(j.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,k.__)("Disable")})]})]})})})}var Y=s(C(),1);function ao({attributes:e,setAttributes:t,name:a}){let r=(0,Ce.useId)(),[o,i]=(0,Ce.useState)(!1),[l,n]=(0,Ce.useState)(!1),f=!!e.metadata?.name,d=e.metadata?.bindings?.__default,m=f&&d?.source===Te,p=d?.source&&d.source!==Te,{updateBlockBindings:c}=(0,He.useBlockBindingsUtils)();function h(E,v){v&&t({metadata:{...e.metadata,name:v}}),c({__default:E?{source:Te}:void 0})}if(p)return null;let u=a==="core/image"&&!!e.href?.length,g=!m&&u?(0,ce.__)("Overrides currently don't support image links. Remove the link first before enabling overrides."):(0,ce.__)("Allow changes to this block throughout instances of this pattern.");return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(He.InspectorControls,{group:"advanced",children:(0,Y.jsx)(qe.BaseControl,{id:r,label:(0,ce.__)("Overrides"),help:g,children:(0,Y.jsx)(qe.Button,{__next40pxDefaultSize:!0,className:"pattern-overrides-control__allow-overrides-button",variant:"secondary","aria-haspopup":"dialog",onClick:()=>{m?n(!0):i(!0)},disabled:!m&&u,accessibleWhenDisabled:!0,children:m?(0,ce.__)("Disable overrides"):(0,ce.__)("Enable overrides")})})}),o&&(0,Y.jsx)(ur,{initialName:e.metadata?.name,onClose:()=>i(!1),onSave:E=>{h(!0,E)}}),l&&(0,Y.jsx)(mr,{onClose:()=>n(!1),onSave:()=>h(!1)})]})}var pr=ao;var ge=s(W(),1),We=s(I(),1),$e=s(P(),1),cr=s(N(),1),Ge=s(C(),1),Ct="content";function gr(e){let t=e.attributes.metadata?.name,a=(0,$e.useRegistry)(),r=(0,$e.useSelect)(i=>{if(!t)return;let{getBlockAttributes:l,getBlockParentsByBlockName:n}=i(ge.store),[f]=n(e.clientId,"core/block",!0);if(!f)return;let d=l(f)[Ct];if(d)return d.hasOwnProperty(t)},[e.clientId,t]);function o(){let{getBlockAttributes:i,getBlockParentsByBlockName:l}=a.select(ge.store),[n]=l(e.clientId,"core/block",!0);if(!n)return;let f=i(n)[Ct];if(!f.hasOwnProperty(t))return;let{updateBlockAttributes:d,__unstableMarkLastChangeAsPersistent:m}=a.dispatch(ge.store);m();let p={...f};delete p[t],Object.keys(p).length||(p=void 0),d(n,{[Ct]:p})}return(0,Ge.jsx)(ge.__unstableBlockToolbarLastItem,{children:(0,Ge.jsx)(We.ToolbarGroup,{children:(0,Ge.jsx)(We.ToolbarButton,{onClick:o,disabled:!r,children:(0,cr.__)("Reset")})})})}var hr={};Yt(hr,{OverridesPanel:Jt,CreatePatternModal:pe,CreatePatternModalContents:gt,DuplicatePatternModal:Ha,isOverridableBlock:Be,useDuplicatePatternProps:ht,RenamePatternModal:$a,PatternsMenuItems:sr,RenamePatternCategoryModal:fr,PatternOverridesControls:pr,ResetOverridesControl:gr,useAddPatternCategory:Ye,PATTERN_TYPES:ee,PATTERN_DEFAULT_CATEGORY:Re,PATTERN_USER_CATEGORY:Ot,EXCLUDED_PATTERN_SOURCES:It,PATTERN_SYNC_TYPES:w});return Sr(ro);})(); (window.wp ||= {}).patterns = wp.patterns; })();
Save