PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-includes
/
js
/
dist
/*! This file is auto-generated */ (()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.ReactJSXRuntime,n=window.wp.element,o=window.wp.i18n;var r=function(){return r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function s(e){return e.toLowerCase()}var a=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],i=/[^A-Z0-9]+/gi;function l(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function c(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?a:n,r=t.stripRegexp,c=void 0===r?i:r,p=t.transform,d=void 0===p?s:p,u=t.delimiter,w=void 0===u?" ":u,f=l(l(e,o,"$1\0$2"),c,"\0"),m=0,b=f.length;"\0"===f.charAt(m);)m++;for(;"\0"===f.charAt(b-1);)b--;return f.slice(m,b).split("\0").map(d).join(w)}(e,r({delimiter:"."},t))}const p=window.wp.apiFetch;var d=e.n(p);const u=window.wp.blob;var w=async function(e){const t=await d()({path:"/wp/v2/types/wp_block"}),n=await d()({path:`/wp/v2/${t.rest_base}/${e}?context=edit`}),o=n.title.raw,s=n.content.raw,a=n.wp_pattern_sync_status,i=JSON.stringify({__file:"wp_block",title:o,content:s,syncStatus:a},null,2),l=(void 0===p&&(p={}),c(o,r({delimiter:"-"},p))+".json");var p;(0,u.downloadBlob)(l,i,"application/json")};const f=window.wp.compose,m=window.wp.components;var b=async function(e){const t=await function(e){const t=new window.FileReader;return new Promise((n=>{t.onload=()=>{n(t.result)},t.readAsText(e)}))}(e);let n;try{n=JSON.parse(t)}catch(e){throw new Error("Invalid JSON file")}if("wp_block"!==n.__file||!n.title||!n.content||"string"!=typeof n.title||"string"!=typeof n.content||n.syncStatus&&"string"!=typeof n.syncStatus)throw new Error("Invalid pattern JSON file");const o=await d()({path:"/wp/v2/types/wp_block"});return await d()({path:`/wp/v2/${o.rest_base}`,data:{title:n.title,content:n.content,status:"publish",meta:"unsynced"===n.syncStatus?{wp_pattern_sync_status:n.syncStatus}:void 0},method:"POST"})};var _=(0,f.withInstanceId)((function({instanceId:e,onUpload:r}){const s="list-reusable-blocks-import-form-"+e,a=(0,n.useRef)(),[i,l]=(0,n.useState)(!1),[c,p]=(0,n.useState)(null),[d,u]=(0,n.useState)(null);return(0,t.jsxs)("form",{className:"list-reusable-blocks-import-form",onSubmit:e=>{e.preventDefault(),d&&(l({isLoading:!0}),b(d).then((e=>{a&&(l(!1),r(e))})).catch((e=>{if(!a)return;let t;switch(e.message){case"Invalid JSON file":t=(0,o.__)("Invalid JSON file");break;case"Invalid pattern JSON file":t=(0,o.__)("Invalid pattern JSON file");break;default:t=(0,o.__)("Unknown error")}l(!1),p(t)})))},ref:a,children:[c&&(0,t.jsx)(m.Notice,{status:"error",onRemove:()=>{p(null)},children:c}),(0,t.jsx)("label",{htmlFor:s,className:"list-reusable-blocks-import-form__label",children:(0,o.__)("File")}),(0,t.jsx)("input",{id:s,type:"file",onChange:e=>{u(e.target.files[0]),p(null)}}),(0,t.jsx)(m.Button,{__next40pxDefaultSize:!0,type:"submit",isBusy:i,accessibleWhenDisabled:!0,disabled:!d||i,variant:"secondary",className:"list-reusable-blocks-import-form__button",children:(0,o._x)("Import","button label")})]})}));var v=function({onUpload:e}){return(0,t.jsx)(m.Dropdown,{popoverProps:{placement:"bottom-start"},contentClassName:"list-reusable-blocks-import-dropdown__content",renderToggle:({isOpen:e,onToggle:n})=>(0,t.jsx)(m.Button,{size:"compact",className:"list-reusable-blocks-import-dropdown__button","aria-expanded":e,onClick:n,variant:"primary",children:(0,o.__)("Import from JSON")}),renderContent:({onClose:n})=>(0,t.jsx)(_,{onUpload:(0,f.pipe)(n,e)})})};document.body.addEventListener("click",(e=>{e.target.classList.contains("wp-list-reusable-blocks__export")&&(e.preventDefault(),w(e.target.dataset.id))})),document.addEventListener("DOMContentLoaded",(()=>{const e=document.querySelector(".page-title-action");if(!e)return;const r=document.createElement("div");r.className="list-reusable-blocks__container",e.parentNode.insertBefore(r,e),(0,n.createRoot)(r).render((0,t.jsx)(n.StrictMode,{children:(0,t.jsx)(v,{onUpload:()=>{const e=document.createElement("div");e.className="notice notice-success is-dismissible",e.innerHTML=`<p>${(0,o.__)("Pattern imported successfully!")}</p>`;const t=document.querySelector(".wp-header-end");t&&t.parentNode.insertBefore(e,t)}})}))})),(window.wp=window.wp||{}).listReusableBlocks={}})();
[-] dom-ready.js
[edit]
[-] block-library.js
[edit]
[-] private-apis.min.js
[edit]
[-] customize-widgets.js
[edit]
[-] admin-ui.js
[edit]
[-] blocks.js
[edit]
[-] warning.js
[edit]
[-] components.js
[edit]
[-] blob.min.js
[edit]
[-] list-reusable-blocks.js
[edit]
[-] escape-html.min.js
[edit]
[-] nux.js
[edit]
[-] server-side-render.js
[edit]
[-] annotations.js
[edit]
[-] element.min.js
[edit]
[-] annotations.min.js
[edit]
[-] format-library.js
[edit]
[-] keycodes.js
[edit]
[-] notices.js
[edit]
[-] keyboard-shortcuts.js
[edit]
[-] url.min.js
[edit]
[-] priority-queue.min.js
[edit]
[-] base-styles.min.js
[edit]
[-] preferences.js
[edit]
[-] preferences-persistence.js
[edit]
[-] block-serialization-default-parser.min.js
[edit]
[+]
vendor
[-] widgets.js
[edit]
[-] preferences.min.js
[edit]
[-] data-controls.js
[edit]
[-] views.min.js
[edit]
[-] dom.js
[edit]
[-] preferences-persistence.min.js
[edit]
[-] html-entities.min.js
[edit]
[-] deprecated.js
[edit]
[-] patterns.js
[edit]
[-] latex-to-mathml.min.js
[edit]
[+]
script-modules
[-] keyboard-shortcuts.min.js
[edit]
[-] i18n.js
[edit]
[-] warning.min.js
[edit]
[-] date.min.js
[edit]
[-] data.js
[edit]
[-] a11y.js
[edit]
[-] data-controls.min.js
[edit]
[-] commands.js
[edit]
[-] data.min.js
[edit]
[-] block-library.min.js
[edit]
[-] editor.js
[edit]
[-] wordcount.min.js
[edit]
[-] dom-ready.min.js
[edit]
[-] token-list.min.js
[edit]
[-] style-engine.js
[edit]
[-] html-entities.js
[edit]
[-] router.min.js
[edit]
[-] blocks.min.js
[edit]
[-] redux-routine.min.js
[edit]
[-] reusable-blocks.min.js
[edit]
[-] core-data.js
[edit]
[-] escape-html.js
[edit]
[-] reusable-blocks.js
[edit]
[-] block-directory.min.js
[edit]
[-] block-directory.js
[edit]
[-] block-editor.min.js
[edit]
[-] style-engine.min.js
[edit]
[-] media-utils.min.js
[edit]
[-] date.js
[edit]
[-] wordcount.js
[edit]
[-] views.js
[edit]
[-] block-serialization-default-parser.js
[edit]
[-] deprecated.min.js
[edit]
[-] edit-site.min.js
[edit]
[-] dom.min.js
[edit]
[-] private-apis.js
[edit]
[-] element.js
[edit]
[-] server-side-render.min.js
[edit]
[-] hooks.min.js
[edit]
[-] format-library.min.js
[edit]
[-] compose.min.js
[edit]
[-] autop.js
[edit]
[-] edit-site.js
[edit]
[-] customize-widgets.min.js
[edit]
[-] components.min.js
[edit]
[-] plugins.js
[edit]
[-] primitives.js
[edit]
[-] is-shallow-equal.min.js
[edit]
[-] redux-routine.js
[edit]
[-] rich-text.min.js
[edit]
[-] priority-queue.js
[edit]
[-] patterns.min.js
[edit]
[-] list-reusable-blocks.min.js
[edit]
[-] plugins.min.js
[edit]
[-] api-fetch.js
[edit]
[-] edit-post.js
[edit]
[-] i18n.min.js
[edit]
[-] edit-widgets.js
[edit]
[-] keycodes.min.js
[edit]
[-] core-commands.js
[edit]
[-] block-editor.js
[edit]
[-] blob.js
[edit]
[-] edit-post.min.js
[edit]
[-] edit-widgets.min.js
[edit]
[-] media-utils.js
[edit]
[-] autop.min.js
[edit]
[+]
..
[-] compose.js
[edit]
[-] editor.min.js
[edit]
[-] admin-ui.min.js
[edit]
[-] shortcode.js
[edit]
[-] viewport.js
[edit]
[-] api-fetch.min.js
[edit]
[-] notices.min.js
[edit]
[-] base-styles.js
[edit]
[-] latex-to-mathml.js
[edit]
[-] commands.min.js
[edit]
[-] shortcode.min.js
[edit]
[-] token-list.js
[edit]
[-] is-shallow-equal.js
[edit]
[-] url.js
[edit]
[+]
development
[-] rich-text.js
[edit]
[-] widgets.min.js
[edit]
[-] a11y.min.js
[edit]
[-] viewport.min.js
[edit]
[-] core-data.min.js
[edit]
[-] nux.min.js
[edit]
[-] core-commands.min.js
[edit]
[-] primitives.min.js
[edit]
[-] hooks.js
[edit]
[-] router.js
[edit]