WordPress/wp-includes/js/dist/list-reusable-blocks.min.js

2 lines
8.9 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.listReusableBlocks=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=472)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},11:function(e,t){e.exports=window.wp.compose},16:function(e,t){e.exports=window.regeneratorRuntime},18:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},2:function(e,t){e.exports=window.lodash},22:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},25:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},26:function(e,t,n){"use strict";function r(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 o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},3:function(e,t){e.exports=window.wp.components},33:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(55);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Object(r.a)(e,t)}},34:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(59),o=n.n(r),i=n(18);function c(e,t){return!t||"object"!==o()(t)&&"function"!=typeof t?Object(i.a)(e):t}},472:function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(1),i=n(48),c=n(16),a=n.n(c),u=n(2),s=n(50),l=n.n(s);function f(e,t,n){var r=new window.Blob([t],{type:n});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(r,e);else{var o=document.createElement("a");o.href=URL.createObjectURL(r),o.download=e,o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o)}}function p(e){var t=new window.FileReader;return new Promise((function(n){t.onload=function(){n(t.result)},t.readAsText(e)}))}function b(){return(b=Object(i.a)(a.a.mark((function e(t){var n,r,o,i,c;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l()({path:"/wp/v2/types/wp_block"});case 2:return n=e.sent,e.next=5,l()({path:"/wp/v2/".concat(n.rest_base,"/").concat(t,"?context=edit")});case 5:r=e.sent,o=r.title.raw,i=r.content.raw,c=JSON.stringify({__file:"wp_block",title:o,content:i},null,2),f(Object(u.kebabCase)(o)+".json",c,"application/json");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var d=function(e){return b.apply(this,arguments)},m=n(3),v=n(25),y=n(26),w=n(18),O=n(33),h=n(34),_=n(22),j=n(11);function S(){return(S=Object(i.a)(a.a.mark((function e(t){var n,r,o,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p(t);case 2:n=e.sent,e.prev=3,r=JSON.parse(n),e.next=10;break;case 7:throw e.prev=7,e.t0=e.catch(3),new Error("Invalid JSON file");case 10:if("wp_block"===r.__file&&r.title&&r.content&&Object(