WordPress/wp-includes/js/dist/block-library.min.js
youknowriad 2d58d57e38 Block Editor: Update the WordPress Packages from Gutenberg 5.2.
Updated Packages:

 - @wordpress/a11y@2.1.0
 - @wordpress/annotations@1.1.0
 - @wordpress/api-fetch@3.0.0
 - @wordpress/autop@2.1.0
 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0
 - @wordpress/babel-plugin-makepot@3.0.0
 - @wordpress/babel-preset-default@4.0.0
 - @wordpress/blob@2.2.0
 - @wordpress/block-editor@1.0.0
 - @wordpress/block-library@2.3.0
 - @wordpress/block-serialization-default-parser@3.0.0
 - @wordpress/block-serialization-spec-parser@3.0.0
 - @wordpress/blocks@6.1.0
 - @wordpress/browserslist-config@2.3.0
 - @wordpress/components@7.1.0
 - @wordpress/compose@3.1.0
 - @wordpress/core-data@2.1.0
 - @wordpress/custom-templated-path-webpack-plugin@1.2.0
 - @wordpress/data@4.3.0
 - @wordpress/date@3.1.0
 - @wordpress/deprecated@2.1.0
 - @wordpress/docgen@1.0.0
 - @wordpress/dom-ready@2.1.0
 - @wordpress/dom@2.1.0
 - @wordpress/e2e-test-utils@1.0.0
 - @wordpress/e2e-tests@1.0.0
 - @wordpress/edit-post@3.2.0
 - @wordpress/editor@9.1.0
 - @wordpress/element@2.2.0
 - @wordpress/escape-html@1.1.0
 - @wordpress/eslint-plugin@2.0.0
 - @wordpress/format-library@1.3.0
 - @wordpress/hooks@2.1.0
 - @wordpress/html-entities@2.1.0
 - @wordpress/i18n@3.2.0
 - @wordpress/is-shallow-equal@1.2.0
 - @wordpress/jest-console@3.0.0
 - @wordpress/jest-preset-default@4.0.0
 - @wordpress/jest-puppeteer-axe@1.0.0
 - @wordpress/keycodes@2.1.0
 - @wordpress/library-export-default-webpack-plugin@1.1.0
 - @wordpress/list-reusable-blocks@1.2.0
 - @wordpress/notices@1.2.0
 - @wordpress/npm-package-json-lint-config@1.2.0
 - @wordpress/nux@3.1.0
 - @wordpress/plugins@2.1.0
 - @wordpress/postcss-themes@2.0.0
 - @wordpress/priority-queue@1.0.0
 - @wordpress/redux-routine@3.1.0
 - @wordpress/rich-text@3.1.0
 - @wordpress/scripts@3.0.0
 - @wordpress/shortcode@2.1.0
 - @wordpress/token-list@1.2.0
 - @wordpress/url@2.4.0
 - @wordpress/viewport@2.2.0
 - @wordpress/wordcount@2.1.0

This also includes the update to the scripts dependencies and the new widgets php files.

Props iseulde.
Fixes #46429.

Built from https://develop.svn.wordpress.org/trunk@44808


git-svn-id: http://core.svn.wordpress.org/trunk@44640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 09:09:59 +00:00

23 lines
219 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

this.wp=this.wp||{},this.wp.blockLibrary=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=306)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10: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})},101:function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(a){t&&t.nodeType,e&&e.nodeType;var c="object"==typeof r&&r;c.global!==c&&c.window!==c&&c.self;var i,l=2147483647,s=36,u=1,b=26,m=38,d=700,h=72,p=128,g="-",O=/^xn--/,j=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=s-u,k=Math.floor,w=String.fromCharCode;function C(e){throw new RangeError(v[e])}function E(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function _(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+E((e=e.replace(f,".")).split("."),t).join(".")}function x(e){for(var t,n,r=[],o=0,a=e.length;o<a;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<a?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function S(e){return E(e,function(e){var t="";return e>65535&&(t+=w((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=w(e)}).join("")}function T(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function N(e,t,n){var r=0;for(e=n?k(e/d):e>>1,e+=k(e/t);e>y*b>>1;r+=s)e=k(e/y);return k(r+(y+1)*e/(e+m))}function R(e){var t,n,r,o,a,c,i,m,d,O,j,f=[],v=e.length,y=0,w=p,E=h;for((n=e.lastIndexOf(g))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&C("not-basic"),f.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<v;){for(a=y,c=1,i=s;o>=v&&C("invalid-input"),((m=(j=e.charCodeAt(o++))-48<10?j-22:j-65<26?j-65:j-97<26?j-97:s)>=s||m>k((l-y)/c))&&C("overflow"),y+=m*c,!(m<(d=i<=E?u:i>=E+b?b:i-E));i+=s)c>k(l/(O=s-d))&&C("overflow"),c*=O;E=N(y-a,t=f.length+1,0==a),k(y/t)>l-w&&C("overflow"),w+=k(y/t),y%=t,f.splice(y++,0,w)}return S(f)}function B(e){var t,n,r,o,a,c,i,m,d,O,j,f,v,y,E,_=[];for(f=(e=x(e)).length,t=p,n=0,a=h,c=0;c<f;++c)(j=e[c])<128&&_.push(w(j));for(r=o=_.length,o&&_.push(g);r<f;){for(i=l,c=0;c<f;++c)(j=e[c])>=t&&j<i&&(i=j);for(i-t>k((l-n)/(v=r+1))&&C("overflow"),n+=(i-t)*v,t=i,c=0;c<f;++c)if((j=e[c])<t&&++n>l&&C("overflow"),j==t){for(m=n,d=s;!(m<(O=d<=a?u:d>=a+b?b:d-a));d+=s)E=m-O,y=s-O,_.push(w(T(O+E%y,0))),m=k(E/y);_.push(w(T(m,0))),a=N(n,v,r==o),n=0,++r}++n,++t}return _.join("")}i={version:"1.4.1",ucs2:{decode:x,encode:S},decode:R,encode:B,toASCII:function(e){return _(e,function(e){return j.test(e)?"xn--"+B(e):e})},toUnicode:function(e){return _(e,function(e){return O.test(e)?R(e.slice(4).toLowerCase()):e})}},void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(102)(e),n(51))},102:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},103:function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},104:function(e,t,n){"use strict";t.decode=t.parse=n(105),t.encode=t.stringify=n(106)},105:function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,a){t=t||"&",n=n||"=";var c={};if("string"!=typeof e||0===e.length)return c;var i=/\+/g;e=e.split(t);var l=1e3;a&&"number"==typeof a.maxKeys&&(l=a.maxKeys);var s=e.length;l>0&&s>l&&(s=l);for(var u=0;u<s;++u){var b,m,d,h,p=e[u].replace(i,"%20"),g=p.indexOf(n);g>=0?(b=p.substr(0,g),m=p.substr(g+1)):(b=p,m=""),d=decodeURIComponent(b),h=decodeURIComponent(m),r(c,d)?o(c[d])?c[d].push(h):c[d]=[c[d],h]:c[d]=h}return c};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},106:function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,i){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?a(c(e),function(c){var i=encodeURIComponent(r(c))+n;return o(e[c])?a(e[c],function(e){return i+encodeURIComponent(r(e))}).join(t):i+encodeURIComponent(r(e[c]))}).join(t):i?encodeURIComponent(r(i))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var c=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},11:function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(29),o=n(3);function a(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},12: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})},13:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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&&r(e,t)}n.d(t,"a",function(){return o})},14:function(e,t){!function(){e.exports=this.wp.blocks}()},15:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return r})},16:function(e,t,n){var r;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===a)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},17:function(e,t){!function(){e.exports=this.wp.keycodes}()},18:function(e,t,n){"use strict";var r=n(33);function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||Object(r.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(t,"a",function(){return o})},19:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",function(){return r})},2:function(e,t){!function(){e.exports=this.lodash}()},20:function(e,t){!function(){e.exports=this.wp.richText}()},21:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",function(){return r})},22:function(e,t){!function(){e.exports=this.wp.url}()},25:function(e,t,n){"use strict";var r=n(34);var o=n(35);function a(e,t){return Object(r.a)(e)||function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||Object(o.a)()}n.d(t,"a",function(){return a})},27:function(e,t){!function(){e.exports=this.moment}()},29:function(e,t,n){"use strict";function r(e){return(r="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})(e)}function o(e){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}n.d(t,"a",function(){return o})},3: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})},306:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"name",function(){return pe}),n.d(r,"settings",function(){return ge});var o={};n.r(o),n.d(o,"name",function(){return et}),n.d(o,"settings",function(){return at});var a={};n.r(a),n.d(a,"getLevelFromHeadingNodeName",function(){return lt}),n.d(a,"name",function(){return mt}),n.d(a,"settings",function(){return dt});var c={};n.r(c),n.d(c,"name",function(){return gt}),n.d(c,"settings",function(){return Ot});var i={};n.r(i),n.d(i,"name",function(){return Tt}),n.d(i,"settings",function(){return Rt});var l={};n.r(l),n.d(l,"name",function(){return Bt}),n.d(l,"settings",function(){return At});var s={};n.r(s),n.d(s,"name",function(){return zt}),n.d(s,"settings",function(){return Ht});var u={};n.r(u),n.d(u,"name",function(){return Gt}),n.d(u,"settings",function(){return Kt});var b={};n.r(b),n.d(b,"name",function(){return en}),n.d(b,"settings",function(){return tn});var m={};n.r(m),n.d(m,"name",function(){return on}),n.d(m,"settings",function(){return an});var d={};n.r(d),n.d(d,"name",function(){return cn}),n.d(d,"settings",function(){return ln});var h={};n.r(h),n.d(h,"name",function(){return mn}),n.d(h,"settings",function(){return dn});var p={};n.r(p),n.d(p,"name",function(){return hn}),n.d(p,"settings",function(){return pn});var g={};n.r(g),n.d(g,"name",function(){return jn}),n.d(g,"settings",function(){return vn});var O={};n.r(O),n.d(O,"name",function(){return Pn}),n.d(O,"settings",function(){return In}),n.d(O,"common",function(){return Ln}),n.d(O,"others",function(){return Mn});var j={};n.r(j),n.d(j,"name",function(){return Vn}),n.d(j,"settings",function(){return Un});var f={};n.r(f),n.d(f,"name",function(){return qn}),n.d(f,"settings",function(){return Kn});var v={};n.r(v),n.d(v,"name",function(){return nr}),n.d(v,"settings",function(){return or});var y={};n.r(y),n.d(y,"name",function(){return cr}),n.d(y,"settings",function(){return ir});var k={};n.r(k),n.d(k,"name",function(){return hr}),n.d(k,"settings",function(){return pr});var w={};n.r(w),n.d(w,"name",function(){return fr}),n.d(w,"settings",function(){return vr});var C={};n.r(C),n.d(C,"name",function(){return kr}),n.d(C,"settings",function(){return wr});var E={};n.r(E),n.d(E,"name",function(){return Er}),n.d(E,"settings",function(){return _r});var _={};n.r(_),n.d(_,"name",function(){return xr}),n.d(_,"settings",function(){return Sr});var x={};n.r(x),n.d(x,"name",function(){return Tr}),n.d(x,"settings",function(){return Nr});var S={};n.r(S),n.d(S,"name",function(){return Ir}),n.d(S,"settings",function(){return Lr});var T={};n.r(T),n.d(T,"name",function(){return Vr}),n.d(T,"settings",function(){return Ur});var N={};n.r(N),n.d(N,"name",function(){return Gr}),n.d(N,"settings",function(){return qr});var R={};n.r(R),n.d(R,"name",function(){return Kr}),n.d(R,"settings",function(){return $r});var B={};n.r(B),n.d(B,"name",function(){return Qr}),n.d(B,"settings",function(){return Yr});var A={};n.r(A),n.d(A,"name",function(){return Jr}),n.d(A,"settings",function(){return Xr});var P={};n.r(P),n.d(P,"name",function(){return eo}),n.d(P,"settings",function(){return to});var I={};n.r(I),n.d(I,"name",function(){return oo}),n.d(I,"settings",function(){return ao});var L={};n.r(L),n.d(L,"name",function(){return ho}),n.d(L,"settings",function(){return po});var M={};n.r(M),n.d(M,"name",function(){return go}),n.d(M,"settings",function(){return Oo});var z={};n.r(z),n.d(z,"name",function(){return jo}),n.d(z,"settings",function(){return fo});var H={};n.r(H),n.d(H,"name",function(){return vo}),n.d(H,"settings",function(){return yo});var D={};n.r(D),n.d(D,"name",function(){return xo}),n.d(D,"settings",function(){return So});var F={};n.r(F),n.d(F,"name",function(){return Ro}),n.d(F,"settings",function(){return Bo});var V={};n.r(V),n.d(V,"name",function(){return Io}),n.d(V,"settings",function(){return Lo});var U=n(18),W=(n(81),n(58),n(6)),G=n(14),q=n(15),K=n(8),$=n(0),Q=n(16),Y=n.n(Q),Z=n(2),J=n(1),X=n(4),ee=n(19),te=n(10),ne=n(9),re=n(11),oe=n(12),ae=n(13),ce=n(3),ie=n(7),le=n(5),se=window.getComputedStyle,ue=Object(X.withFallbackStyles)(function(e,t){var n=t.attributes,r=n.textColor,o=n.backgroundColor,a=n.fontSize,c=n.customFontSize,i=e.querySelector('[contenteditable="true"]'),l=i?se(i):null;return{fallbackBackgroundColor:o||!l?void 0:l.backgroundColor,fallbackTextColor:r||!l?void 0:l.color,fallbackFontSize:a||c||!l?void 0:parseInt(l.fontSize)||void 0}}),be=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).onReplace=e.onReplace.bind(Object(ce.a)(Object(ce.a)(e))),e.toggleDropCap=e.toggleDropCap.bind(Object(ce.a)(Object(ce.a)(e))),e.splitBlock=e.splitBlock.bind(Object(ce.a)(Object(ce.a)(e))),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"onReplace",value:function(e){var t=this.props,n=t.attributes,r=t.onReplace;r(e.map(function(e,t){return 0===t&&"core/paragraph"===e.name?Object(K.a)({},e,{attributes:Object(K.a)({},n,e.attributes)}):e}))}},{key:"toggleDropCap",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({dropCap:!t.dropCap})}},{key:"getDropCapHelp",value:function(e){return e?Object(J.__)("Showing large initial letter."):Object(J.__)("Toggle to show a large initial letter.")}},{key:"splitBlock",value:function(e,t){for(var n=this.props,r=n.attributes,o=n.insertBlocksAfter,a=n.setAttributes,c=n.onReplace,i=arguments.length,l=new Array(i>2?i-2:0),s=2;s<i;s++)l[s-2]=arguments[s];null!==t&&l.push(Object(G.createBlock)("core/paragraph",{content:t})),l.length&&o&&o(l);var u=r.content;null===e?c([]):u!==e&&a({content:e})}},{key:"render",value:function(){var e,t=this.props,n=t.attributes,r=t.setAttributes,o=t.mergeBlocks,a=t.onReplace,c=t.className,i=t.backgroundColor,l=t.textColor,s=t.setBackgroundColor,u=t.setTextColor,b=t.fallbackBackgroundColor,m=t.fallbackTextColor,d=t.fallbackFontSize,h=t.fontSize,p=t.setFontSize,g=t.isRTL,O=n.align,j=n.content,f=n.dropCap,v=n.placeholder,y=n.direction;return Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.AlignmentToolbar,{value:O,onChange:function(e){r({align:e})}}),g&&Object($.createElement)(X.Toolbar,{controls:[{icon:"editor-ltr",title:Object(J._x)("Left to right","editor button"),isActive:"ltr"===y,onClick:function(){r({direction:"ltr"===y?void 0:"ltr"})}}]})),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Text Settings"),className:"blocks-font-size"},Object($.createElement)(W.FontSizePicker,{fallbackFontSize:d,value:h.size,onChange:p}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Drop Cap"),checked:!!f,onChange:this.toggleDropCap,help:this.getDropCapHelp})),Object($.createElement)(W.PanelColorSettings,{title:Object(J.__)("Color Settings"),initialOpen:!1,colorSettings:[{value:i.color,onChange:s,label:Object(J.__)("Background Color")},{value:l.color,onChange:u,label:Object(J.__)("Text Color")}]},Object($.createElement)(W.ContrastChecker,Object(ee.a)({textColor:l.color,backgroundColor:i.color,fallbackTextColor:m,fallbackBackgroundColor:b},{fontSize:h.size})))),Object($.createElement)(W.RichText,{identifier:"content",tagName:"p",className:Y()("wp-block-paragraph",c,(e={"has-text-color":l.color,"has-background":i.color,"has-drop-cap":f},Object(q.a)(e,i.class,i.class),Object(q.a)(e,l.class,l.class),Object(q.a)(e,h.class,h.class),e)),style:{backgroundColor:i.color,color:l.color,fontSize:h.size?h.size+"px":void 0,textAlign:O,direction:y},value:j,onChange:function(e){r({content:e})},unstableOnSplit:this.splitBlock,onMerge:o,onReplace:this.onReplace,onRemove:function(){return a([])},"aria-label":j?Object(J.__)("Paragraph block"):Object(J.__)("Empty block; start writing or type forward slash to choose a block"),placeholder:v||Object(J.__)("Start writing or type / to choose a block")}))}}]),t}($.Component),me=Object(ie.compose)([Object(W.withColors)("backgroundColor",{textColor:"color"}),Object(W.withFontSizes)("fontSize"),ue,Object(le.withSelect)(function(e){return{isRTL:(0,e("core/block-editor").getSettings)().isRTL}})])(be),de={className:!1},he={content:{type:"string",source:"html",selector:"p",default:""},align:{type:"string"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},direction:{type:"string",enum:["ltr","rtl"]}},pe="core/paragraph",ge={title:Object(J.__)("Paragraph"),description:Object(J.__)("Start with the building block of all narrative."),icon:Object($.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{d:"M11 5v7H9.5C7.6 12 6 10.4 6 8.5S7.6 5 9.5 5H11m8-2H9.5C6.5 3 4 5.5 4 8.5S6.5 14 9.5 14H11v7h2V5h2v16h2V5h2V3z"})),category:"common",keywords:[Object(J.__)("text")],supports:de,attributes:he,transforms:{from:[{type:"raw",priority:20,selector:"p",schema:{p:{children:Object(G.getPhrasingContentSchema)()}}}]},deprecated:[{supports:de,attributes:Object(K.a)({},he,{width:{type:"string"}}),save:function(e){var t,n=e.attributes,r=n.width,o=n.align,a=n.content,c=n.dropCap,i=n.backgroundColor,l=n.textColor,s=n.customBackgroundColor,u=n.customTextColor,b=n.fontSize,m=n.customFontSize,d=Object(W.getColorClassName)("color",l),h=Object(W.getColorClassName)("background-color",i),p=b&&"is-".concat(b,"-text"),g=Y()((t={},Object(q.a)(t,"align".concat(r),r),Object(q.a)(t,"has-background",i||s),Object(q.a)(t,"has-drop-cap",c),Object(q.a)(t,p,p),Object(q.a)(t,d,d),Object(q.a)(t,h,h),t)),O={backgroundColor:h?void 0:s,color:d?void 0:u,fontSize:p?void 0:m,textAlign:o};return Object($.createElement)(W.RichText.Content,{tagName:"p",style:O,className:g||void 0,value:a})}},{supports:de,attributes:Object(Z.omit)(Object(K.a)({},he,{fontSize:{type:"number"}}),"customFontSize","customTextColor","customBackgroundColor"),save:function(e){var t,n=e.attributes,r=n.width,o=n.align,a=n.content,c=n.dropCap,i=n.backgroundColor,l=n.textColor,s=n.fontSize,u=Y()((t={},Object(q.a)(t,"align".concat(r),r),Object(q.a)(t,"has-background",i),Object(q.a)(t,"has-drop-cap",c),t)),b={backgroundColor:i,color:l,fontSize:s,textAlign:o};return Object($.createElement)("p",{style:b,className:u||void 0},a)},migrate:function(e){return Object(Z.omit)(Object(K.a)({},e,{customFontSize:Object(Z.isFinite)(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0}),["fontSize","textColor","backgroundColor"])}},{supports:de,attributes:Object(K.a)({},he,{content:{type:"string",source:"html",default:""}}),save:function(e){var t=e.attributes;return Object($.createElement)($.RawHTML,null,t.content)},migrate:function(e){return e}}],merge:function(e,t){return{content:e.content+t.content}},getEditWrapperProps:function(e){var t=e.width;if(-1!==["wide","full","left","right"].indexOf(t))return{"data-align":t}},edit:me,save:function(e){var t,n=e.attributes,r=n.align,o=n.content,a=n.dropCap,c=n.backgroundColor,i=n.textColor,l=n.customBackgroundColor,s=n.customTextColor,u=n.fontSize,b=n.customFontSize,m=n.direction,d=Object(W.getColorClassName)("color",i),h=Object(W.getColorClassName)("background-color",c),p=Object(W.getFontSizeClass)(u),g=Y()((t={"has-text-color":i||s,"has-background":c||l,"has-drop-cap":a},Object(q.a)(t,p,p),Object(q.a)(t,d,d),Object(q.a)(t,h,h),t)),O={backgroundColor:h?void 0:l,color:d?void 0:s,fontSize:p?void 0:b,textAlign:r};return Object($.createElement)(W.RichText.Content,{tagName:"p",style:O,className:g||void 0,value:o,dir:m})}},Oe=n(32),je=n(25),fe=n(22),ve=n(37),ye=Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(X.Path,{d:"M19,4H5C3.89,4,3,4.9,3,6v12c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V6C21,4.9,20.11,4,19,4z M19,18H5V8h14V18z"})),ke=Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.Path,{d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM8 15c0-1.66 1.34-3 3-3 .35 0 .69.07 1 .18V6h5v2h-3v7.03c-.02 1.64-1.35 2.97-3 2.97-1.66 0-3-1.34-3-3z"})),we=Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(X.Path,{d:"M21,4H3C1.9,4,1,4.9,1,6v12c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V6C23,4.9,22.1,4,21,4z M21,18H3V6h18V18z"}),Object($.createElement)(X.Polygon,{points:"14.5 11 11 15.51 8.5 12.5 5 17 19 17"})),Ce=Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(X.Path,{d:"m10 8v8l5-4-5-4zm9-5h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2zm0 16h-14v-14h14v14z"})),Ee={foreground:"#1da1f2",src:Object($.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z"})))},_e={foreground:"#ff0000",src:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{d:"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"}))},xe={foreground:"#3b5998",src:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"}))},Se=Object($.createElement)(X.SVG,{viewBox:"0 0 24 24"},Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"}))),Te={foreground:"#0073AA",src:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24"},Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"})))},Ne={foreground:"#1db954",src:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325"}))},Re=Object($.createElement)(X.SVG,{viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{d:"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z"})),Be={foreground:"#1ab7ea",src:Object($.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z"})))},Ae=Object($.createElement)(X.SVG,{viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{d:"M22 11.816c0-1.256-1.02-2.277-2.277-2.277-.593 0-1.122.24-1.526.613-1.48-.965-3.455-1.594-5.647-1.69l1.17-3.702 3.18.75c.01 1.027.847 1.86 1.877 1.86 1.035 0 1.877-.84 1.877-1.877 0-1.035-.842-1.877-1.877-1.877-.77 0-1.43.466-1.72 1.13L13.55 3.92c-.204-.047-.4.067-.46.26l-1.35 4.27c-2.317.037-4.412.67-5.97 1.67-.402-.355-.917-.58-1.493-.58C3.02 9.54 2 10.56 2 11.815c0 .814.433 1.523 1.078 1.925-.037.222-.06.445-.06.673 0 3.292 4.01 5.97 8.94 5.97s8.94-2.678 8.94-5.97c0-.214-.02-.424-.052-.632.687-.39 1.154-1.12 1.154-1.964zm-3.224-7.422c.606 0 1.1.493 1.1 1.1s-.493 1.1-1.1 1.1-1.1-.494-1.1-1.1.493-1.1 1.1-1.1zm-16 7.422c0-.827.673-1.5 1.5-1.5.313 0 .598.103.838.27-.85.675-1.477 1.478-1.812 2.36-.32-.274-.525-.676-.525-1.13zm9.183 7.79c-4.502 0-8.165-2.33-8.165-5.193S7.457 9.22 11.96 9.22s8.163 2.33 8.163 5.193-3.663 5.193-8.164 5.193zM20.635 13c-.326-.89-.948-1.7-1.797-2.383.247-.186.55-.3.882-.3.827 0 1.5.672 1.5 1.5 0 .482-.23.91-.586 1.184zm-11.64 1.704c-.76 0-1.397-.616-1.397-1.376 0-.76.636-1.397 1.396-1.397.76 0 1.376.638 1.376 1.398 0 .76-.616 1.376-1.376 1.376zm7.405-1.376c0 .76-.615 1.376-1.375 1.376s-1.4-.616-1.4-1.376c0-.76.64-1.397 1.4-1.397.76 0 1.376.638 1.376 1.398zm-1.17 3.38c.15.152.15.398 0 .55-.675.674-1.728 1.002-3.22 1.002l-.01-.002-.012.002c-1.492 0-2.544-.328-3.218-1.002-.152-.152-.152-.398 0-.55.152-.152.4-.15.55 0 .52.52 1.394.775 2.67.775l.01.002.01-.002c1.276 0 2.15-.253 2.67-.775.15-.152.398-.152.55 0z"})),Pe={foreground:"#35465c",src:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-5.57 14.265c-2.445.042-3.37-1.742-3.37-2.998V10.6H8.922V9.15c1.703-.615 2.113-2.15 2.21-3.026.006-.06.053-.084.08-.084h1.645V8.9h2.246v1.7H12.85v3.495c.008.476.182 1.13 1.08 1.107.3-.008.698-.094.907-.194l.54 1.6c-.205.297-1.12.642-1.946.657z"}))},Ie=Object($.createElement)(X.SVG,{viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{d:"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z"}),Object($.createElement)(X.Path,{d:"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z"}),Object($.createElement)(X.Path,{d:"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z"})),Le=[{name:"core-embed/twitter",settings:{title:"Twitter",icon:Ee,keywords:["tweet"],description:Object(J.__)("Embed a tweet.")},patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i]},{name:"core-embed/youtube",settings:{title:"YouTube",icon:_e,keywords:[Object(J.__)("music"),Object(J.__)("video")],description:Object(J.__)("Embed a YouTube video.")},patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i]},{name:"core-embed/facebook",settings:{title:"Facebook",icon:xe,description:Object(J.__)("Embed a Facebook post.")},patterns:[/^https?:\/\/www\.facebook.com\/.+/i]},{name:"core-embed/instagram",settings:{title:"Instagram",icon:Se,keywords:[Object(J.__)("image")],description:Object(J.__)("Embed an Instagram post.")},patterns:[/^https?:\/\/(www\.)?instagr(\.am|am\.com)\/.+/i]},{name:"core-embed/wordpress",settings:{title:"WordPress",icon:Te,keywords:[Object(J.__)("post"),Object(J.__)("blog")],responsive:!1,description:Object(J.__)("Embed a WordPress post.")}},{name:"core-embed/soundcloud",settings:{title:"SoundCloud",icon:ke,keywords:[Object(J.__)("music"),Object(J.__)("audio")],description:Object(J.__)("Embed SoundCloud content.")},patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i]},{name:"core-embed/spotify",settings:{title:"Spotify",icon:Ne,keywords:[Object(J.__)("music"),Object(J.__)("audio")],description:Object(J.__)("Embed Spotify content.")},patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i]},{name:"core-embed/flickr",settings:{title:"Flickr",icon:Re,keywords:[Object(J.__)("image")],description:Object(J.__)("Embed Flickr content.")},patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i]},{name:"core-embed/vimeo",settings:{title:"Vimeo",icon:Be,keywords:[Object(J.__)("video")],description:Object(J.__)("Embed a Vimeo video.")},patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i]}],Me=[{name:"core-embed/animoto",settings:{title:"Animoto",icon:Ce,description:Object(J.__)("Embed an Animoto video.")},patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i]},{name:"core-embed/cloudup",settings:{title:"Cloudup",icon:ye,description:Object(J.__)("Embed Cloudup content.")},patterns:[/^https?:\/\/cloudup\.com\/.+/i]},{name:"core-embed/collegehumor",settings:{title:"CollegeHumor",icon:Ce,description:Object(J.__)("Embed CollegeHumor content.")},patterns:[/^https?:\/\/(www\.)?collegehumor\.com\/.+/i]},{name:"core-embed/crowdsignal",settings:{title:"Crowdsignal",icon:ye,keywords:["polldaddy"],transform:[{type:"block",blocks:["core-embed/polldaddy"],transform:function(e){return Object(G.createBlock)("core-embed/crowdsignal",{content:e})}}],description:Object(J.__)("Embed Crowdsignal (formerly Polldaddy) content.")},patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.survey\.fm)\/.+/i]},{name:"core-embed/dailymotion",settings:{title:"Dailymotion",icon:Ce,description:Object(J.__)("Embed a Dailymotion video.")},patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i]},{name:"core-embed/hulu",settings:{title:"Hulu",icon:Ce,description:Object(J.__)("Embed Hulu content.")},patterns:[/^https?:\/\/(www\.)?hulu\.com\/.+/i]},{name:"core-embed/imgur",settings:{title:"Imgur",icon:we,description:Object(J.__)("Embed Imgur content.")},patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i]},{name:"core-embed/issuu",settings:{title:"Issuu",icon:ye,description:Object(J.__)("Embed Issuu content.")},patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i]},{name:"core-embed/kickstarter",settings:{title:"Kickstarter",icon:ye,description:Object(J.__)("Embed Kickstarter content.")},patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i]},{name:"core-embed/meetup-com",settings:{title:"Meetup.com",icon:ye,description:Object(J.__)("Embed Meetup.com content.")},patterns:[/^https?:\/\/(www\.)?meetu(\.ps|p\.com)\/.+/i]},{name:"core-embed/mixcloud",settings:{title:"Mixcloud",icon:ke,keywords:[Object(J.__)("music"),Object(J.__)("audio")],description:Object(J.__)("Embed Mixcloud content.")},patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i]},{name:"core-embed/polldaddy",settings:{title:"Polldaddy",icon:ye,description:Object(J.__)("Embed Polldaddy content."),supports:{inserter:!1}},patterns:[]},{name:"core-embed/reddit",settings:{title:"Reddit",icon:Ae,description:Object(J.__)("Embed a Reddit thread.")},patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i]},{name:"core-embed/reverbnation",settings:{title:"ReverbNation",icon:ke,description:Object(J.__)("Embed ReverbNation content.")},patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i]},{name:"core-embed/screencast",settings:{title:"Screencast",icon:Ce,description:Object(J.__)("Embed Screencast content.")},patterns:[/^https?:\/\/(www\.)?screencast\.com\/.+/i]},{name:"core-embed/scribd",settings:{title:"Scribd",icon:ye,description:Object(J.__)("Embed Scribd content.")},patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i]},{name:"core-embed/slideshare",settings:{title:"Slideshare",icon:ye,description:Object(J.__)("Embed Slideshare content.")},patterns:[/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i]},{name:"core-embed/smugmug",settings:{title:"SmugMug",icon:we,description:Object(J.__)("Embed SmugMug content.")},patterns:[/^https?:\/\/(www\.)?smugmug\.com\/.+/i]},{name:"core-embed/speaker",settings:{title:"Speaker",icon:ke,supports:{inserter:!1}},patterns:[]},{name:"core-embed/speaker-deck",settings:{title:"Speaker Deck",icon:ye,transform:[{type:"block",blocks:["core-embed/speaker"],transform:function(e){return Object(G.createBlock)("core-embed/speaker-deck",{content:e})}}],description:Object(J.__)("Embed Speaker Deck content.")},patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i]},{name:"core-embed/ted",settings:{title:"TED",icon:Ce,description:Object(J.__)("Embed a TED video.")},patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i]},{name:"core-embed/tumblr",settings:{title:"Tumblr",icon:Pe,description:Object(J.__)("Embed a Tumblr post.")},patterns:[/^https?:\/\/(www\.)?tumblr\.com\/.+/i]},{name:"core-embed/videopress",settings:{title:"VideoPress",icon:Ce,keywords:[Object(J.__)("video")],description:Object(J.__)("Embed a VideoPress video.")},patterns:[/^https?:\/\/videopress\.com\/.+/i]},{name:"core-embed/wordpress-tv",settings:{title:"WordPress.tv",icon:Ce,description:Object(J.__)("Embed a WordPress.tv video.")},patterns:[/^https?:\/\/wordpress\.tv\/.+/i]},{name:"core-embed/amazon-kindle",settings:{title:"Amazon Kindle",icon:Ie,keywords:[Object(J.__)("ebook")],responsive:!1,description:Object(J.__)("Embed Amazon Kindle content.")},patterns:[/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,/^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i]}],ze=["facebook.com","smugmug.com"],He=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],De=n(62),Fe=n.n(De),Ve=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).some(function(t){return e.match(t)})},Ue=function(e){return Object(Z.includes)(e,'class="wp-embedded-content" data-secret')},We=function(e,t){var n=e.preview,r=e.name,o=e.attributes.url;if(o){var a=function(e){for(var t=[].concat(Object(U.a)(Le),Object(U.a)(Me)),n=0;n<t.length;n++){var r=t[n];if(Ve(e,r.patterns))return r.name}return"core/embed"}(o);if("core-embed/wordpress"!==r&&"core/embed"!==a&&r!==a)return Object(G.createBlock)(a,{url:o});if(n){var c=n.html;if(Ue(c)&&"core-embed/wordpress"!==r)return Object(G.createBlock)("core-embed/wordpress",Object(K.a)({url:o},t))}}};function Ge(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n){for(var r={"wp-has-aspect-ratio":!1},o=0;o<He.length;o++){r[He[o].className]=!1}return Fe()(t,r)}var a=document.implementation.createHTMLDocument("");a.body.innerHTML=e;var c=a.body.querySelector("iframe");if(c&&c.height&&c.width)for(var i=(c.width/c.height).toFixed(2),l=0;l<He.length;l++){var s,u=He[l];if(i>=u.ratio)return Fe()(t,(s={},Object(q.a)(s,u.className,n),Object(q.a)(s,"wp-has-aspect-ratio",n),s))}return t}var qe=Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(X.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),Object($.createElement)(X.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"}));var Ke=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).state={width:void 0,height:void 0},e.bindContainer=e.bindContainer.bind(Object(ce.a)(Object(ce.a)(e))),e.calculateSize=e.calculateSize.bind(Object(ce.a)(Object(ce.a)(e))),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"componentDidUpdate",value:function(e){this.props.src!==e.src&&(this.setState({width:void 0,height:void 0}),this.fetchImageSize()),this.props.dirtynessTrigger!==e.dirtynessTrigger&&this.calculateSize()}},{key:"componentDidMount",value:function(){this.fetchImageSize()}},{key:"componentWillUnmount",value:function(){this.image&&(this.image.onload=Z.noop)}},{key:"fetchImageSize",value:function(){this.image=new window.Image,this.image.onload=this.calculateSize,this.image.src=this.props.src}},{key:"calculateSize",value:function(){var e,t,n,r,o,a=(e=this.image,t=this.container,n=t.clientWidth,r=e.width>n,o=e.height/e.width,{width:r?n:e.width,height:r?n*o:e.height}),c=a.width,i=a.height;this.setState({width:c,height:i})}},{key:"render",value:function(){var e={imageWidth:this.image&&this.image.width,imageHeight:this.image&&this.image.height,containerWidth:this.container&&this.container.clientWidth,containerHeight:this.container&&this.container.clientHeight,imageWidthWithinContainer:this.state.width,imageHeightWithinContainer:this.state.height};return Object($.createElement)("div",{ref:this.bindContainer},this.props.children(e))}}]),t}($.Component),$e=Object(ie.withGlobalEvents)({resize:"calculateSize"})(Ke),Qe=["image"],Ye=function(e){var t=Object(Z.pick)(e,["alt","id","link","caption"]);return t.url=Object(Z.get)(e,["sizes","large","url"])||Object(Z.get)(e,["media_details","sizes","large","source_url"])||e.url,t},Ze=function(e,t){return!e&&Object(Oe.isBlobURL)(t)},Je=function(e){function t(e){var n,r=e.attributes;return Object(te.a)(this,t),(n=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).updateAlt=n.updateAlt.bind(Object(ce.a)(Object(ce.a)(n))),n.updateAlignment=n.updateAlignment.bind(Object(ce.a)(Object(ce.a)(n))),n.onFocusCaption=n.onFocusCaption.bind(Object(ce.a)(Object(ce.a)(n))),n.onImageClick=n.onImageClick.bind(Object(ce.a)(Object(ce.a)(n))),n.onSelectImage=n.onSelectImage.bind(Object(ce.a)(Object(ce.a)(n))),n.onSelectURL=n.onSelectURL.bind(Object(ce.a)(Object(ce.a)(n))),n.updateImageURL=n.updateImageURL.bind(Object(ce.a)(Object(ce.a)(n))),n.updateWidth=n.updateWidth.bind(Object(ce.a)(Object(ce.a)(n))),n.updateHeight=n.updateHeight.bind(Object(ce.a)(Object(ce.a)(n))),n.updateDimensions=n.updateDimensions.bind(Object(ce.a)(Object(ce.a)(n))),n.onSetCustomHref=n.onSetCustomHref.bind(Object(ce.a)(Object(ce.a)(n))),n.onSetLinkClass=n.onSetLinkClass.bind(Object(ce.a)(Object(ce.a)(n))),n.onSetLinkRel=n.onSetLinkRel.bind(Object(ce.a)(Object(ce.a)(n))),n.onSetLinkDestination=n.onSetLinkDestination.bind(Object(ce.a)(Object(ce.a)(n))),n.onSetNewTab=n.onSetNewTab.bind(Object(ce.a)(Object(ce.a)(n))),n.getFilename=n.getFilename.bind(Object(ce.a)(Object(ce.a)(n))),n.toggleIsEditing=n.toggleIsEditing.bind(Object(ce.a)(Object(ce.a)(n))),n.onUploadError=n.onUploadError.bind(Object(ce.a)(Object(ce.a)(n))),n.onImageError=n.onImageError.bind(Object(ce.a)(Object(ce.a)(n))),n.state={captionFocused:!1,isEditing:!r.url},n}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.setAttributes,o=t.noticeOperations,a=n.id,c=n.url,i=void 0===c?"":c;if(Ze(a,i)){var l=Object(Oe.getBlobByURL)(i);l&&Object(W.mediaUpload)({filesList:[l],onFileChange:function(e){var t=Object(je.a)(e,1)[0];r(Ye(t))},allowedTypes:Qe,onError:function(t){o.createErrorNotice(t),e.setState({isEditing:!0})}})}}},{key:"componentDidUpdate",value:function(e){var t=e.attributes,n=t.id,r=t.url,o=void 0===r?"":r,a=this.props.attributes,c=a.id,i=a.url,l=void 0===i?"":i;Ze(n,o)&&!Ze(c,l)&&Object(Oe.revokeBlobURL)(l),!this.props.isSelected&&e.isSelected&&this.state.captionFocused&&this.setState({captionFocused:!1})}},{key:"onUploadError",value:function(e){this.props.noticeOperations.createErrorNotice(e),this.setState({isEditing:!0})}},{key:"onSelectImage",value:function(e){e&&e.url?(this.setState({isEditing:!1}),this.props.setAttributes(Object(K.a)({},Ye(e),{width:void 0,height:void 0}))):this.props.setAttributes({url:void 0,alt:void 0,id:void 0,caption:void 0})}},{key:"onSetLinkDestination",value:function(e){var t;t="none"===e?void 0:"media"===e?this.props.image&&this.props.image.source_url||this.props.attributes.url:"attachment"===e?this.props.image&&this.props.image.link:this.props.attributes.href,this.props.setAttributes({linkDestination:e,href:t})}},{key:"onSelectURL",value:function(e){e!==this.props.attributes.url&&this.props.setAttributes({url:e,id:void 0}),this.setState({isEditing:!1})}},{key:"onImageError",value:function(e){var t=We({attributes:{url:e}});void 0!==t&&this.props.onReplace(t)}},{key:"onSetCustomHref",value:function(e){this.props.setAttributes({href:e})}},{key:"onSetLinkClass",value:function(e){this.props.setAttributes({linkClass:e})}},{key:"onSetLinkRel",value:function(e){this.props.setAttributes({rel:e})}},{key:"onSetNewTab",value:function(e){var t=this.props.attributes.rel,n=e?"_blank":void 0,r=t;n&&!t?r="noreferrer noopener":n||"noreferrer noopener"!==t||(r=void 0),this.props.setAttributes({linkTarget:n,rel:r})}},{key:"onFocusCaption",value:function(){this.state.captionFocused||this.setState({captionFocused:!0})}},{key:"onImageClick",value:function(){this.state.captionFocused&&this.setState({captionFocused:!1})}},{key:"updateAlt",value:function(e){this.props.setAttributes({alt:e})}},{key:"updateAlignment",value:function(e){var t=-1!==["wide","full"].indexOf(e)?{width:void 0,height:void 0}:{};this.props.setAttributes(Object(K.a)({},t,{align:e}))}},{key:"updateImageURL",value:function(e){this.props.setAttributes({url:e,width:void 0,height:void 0})}},{key:"updateWidth",value:function(e){this.props.setAttributes({width:parseInt(e,10)})}},{key:"updateHeight",value:function(e){this.props.setAttributes({height:parseInt(e,10)})}},{key:"updateDimensions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return function(){e.props.setAttributes({width:t,height:n})}}},{key:"getFilename",value:function(e){var t=Object(fe.getPath)(e);if(t)return Object(Z.last)(t.split("/"))}},{key:"getLinkDestinationOptions",value:function(){return[{value:"none",label:Object(J.__)("None")},{value:"media",label:Object(J.__)("Media File")},{value:"attachment",label:Object(J.__)("Attachment Page")},{value:"custom",label:Object(J.__)("Custom URL")}]}},{key:"toggleIsEditing",value:function(){this.setState({isEditing:!this.state.isEditing})}},{key:"getImageSizeOptions",value:function(){var e=this.props,t=e.imageSizes,n=e.image;return Object(Z.compact)(Object(Z.map)(t,function(e){var t=e.name,r=e.slug,o=Object(Z.get)(n,["media_details","sizes",r,"source_url"]);return o?{value:o,label:t}:null}))}},{key:"render",value:function(){var e,t=this,n=this.state.isEditing,r=this.props,o=r.attributes,a=r.setAttributes,c=r.isLargeViewport,i=r.isSelected,l=r.className,s=r.maxWidth,u=r.noticeUI,b=r.toggleSelection,m=r.isRTL,d=o.url,h=o.alt,p=o.caption,g=o.align,O=o.id,j=o.href,f=o.rel,v=o.linkClass,y=o.linkDestination,k=o.width,w=o.height,C=o.linkTarget,E=function(e,t){return t&&!e&&!Object(Oe.isBlobURL)(t)}(O,d);d&&(e=E?Object($.createElement)(X.Toolbar,null,Object($.createElement)(X.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(J.__)("Edit image"),onClick:this.toggleIsEditing,icon:"edit"})):Object($.createElement)(W.MediaUploadCheck,null,Object($.createElement)(X.Toolbar,null,Object($.createElement)(W.MediaUpload,{onSelect:this.onSelectImage,allowedTypes:Qe,value:O,render:function(e){var t=e.open;return Object($.createElement)(X.IconButton,{className:"components-toolbar__control",label:Object(J.__)("Edit image"),icon:"edit",onClick:t})}}))));var _=Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.BlockAlignmentToolbar,{value:g,onChange:this.updateAlignment}),e);if(n||!d){var x=E?d:void 0;return Object($.createElement)($.Fragment,null,_,Object($.createElement)(W.MediaPlaceholder,{icon:Object($.createElement)(W.BlockIcon,{icon:qe}),className:l,onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,notices:u,onError:this.onUploadError,accept:"image/*",allowedTypes:Qe,value:{id:O,src:x}}))}var S=Y()(l,{"is-transient":Object(Oe.isBlobURL)(d),"is-resized":!!k||!!w,"is-focused":i}),T=-1===["wide","full"].indexOf(g)&&c,N="custom"!==y,R=this.getImageSizeOptions(),B=function(e,n){return Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Image Settings")},Object($.createElement)(X.TextareaControl,{label:Object(J.__)("Alt Text (Alternative Text)"),value:h,onChange:t.updateAlt,help:Object(J.__)("Alternative text describes your image to people who cant see it. Add a short description with its key details.")}),!Object(Z.isEmpty)(R)&&Object($.createElement)(X.SelectControl,{label:Object(J.__)("Image Size"),value:d,options:R,onChange:t.updateImageURL}),T&&Object($.createElement)("div",{className:"block-library-image__dimensions"},Object($.createElement)("p",{className:"block-library-image__dimensions__row"},Object(J.__)("Image Dimensions")),Object($.createElement)("div",{className:"block-library-image__dimensions__row"},Object($.createElement)(X.TextControl,{type:"number",className:"block-library-image__dimensions__width",label:Object(J.__)("Width"),value:void 0!==k?k:e,min:1,onChange:t.updateWidth}),Object($.createElement)(X.TextControl,{type:"number",className:"block-library-image__dimensions__height",label:Object(J.__)("Height"),value:void 0!==w?w:n,min:1,onChange:t.updateHeight})),Object($.createElement)("div",{className:"block-library-image__dimensions__row"},Object($.createElement)(X.ButtonGroup,{"aria-label":Object(J.__)("Image Size")},[25,50,75,100].map(function(r){var o=Math.round(e*(r/100)),a=Math.round(n*(r/100)),c=k===o&&w===a;return Object($.createElement)(X.Button,{key:r,isSmall:!0,isPrimary:c,"aria-pressed":c,onClick:t.updateDimensions(o,a)},r,"%")})),Object($.createElement)(X.Button,{isSmall:!0,onClick:t.updateDimensions()},Object(J.__)("Reset"))))),Object($.createElement)(X.PanelBody,{title:Object(J.__)("Link Settings")},Object($.createElement)(X.SelectControl,{label:Object(J.__)("Link To"),value:y,options:t.getLinkDestinationOptions(),onChange:t.onSetLinkDestination}),"none"!==y&&Object($.createElement)($.Fragment,null,Object($.createElement)(X.TextControl,{label:Object(J.__)("Link URL"),value:j||"",onChange:t.onSetCustomHref,placeholder:N?void 0:"https://",readOnly:N}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Open in New Tab"),onChange:t.onSetNewTab,checked:"_blank"===C}),Object($.createElement)(X.TextControl,{label:Object(J.__)("Link CSS Class"),value:v||"",onChange:t.onSetLinkClass}),Object($.createElement)(X.TextControl,{label:Object(J.__)("Link Rel"),value:f||"",onChange:t.onSetLinkRel}))))};return Object($.createElement)($.Fragment,null,_,Object($.createElement)("figure",{className:S},Object($.createElement)($e,{src:d,dirtynessTrigger:g},function(e){var n,r=e.imageWidthWithinContainer,o=e.imageHeightWithinContainer,c=e.imageWidth,i=e.imageHeight,l=t.getFilename(d);n=h||(l?Object(J.sprintf)(Object(J.__)("This image has an empty alt attribute; its file name is %s"),l):Object(J.__)("This image has an empty alt attribute"));var u=Object($.createElement)($.Fragment,null,Object($.createElement)("img",{src:d,alt:n,onClick:t.onImageClick,onError:function(){return t.onImageError(d)}}),Object(Oe.isBlobURL)(d)&&Object($.createElement)(X.Spinner,null));if(!T||!r)return Object($.createElement)($.Fragment,null,B(c,i),Object($.createElement)("div",{style:{width:k,height:w}},u));var p=k||r,O=w||o,j=c/i,f=c<i?20:20*j,v=i<c?20:20/j,y=2.5*s,C=!1,E=!1;return"center"===g?(C=!0,E=!0):m?"left"===g?C=!0:E=!0:"right"===g?E=!0:C=!0,Object($.createElement)($.Fragment,null,B(c,i),Object($.createElement)(X.ResizableBox,{size:k&&w?{width:k,height:w}:void 0,minWidth:f,maxWidth:y,minHeight:v,maxHeight:y/j,lockAspectRatio:!0,enable:{top:!1,right:C,bottom:!0,left:E},onResizeStart:function(){b(!1)},onResizeStop:function(e,t,n,r){a({width:parseInt(p+r.width,10),height:parseInt(O+r.height,10)}),b(!0)}},u))}),(!W.RichText.isEmpty(p)||i)&&Object($.createElement)(W.RichText,{tagName:"figcaption",placeholder:Object(J.__)("Write caption…"),value:p,unstableOnFocus:this.onFocusCaption,onChange:function(e){return a({caption:e})},isSelected:this.state.captionFocused,inlineToolbar:!0})))}}]),t}($.Component),Xe=Object(ie.compose)([Object(le.withSelect)(function(e,t){var n=e("core").getMedia,r=e("core/block-editor").getSettings,o=t.attributes.id,a=r(),c=a.maxWidth,i=a.isRTL,l=a.imageSizes;return{image:o?n(o):null,maxWidth:c,isRTL:i,imageSizes:l}}),Object(ve.withViewportMatch)({isLargeViewport:"medium"}),X.withNotices])(Je),et="core/image",tt={url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string",default:"none"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},nt={img:{attributes:["src","alt"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},rt={figure:{require:["img"],children:Object(K.a)({},nt,{a:{attributes:["href","rel","target"],children:nt},figcaption:{children:Object(G.getPhrasingContentSchema)()}})}};function ot(e,t){var n=document.implementation.createHTMLDocument("").body;n.innerHTML=e;var r=n.firstElementChild;if(r&&"A"===r.nodeName)return r.getAttribute(t)||void 0}var at={title:Object(J.__)("Image"),description:Object(J.__)("Insert an image to make a visual statement."),icon:qe,category:"common",keywords:["img",Object(J.__)("photo")],attributes:tt,transforms:{from:[{type:"raw",isMatch:function(e){return"FIGURE"===e.nodeName&&!!e.querySelector("img")},schema:rt,transform:function(e){var t=e.className+" "+e.querySelector("img").className,n=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),r=n?n[1]:void 0,o=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),a=o?Number(o[1]):void 0,c=e.querySelector("a"),i=c&&c.href?"custom":void 0,l=c&&c.href?c.href:void 0,s=c&&c.rel?c.rel:void 0,u=c&&c.className?c.className:void 0,b=Object(G.getBlockAttributes)("core/image",e.outerHTML,{align:r,id:a,linkDestination:i,href:l,rel:s,linkClass:u});return Object(G.createBlock)("core/image",b)}},{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("image/")},transform:function(e){var t=e[0];return Object(G.createBlock)("core/image",{url:Object(Oe.createBlobURL)(t)})}},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,t){var n=t.shortcode,r=document.implementation.createHTMLDocument("").body;return r.innerHTML=n.content,r.removeChild(r.firstElementChild),r.innerHTML.trim()}},href:{shortcode:function(e,t){return ot(t.shortcode.content,"href")}},rel:{shortcode:function(e,t){return ot(t.shortcode.content,"rel")}},linkClass:{shortcode:function(e,t){return ot(t.shortcode.content,"class")}},id:{type:"number",shortcode:function(e){var t=e.named.id;if(t)return parseInt(t.replace("attachment_",""),10)}},align:{type:"string",shortcode:function(e){var t=e.named.align;return(void 0===t?"alignnone":t).replace("align","")}}}}]},getEditWrapperProps:function(e){var t=e.align,n=e.width;if("left"===t||"center"===t||"right"===t||"wide"===t||"full"===t)return{"data-align":t,"data-resized":!!n}},edit:Xe,save:function(e){var t,n=e.attributes,r=n.url,o=n.alt,a=n.caption,c=n.align,i=n.href,l=n.rel,s=n.linkClass,u=n.width,b=n.height,m=n.id,d=n.linkTarget,h=Y()((t={},Object(q.a)(t,"align".concat(c),c),Object(q.a)(t,"is-resized",u||b),t)),p=Object($.createElement)("img",{src:r,alt:o,className:m?"wp-image-".concat(m):null,width:u,height:b}),g=Object($.createElement)($.Fragment,null,i?Object($.createElement)("a",{className:s,href:i,target:d,rel:l},p):p,!W.RichText.isEmpty(a)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:a}));return"left"===c||"right"===c||"center"===c?Object($.createElement)("div",null,Object($.createElement)("figure",{className:h},g)):Object($.createElement)("figure",{className:h},g)},deprecated:[{attributes:tt,save:function(e){var t,n=e.attributes,r=n.url,o=n.alt,a=n.caption,c=n.align,i=n.href,l=n.width,s=n.height,u=n.id,b=Y()((t={},Object(q.a)(t,"align".concat(c),c),Object(q.a)(t,"is-resized",l||s),t)),m=Object($.createElement)("img",{src:r,alt:o,className:u?"wp-image-".concat(u):null,width:l,height:s});return Object($.createElement)("figure",{className:b},i?Object($.createElement)("a",{href:i},m):m,!W.RichText.isEmpty(a)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:a}))}},{attributes:tt,save:function(e){var t=e.attributes,n=t.url,r=t.alt,o=t.caption,a=t.align,c=t.href,i=t.width,l=t.height,s=t.id,u=Object($.createElement)("img",{src:n,alt:r,className:s?"wp-image-".concat(s):null,width:i,height:l});return Object($.createElement)("figure",{className:a?"align".concat(a):null},c?Object($.createElement)("a",{href:c},u):u,!W.RichText.isEmpty(o)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:o}))}},{attributes:tt,save:function(e){var t=e.attributes,n=t.url,r=t.alt,o=t.caption,a=t.align,c=t.href,i=t.width,l=t.height,s=i||l?{width:i,height:l}:{},u=Object($.createElement)("img",Object(ee.a)({src:n,alt:r},s)),b={};return i?b={width:i}:"left"!==a&&"right"!==a||(b={maxWidth:"50%"}),Object($.createElement)("figure",{className:a?"align".concat(a):null,style:b},c?Object($.createElement)("a",{href:c},u):u,!W.RichText.isEmpty(o)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:o}))}}]},ct=n(21),it=function(e){function t(){return Object(te.a)(this,t),Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"createLevelControl",value:function(e,t,n){return{icon:"heading",title:Object(J.sprintf)(Object(J.__)("Heading %d"),e),isActive:e===t,onClick:function(){return n(e)},subscript:String(e)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.minLevel,r=t.maxLevel,o=t.selectedLevel,a=t.onChange;return Object($.createElement)(X.Toolbar,{controls:Object(Z.range)(n,r).map(function(t){return e.createLevelControl(t,o,a)})})}}]),t}($.Component);function lt(e){return Number(e.substr(1))}var st,ut={className:!1,anchor:!0},bt={content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},align:{type:"string"},placeholder:{type:"string"}},mt="core/heading",dt={title:Object(J.__)("Heading"),description:Object(J.__)("Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content."),icon:Object($.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{d:"M5 4v3h5.5v12h3V7H19V4z"}),Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"})),category:"common",keywords:[Object(J.__)("title"),Object(J.__)("subtitle")],supports:ut,attributes:bt,transforms:{from:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.content;return Object(G.createBlock)("core/heading",{content:t})}},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:{h1:{children:Object(G.getPhrasingContentSchema)()},h2:{children:Object(G.getPhrasingContentSchema)()},h3:{children:Object(G.getPhrasingContentSchema)()},h4:{children:Object(G.getPhrasingContentSchema)()},h5:{children:Object(G.getPhrasingContentSchema)()},h6:{children:Object(G.getPhrasingContentSchema)()}},transform:function(e){return Object(G.createBlock)("core/heading",Object(K.a)({},Object(G.getBlockAttributes)("core/heading",e.outerHTML),{level:lt(e.nodeName)}))}}].concat(Object(U.a)([2,3,4,5,6].map(function(e){return{type:"prefix",prefix:Array(e+1).join("#"),transform:function(t){return Object(G.createBlock)("core/heading",{level:e,content:t})}}}))),to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.content;return Object(G.createBlock)("core/paragraph",{content:t})}}]},deprecated:[{supports:ut,attributes:Object(K.a)({},Object(Z.omit)(bt,["level"]),{nodeName:{type:"string",source:"property",selector:"h1,h2,h3,h4,h5,h6",property:"nodeName",default:"H2"}}),migrate:function(e){var t=e.nodeName,n=Object(ct.a)(e,["nodeName"]);return Object(K.a)({},n,{level:lt(t)})},save:function(e){var t=e.attributes,n=t.align,r=t.nodeName,o=t.content;return Object($.createElement)(W.RichText.Content,{tagName:r.toLowerCase(),style:{textAlign:n},value:o})}}],merge:function(e,t){return{content:e.content+t.content}},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.mergeBlocks,o=e.insertBlocksAfter,a=e.onReplace,c=e.className,i=t.align,l=t.content,s=t.level,u=t.placeholder,b="h"+s;return Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(it,{minLevel:2,maxLevel:5,selectedLevel:s,onChange:function(e){return n({level:e})}})),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Heading Settings")},Object($.createElement)("p",null,Object(J.__)("Level")),Object($.createElement)(it,{minLevel:1,maxLevel:7,selectedLevel:s,onChange:function(e){return n({level:e})}}),Object($.createElement)("p",null,Object(J.__)("Text Alignment")),Object($.createElement)(W.AlignmentToolbar,{value:i,onChange:function(e){n({align:e})}}))),Object($.createElement)(W.RichText,{identifier:"content",wrapperClassName:"wp-block-heading",tagName:b,value:l,onChange:function(e){return n({content:e})},onMerge:r,unstableOnSplit:o?function(e,t){n({content:e});for(var r=arguments.length,a=new Array(r>2?r-2:0),c=2;c<r;c++)a[c-2]=arguments[c];o([].concat(a,[Object(G.createBlock)("core/paragraph",{content:t})]))}:void 0,onRemove:function(){return a([])},style:{textAlign:i},className:c,placeholder:u||Object(J.__)("Write heading…")}))},save:function(e){var t=e.attributes,n=t.align,r=t.level,o=t.content,a="h"+r;return Object($.createElement)(W.RichText.Content,{tagName:a,style:{textAlign:n},value:o})}},ht=n(20),pt=(st={},Object(q.a)(st,"value",{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""}),Object(q.a)(st,"citation",{type:"string",source:"html",selector:"cite",default:""}),Object(q.a)(st,"align",{type:"string"}),st),gt="core/quote",Ot={title:Object(J.__)("Quote"),description:Object(J.__)('Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar'),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.Path,{d:"M18.62 18h-5.24l2-4H13V6h8v7.24L18.62 18zm-2-2h.76L19 12.76V8h-4v4h3.62l-2 4zm-8 2H3.38l2-4H3V6h8v7.24L8.62 18zm-2-2h.76L9 12.76V8H5v4h3.62l-2 4z"})),category:"common",keywords:[Object(J.__)("blockquote")],attributes:pt,styles:[{name:"default",label:Object(J._x)("Default","block style"),isDefault:!0},{name:"large",label:Object(J._x)("Large","block style")}],transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/quote",{value:Object(ht.toHTMLString)({value:Object(ht.join)(e.map(function(e){var t=e.content;return Object(ht.create)({html:t})}),"\u2028"),multilineTag:"p"})})}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.content;return Object(G.createBlock)("core/quote",{value:"<p>".concat(t,"</p>")})}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,n=e.citation;return Object(G.createBlock)("core/quote",{value:t,citation:n})}},{type:"prefix",prefix:">",transform:function(e){return Object(G.createBlock)("core/quote",{value:"<p>".concat(e,"</p>")})}},{type:"raw",isMatch:function(e){var t,n=(t=!1,function(e){return"P"===e.nodeName||(t||"CITE"!==e.nodeName?void 0:(t=!0,!0))});return"BLOCKQUOTE"===e.nodeName&&Array.from(e.childNodes).every(n)},schema:{blockquote:{children:{p:{children:Object(G.getPhrasingContentSchema)()},cite:{children:Object(G.getPhrasingContentSchema)()}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.value,n=e.citation,r=[];return t&&"<p></p>"!==t&&r.push.apply(r,Object(U.a)(Object(ht.split)(Object(ht.create)({html:t,multilineTag:"p"}),"\u2028").map(function(e){return Object(G.createBlock)("core/paragraph",{content:Object(ht.toHTMLString)({value:e})})}))),n&&"<p></p>"!==n&&r.push(Object(G.createBlock)("core/paragraph",{content:n})),0===r.length?Object(G.createBlock)("core/paragraph",{content:""}):r}},{type:"block",blocks:["core/heading"],transform:function(e){var t=e.value,n=e.citation,r=Object(ct.a)(e,["value","citation"]);if("<p></p>"===t)return Object(G.createBlock)("core/heading",{content:n});var o=Object(ht.split)(Object(ht.create)({html:t,multilineTag:"p"}),"\u2028"),a=o.slice(1);return[Object(G.createBlock)("core/heading",{content:Object(ht.toHTMLString)({value:o[0]})}),Object(G.createBlock)("core/quote",Object(K.a)({},r,{citation:n,value:Object(ht.toHTMLString)({value:a.length?Object(ht.join)(o.slice(1),"\u2028"):Object(ht.create)(),multilineTag:"p"})}))]}},{type:"block",blocks:["core/pullquote"],transform:function(e){var t=e.value,n=e.citation;return Object(G.createBlock)("core/pullquote",{value:t,citation:n})}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.isSelected,o=e.mergeBlocks,a=e.onReplace,c=e.className,i=t.align,l=t.value,s=t.citation;return Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.AlignmentToolbar,{value:i,onChange:function(e){n({align:e})}})),Object($.createElement)("blockquote",{className:c,style:{textAlign:i}},Object($.createElement)(W.RichText,{identifier:"value",multiline:!0,value:l,onChange:function(e){return n({value:e})},onMerge:o,onRemove:function(e){var t=!s||0===s.length;!e&&t&&a([])},placeholder:Object(J.__)("Write quote…")}),(!W.RichText.isEmpty(s)||r)&&Object($.createElement)(W.RichText,{identifier:"citation",value:s,onChange:function(e){return n({citation:e})},placeholder:Object(J.__)("Write citation…"),className:"wp-block-quote__citation"})))},save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation;return Object($.createElement)("blockquote",{style:{textAlign:n||null}},Object($.createElement)(W.RichText.Content,{multiline:!0,value:r}),!W.RichText.isEmpty(o)&&Object($.createElement)(W.RichText.Content,{tagName:"cite",value:o}))},merge:function(e,t){var n=t.value,r=t.citation;return n&&"<p></p>"!==n?Object(K.a)({},e,{value:e.value+n,citation:e.citation+r}):Object(K.a)({},e,{citation:e.citation+r})},deprecated:[{attributes:Object(K.a)({},pt,{style:{type:"number",default:1}}),migrate:function(e){return 2===e.style?Object(K.a)({},Object(Z.omit)(e,["style"]),{className:e.className?e.className+" is-style-large":"is-style-large"}):e},save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation,a=t.style;return Object($.createElement)("blockquote",{className:2===a?"is-large":"",style:{textAlign:n||null}},Object($.createElement)(W.RichText.Content,{multiline:!0,value:r}),!W.RichText.isEmpty(o)&&Object($.createElement)(W.RichText.Content,{tagName:"cite",value:o}))}},{attributes:Object(K.a)({},pt,{citation:{type:"string",source:"html",selector:"footer",default:""},style:{type:"number",default:1}}),save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation,a=t.style;return Object($.createElement)("blockquote",{className:"blocks-quote-style-".concat(a),style:{textAlign:n||null}},Object($.createElement)(W.RichText.Content,{multiline:!0,value:r}),!W.RichText.isEmpty(o)&&Object($.createElement)(W.RichText.Content,{tagName:"footer",value:o}))}}]},jt=n(17),ft=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).onImageClick=e.onImageClick.bind(Object(ce.a)(Object(ce.a)(e))),e.onSelectCaption=e.onSelectCaption.bind(Object(ce.a)(Object(ce.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(ce.a)(Object(ce.a)(e))),e.bindContainer=e.bindContainer.bind(Object(ce.a)(Object(ce.a)(e))),e.state={captionSelected:!1},e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"onSelectCaption",value:function(){this.state.captionSelected||this.setState({captionSelected:!0}),this.props.isSelected||this.props.onSelect()}},{key:"onImageClick",value:function(){this.props.isSelected||this.props.onSelect(),this.state.captionSelected&&this.setState({captionSelected:!1})}},{key:"onKeyDown",value:function(e){this.container===document.activeElement&&this.props.isSelected&&-1!==[jt.BACKSPACE,jt.DELETE].indexOf(e.keyCode)&&(e.stopPropagation(),e.preventDefault(),this.props.onRemove())}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isSelected,r=t.image,o=t.url;r&&!o&&this.props.setAttributes({url:r.source_url,alt:r.alt_text}),this.state.captionSelected&&!n&&e.isSelected&&this.setState({captionSelected:!1})}},{key:"render",value:function(){var e,t=this.props,n=t.url,r=t.alt,o=t.id,a=t.linkTo,c=t.link,i=t.isSelected,l=t.caption,s=t.onRemove,u=t.setAttributes,b=t["aria-label"];switch(a){case"media":e=n;break;case"attachment":e=c}var m=Object($.createElement)($.Fragment,null,Object($.createElement)("img",{src:n,alt:r,"data-id":o,onClick:this.onImageClick,tabIndex:"0",onKeyDown:this.onImageClick,"aria-label":b}),Object(Oe.isBlobURL)(n)&&Object($.createElement)(X.Spinner,null)),d=Y()({"is-selected":i,"is-transient":Object(Oe.isBlobURL)(n)});return Object($.createElement)("figure",{className:d,tabIndex:"-1",onKeyDown:this.onKeyDown,ref:this.bindContainer},i&&Object($.createElement)("div",{className:"block-library-gallery-item__inline-menu"},Object($.createElement)(X.IconButton,{icon:"no-alt",onClick:s,className:"blocks-gallery-item__remove",label:Object(J.__)("Remove Image")})),e?Object($.createElement)("a",{href:e},m):m,!W.RichText.isEmpty(l)||i?Object($.createElement)(W.RichText,{tagName:"figcaption",placeholder:Object(J.__)("Write caption…"),value:l,isSelected:this.state.captionSelected,onChange:function(e){return u({caption:e})},unstableOnFocus:this.onSelectCaption,inlineToolbar:!0}):null)}}]),t}($.Component),vt=Object(le.withSelect)(function(e,t){var n=e("core").getMedia,r=t.id;return{image:r?n(r):null}})(ft),yt=Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M20 4v12H8V4h12m0-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 9.67l1.69 2.26 2.48-3.1L19 15H9zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}))),kt=[{value:"attachment",label:Object(J.__)("Attachment Page")},{value:"media",label:Object(J.__)("Media File")},{value:"none",label:Object(J.__)("None")}],wt=["image"];function Ct(e){return Math.min(3,e.images.length)}var Et=function(e){var t=Object(Z.pick)(e,["alt","id","link","caption"]);return t.url=Object(Z.get)(e,["sizes","large","url"])||Object(Z.get)(e,["media_details","sizes","large","source_url"])||e.url,t},_t=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).onSelectImage=e.onSelectImage.bind(Object(ce.a)(Object(ce.a)(e))),e.onSelectImages=e.onSelectImages.bind(Object(ce.a)(Object(ce.a)(e))),e.setLinkTo=e.setLinkTo.bind(Object(ce.a)(Object(ce.a)(e))),e.setColumnsNumber=e.setColumnsNumber.bind(Object(ce.a)(Object(ce.a)(e))),e.toggleImageCrop=e.toggleImageCrop.bind(Object(ce.a)(Object(ce.a)(e))),e.onRemoveImage=e.onRemoveImage.bind(Object(ce.a)(Object(ce.a)(e))),e.setImageAttributes=e.setImageAttributes.bind(Object(ce.a)(Object(ce.a)(e))),e.addFiles=e.addFiles.bind(Object(ce.a)(Object(ce.a)(e))),e.uploadFromFiles=e.uploadFromFiles.bind(Object(ce.a)(Object(ce.a)(e))),e.setAttributes=e.setAttributes.bind(Object(ce.a)(Object(ce.a)(e))),e.state={selectedImage:null},e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"setAttributes",value:function(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e=Object(K.a)({},e,{ids:Object(Z.map)(e.images,"id")})),this.props.setAttributes(e)}},{key:"onSelectImage",value:function(e){var t=this;return function(){t.state.selectedImage!==e&&t.setState({selectedImage:e})}}},{key:"onRemoveImage",value:function(e){var t=this;return function(){var n=Object(Z.filter)(t.props.attributes.images,function(t,n){return e!==n}),r=t.props.attributes.columns;t.setState({selectedImage:null}),t.setAttributes({images:n,columns:r?Math.min(n.length,r):r})}}},{key:"onSelectImages",value:function(e){var t=this.props.attributes.columns;this.setAttributes({images:e.map(function(e){return Et(e)}),columns:t?Math.min(e.length,t):t})}},{key:"setLinkTo",value:function(e){this.setAttributes({linkTo:e})}},{key:"setColumnsNumber",value:function(e){this.setAttributes({columns:e})}},{key:"toggleImageCrop",value:function(){this.setAttributes({imageCrop:!this.props.attributes.imageCrop})}},{key:"getImageCropHelp",value:function(e){return e?Object(J.__)("Thumbnails are cropped to align."):Object(J.__)("Thumbnails are not cropped.")}},{key:"setImageAttributes",value:function(e,t){var n=this.props.attributes.images,r=this.setAttributes;n[e]&&r({images:[].concat(Object(U.a)(n.slice(0,e)),[Object(K.a)({},n[e],t)],Object(U.a)(n.slice(e+1)))})}},{key:"uploadFromFiles",value:function(e){this.addFiles(e.target.files)}},{key:"addFiles",value:function(e){var t=this.props.attributes.images||[],n=this.props.noticeOperations,r=this.setAttributes;Object(W.mediaUpload)({allowedTypes:wt,filesList:e,onFileChange:function(e){var n=e.map(function(e){return Et(e)});r({images:t.concat(n)})},onError:n.createErrorNotice})}},{key:"componentDidUpdate",value:function(e){!this.props.isSelected&&e.isSelected&&this.setState({selectedImage:null,captionSelected:!1})}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.attributes,o=n.isSelected,a=n.className,c=n.noticeOperations,i=n.noticeUI,l=r.images,s=r.columns,u=void 0===s?Ct(r):s,b=r.align,m=r.imageCrop,d=r.linkTo,h=Object($.createElement)(X.DropZone,{onFilesDrop:this.addFiles}),p=Object($.createElement)(W.BlockControls,null,!!l.length&&Object($.createElement)(X.Toolbar,null,Object($.createElement)(W.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:wt,multiple:!0,gallery:!0,value:l.map(function(e){return e.id}),render:function(e){var t=e.open;return Object($.createElement)(X.IconButton,{className:"components-toolbar__control",label:Object(J.__)("Edit gallery"),icon:"edit",onClick:t})}})));return 0===l.length?Object($.createElement)($.Fragment,null,p,Object($.createElement)(W.MediaPlaceholder,{icon:Object($.createElement)(W.BlockIcon,{icon:yt}),className:a,labels:{title:Object(J.__)("Gallery"),instructions:Object(J.__)("Drag images, upload new ones or select files from your library.")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:wt,multiple:!0,notices:i,onError:c.createErrorNotice})):Object($.createElement)($.Fragment,null,p,Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Gallery Settings")},l.length>1&&Object($.createElement)(X.RangeControl,{label:Object(J.__)("Columns"),value:u,onChange:this.setColumnsNumber,min:1,max:Math.min(8,l.length)}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Crop Images"),checked:!!m,onChange:this.toggleImageCrop,help:this.getImageCropHelp}),Object($.createElement)(X.SelectControl,{label:Object(J.__)("Link To"),value:d,onChange:this.setLinkTo,options:kt}))),i,Object($.createElement)("ul",{className:Y()(a,(e={},Object(q.a)(e,"align".concat(b),b),Object(q.a)(e,"columns-".concat(u),u),Object(q.a)(e,"is-cropped",m),e))},h,l.map(function(e,n){var r=Object(J.sprintf)(Object(J.__)("image %1$d of %2$d in gallery"),n+1,l.length);return Object($.createElement)("li",{className:"blocks-gallery-item",key:e.id||e.url},Object($.createElement)(vt,{url:e.url,alt:e.alt,id:e.id,isSelected:o&&t.state.selectedImage===n,onRemove:t.onRemoveImage(n),onSelect:t.onSelectImage(n),setAttributes:function(e){return t.setImageAttributes(n,e)},caption:e.caption,"aria-label":r}))}),o&&Object($.createElement)("li",{className:"blocks-gallery-item has-add-item-button"},Object($.createElement)(X.FormFileUpload,{multiple:!0,isLarge:!0,className:"block-library-gallery-add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},Object(J.__)("Upload an image")))))}}]),t}($.Component),xt=Object(X.withNotices)(_t),St={images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},Tt="core/gallery",Nt=function(e){return e?e.split(",").map(function(e){return parseInt(e,10)}):[]},Rt={title:Object(J.__)("Gallery"),description:Object(J.__)("Display multiple images in a rich gallery."),icon:yt,category:"common",keywords:[Object(J.__)("images"),Object(J.__)("photos")],attributes:St,supports:{align:!0},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:function(e){var t=e[0].align;t=Object(Z.every)(e,["align",t])?t:void 0;var n=Object(Z.filter)(e,function(e){var t=e.id,n=e.url;return t&&n});return Object(G.createBlock)("core/gallery",{images:n.map(function(e){return{id:e.id,url:e.url,alt:e.alt,caption:e.caption}}),ids:n.map(function(e){return e.id}),align:t})}},{type:"shortcode",tag:"gallery",attributes:{images:{type:"array",shortcode:function(e){var t=e.named.ids;return Nt(t).map(function(e){return{id:e}})}},ids:{type:"array",shortcode:function(e){var t=e.named.ids;return Nt(t)}},columns:{type:"number",shortcode:function(e){var t=e.named.columns;return parseInt(void 0===t?"3":t,10)}},linkTo:{type:"string",shortcode:function(e){var t=e.named.link,n=void 0===t?"attachment":t;return"file"===n?"media":n}}}},{type:"files",isMatch:function(e){return 1!==e.length&&Object(Z.every)(e,function(e){return 0===e.type.indexOf("image/")})},transform:function(e,t){var n=Object(G.createBlock)("core/gallery",{images:e.map(function(e){return Et({url:Object(Oe.createBlobURL)(e)})})});return Object(W.mediaUpload)({filesList:e,onFileChange:function(e){var r=e.map(Et);t(n.clientId,{ids:Object(Z.map)(r,"id"),images:r})},allowedTypes:["image"]}),n}}],to:[{type:"block",blocks:["core/image"],transform:function(e){var t=e.images,n=e.align;return t.length>0?t.map(function(e){var t=e.id,r=e.url,o=e.alt,a=e.caption;return Object(G.createBlock)("core/image",{id:t,url:r,alt:o,caption:a,align:n})}):Object(G.createBlock)("core/image",{align:n})}}]},edit:xt,save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ct(t):r,a=t.imageCrop,c=t.linkTo;return Object($.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map(function(e){var t;switch(c){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object($.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object($.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object($.createElement)("figure",null,t?Object($.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:e.caption})))}))},deprecated:[{attributes:St,isEligible:function(e){var t=e.images,n=e.ids;return t&&t.length>0&&(!n&&t||n&&t&&n.length!==t.length||Object(Z.some)(t,function(e,t){return!e&&null!==n[t]||parseInt(e,10)!==n[t]}))},migrate:function(e){return Object(K.a)({},e,{ids:Object(Z.map)(e.images,function(e){var t=e.id;return t?parseInt(t,10):null})})},save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ct(t):r,a=t.imageCrop,c=t.linkTo;return Object($.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map(function(e){var t;switch(c){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object($.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?"wp-image-".concat(e.id):null});return Object($.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object($.createElement)("figure",null,t?Object($.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:e.caption})))}))}},{attributes:St,save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ct(t):r,a=t.imageCrop,c=t.linkTo;return Object($.createElement)("ul",{className:"columns-".concat(o," ").concat(a?"is-cropped":"")},n.map(function(e){var t;switch(c){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object($.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link});return Object($.createElement)("li",{key:e.id||e.url,className:"blocks-gallery-item"},Object($.createElement)("figure",null,t?Object($.createElement)("a",{href:t},n):n,e.caption&&e.caption.length>0&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:e.caption})))}))}},{attributes:Object(K.a)({},St,{images:Object(K.a)({},St.images,{selector:"div.wp-block-gallery figure.blocks-gallery-image img"}),align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.images,r=t.columns,o=void 0===r?Ct(t):r,a=t.align,c=t.imageCrop,i=t.linkTo;return Object($.createElement)("div",{className:"align".concat(a," columns-").concat(o," ").concat(c?"is-cropped":"")},n.map(function(e){var t;switch(i){case"media":t=e.url;break;case"attachment":t=e.link}var n=Object($.createElement)("img",{src:e.url,alt:e.alt,"data-id":e.id});return Object($.createElement)("figure",{key:e.id||e.url,className:"blocks-gallery-image"},t?Object($.createElement)("a",{href:t},n):n)}))}}]};var Bt="core/archives",At={title:Object(J.__)("Archives"),description:Object(J.__)("Display a monthly archive of your posts."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M7 11h2v2H7v-2zm14-5v14c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2l.01-14c0-1.1.88-2 1.99-2h1V2h2v2h8V2h2v2h1c1.1 0 2 .9 2 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"}))),category:"widgets",supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if(["left","center","right"].includes(t))return{"data-align":t}},edit:function(e){var t=e.attributes,n=e.setAttributes,r=t.align,o=t.showPostCounts,a=t.displayAsDropdown;return Object($.createElement)($.Fragment,null,Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Archives Settings")},Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Display as Dropdown"),checked:a,onChange:function(){return n({displayAsDropdown:!a})}}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Show Post Counts"),checked:o,onChange:function(){return n({showPostCounts:!o})}}))),Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.BlockAlignmentToolbar,{value:r,onChange:function(e){n({align:e})},controls:["left","center","right"]})),Object($.createElement)(X.Disabled,null,Object($.createElement)(W.ServerSideRender,{block:"core/archives",attributes:t})))},save:function(){return null}},Pt=Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(X.Path,{d:"m12 3l0.01 10.55c-0.59-0.34-1.27-0.55-2-0.55-2.22 0-4.01 1.79-4.01 4s1.79 4 4.01 4 3.99-1.79 3.99-4v-10h4v-4h-6zm-1.99 16c-1.1 0-2-0.9-2-2s0.9-2 2-2 2 0.9 2 2-0.9 2-2 2z"})),It=["audio"],Lt=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.src},e.toggleAttribute=e.toggleAttribute.bind(Object(ce.a)(Object(ce.a)(e))),e.onSelectURL=e.onSelectURL.bind(Object(ce.a)(Object(ce.a)(e))),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.noticeOperations,o=t.setAttributes,a=n.id,c=n.src,i=void 0===c?"":c;if(!a&&Object(Oe.isBlobURL)(i)){var l=Object(Oe.getBlobByURL)(i);l&&Object(W.mediaUpload)({filesList:[l],onFileChange:function(e){var t=Object(je.a)(e,1)[0],n=t.id,r=t.url;o({id:n,src:r})},onError:function(t){o({src:void 0,id:void 0}),e.setState({editing:!0}),r.createErrorNotice(t)},allowedTypes:It})}}},{key:"toggleAttribute",value:function(e){var t=this;return function(n){t.props.setAttributes(Object(q.a)({},e,n))}}},{key:"onSelectURL",value:function(e){var t=this.props,n=t.attributes,r=t.setAttributes;if(e!==n.src){var o=We({attributes:{url:e}});if(void 0!==o)return void this.props.onReplace(o);r({src:e,id:void 0})}this.setState({editing:!1})}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.autoplay,r=t.caption,o=t.loop,a=t.preload,c=t.src,i=this.props,l=i.setAttributes,s=i.isSelected,u=i.className,b=i.noticeOperations,m=i.noticeUI,d=this.state.editing,h=function(){e.setState({editing:!0})};return d?Object($.createElement)(W.MediaPlaceholder,{icon:Object($.createElement)(W.BlockIcon,{icon:Pt}),className:u,onSelect:function(t){if(!t||!t.url)return l({src:void 0,id:void 0}),void h();l({src:t.url,id:t.id}),e.setState({src:t.url,editing:!1})},onSelectURL:this.onSelectURL,accept:"audio/*",allowedTypes:It,value:this.props.attributes,notices:m,onError:b.createErrorNotice}):Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(X.Toolbar,null,Object($.createElement)(X.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(J.__)("Edit audio"),onClick:h,icon:"edit"}))),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Audio Settings")},Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Autoplay"),onChange:this.toggleAttribute("autoplay"),checked:n}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Loop"),onChange:this.toggleAttribute("loop"),checked:o}),Object($.createElement)(X.SelectControl,{label:Object(J.__)("Preload"),value:void 0!==a?a:"none",onChange:function(e){return l({preload:"none"!==e?e:void 0})},options:[{value:"auto",label:Object(J.__)("Auto")},{value:"metadata",label:Object(J.__)("Metadata")},{value:"none",label:Object(J.__)("None")}]}))),Object($.createElement)("figure",{className:u},Object($.createElement)(X.Disabled,null,Object($.createElement)("audio",{controls:"controls",src:c})),(!W.RichText.isEmpty(r)||s)&&Object($.createElement)(W.RichText,{tagName:"figcaption",placeholder:Object(J.__)("Write caption…"),value:r,onChange:function(e){return l({caption:e})},inlineToolbar:!0})))}}]),t}($.Component),Mt=Object(X.withNotices)(Lt),zt="core/audio",Ht={title:Object(J.__)("Audio"),description:Object(J.__)("Embed a simple audio player."),icon:Pt,category:"common",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},transforms:{from:[{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("audio/")},transform:function(e){var t=e[0];return Object(G.createBlock)("core/audio",{src:Object(Oe.createBlobURL)(t)})}}]},supports:{align:!0},edit:Mt,save:function(e){var t=e.attributes,n=t.autoplay,r=t.caption,o=t.loop,a=t.preload,c=t.src;return Object($.createElement)("figure",null,Object($.createElement)("audio",{controls:"controls",src:c,autoPlay:n,loop:o,preload:a}),!W.RichText.isEmpty(r)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:r}))}},Dt=window.getComputedStyle,Ft=Object(X.withFallbackStyles)(function(e,t){var n=t.textColor,r=t.backgroundColor,o=r&&r.color,a=n&&n.color,c=!a&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:o||!e?void 0:Dt(e).backgroundColor,fallbackTextColor:a||!c?void 0:Dt(c).color}}),Vt=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).nodeRef=null,e.bindRef=e.bindRef.bind(Object(ce.a)(Object(ce.a)(e))),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"bindRef",value:function(e){e&&(this.nodeRef=e)}},{key:"render",value:function(){var e,t=this.props,n=t.attributes,r=t.backgroundColor,o=t.textColor,a=t.setBackgroundColor,c=t.setTextColor,i=t.fallbackBackgroundColor,l=t.fallbackTextColor,s=t.setAttributes,u=t.isSelected,b=t.className,m=n.text,d=n.url,h=n.title;return Object($.createElement)($.Fragment,null,Object($.createElement)("div",{className:b,title:h,ref:this.bindRef},Object($.createElement)(W.RichText,{placeholder:Object(J.__)("Add text…"),value:m,onChange:function(e){return s({text:e})},formattingControls:["bold","italic","strikethrough"],className:Y()("wp-block-button__link",(e={"has-background":r.color},Object(q.a)(e,r.class,r.class),Object(q.a)(e,"has-text-color",o.color),Object(q.a)(e,o.class,o.class),e)),style:{backgroundColor:r.color,color:o.color},keepPlaceholderOnFocus:!0}),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(W.PanelColorSettings,{title:Object(J.__)("Color Settings"),colorSettings:[{value:r.color,onChange:a,label:Object(J.__)("Background Color")},{value:o.color,onChange:c,label:Object(J.__)("Text Color")}]},Object($.createElement)(W.ContrastChecker,{isLargeText:!1,textColor:o.color,backgroundColor:r.color,fallbackBackgroundColor:i,fallbackTextColor:l})))),u&&Object($.createElement)("form",{className:"block-library-button__inline-link",onSubmit:function(e){return e.preventDefault()}},Object($.createElement)(X.Dashicon,{icon:"admin-links"}),Object($.createElement)(W.URLInput,{value:d,onChange:function(e){return s({url:e})}}),Object($.createElement)(X.IconButton,{icon:"editor-break",label:Object(J.__)("Apply"),type:"submit"})))}}]),t}($.Component),Ut=Object(ie.compose)([Object(W.withColors)("backgroundColor",{textColor:"color"}),Ft])(Vt),Wt={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},Gt="core/button",qt=function(e){return Object(Z.omit)(Object(K.a)({},e,{customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0}),["color","textColor"])},Kt={title:Object(J.__)("Button"),description:Object(J.__)("Prompt visitors to take action with a button-style link."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"}))),category:"layout",keywords:[Object(J.__)("link")],attributes:Wt,supports:{align:!0,alignWide:!1},styles:[{name:"default",label:Object(J._x)("Default","block style"),isDefault:!0},{name:"outline",label:Object(J.__)("Outline")},{name:"squared",label:Object(J._x)("Squared","block style")}],edit:Ut,save:function(e){var t,n=e.attributes,r=n.url,o=n.text,a=n.title,c=n.backgroundColor,i=n.textColor,l=n.customBackgroundColor,s=n.customTextColor,u=Object(W.getColorClassName)("color",i),b=Object(W.getColorClassName)("background-color",c),m=Y()("wp-block-button__link",(t={"has-text-color":i||s},Object(q.a)(t,u,u),Object(q.a)(t,"has-background",c||l),Object(q.a)(t,b,b),t)),d={backgroundColor:b?void 0:l,color:u?void 0:s};return Object($.createElement)("div",null,Object($.createElement)(W.RichText.Content,{tagName:"a",className:m,href:r,title:a,style:d,value:o}))},deprecated:[{attributes:Object(K.a)({},Object(Z.pick)(Wt,["url","title","text"]),{color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.url,r=t.text,o=t.title,a=t.align,c={backgroundColor:t.color,color:t.textColor};return Object($.createElement)("div",{className:"align".concat(a)},Object($.createElement)(W.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:o,style:c,value:r}))},migrate:qt},{attributes:Object(K.a)({},Object(Z.pick)(Wt,["url","title","text"]),{color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.url,r=t.text,o=t.title,a=t.align,c=t.color,i=t.textColor;return Object($.createElement)("div",{className:"align".concat(a),style:{backgroundColor:c}},Object($.createElement)(W.RichText.Content,{tagName:"a",href:n,title:o,style:{color:i},value:r}))},migrate:qt}]},$t=n(27),Qt=n.n($t),Yt=n(38),Zt=n.n(Yt),Jt=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).getYearMonth=Zt()(e.getYearMonth.bind(Object(ce.a)(Object(ce.a)(e))),{maxSize:1}),e.getServerSideAttributes=Zt()(e.getServerSideAttributes.bind(Object(ce.a)(Object(ce.a)(e))),{maxSize:1}),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"getYearMonth",value:function(e){if(!e)return{};var t=Qt()(e);return{year:t.year(),month:t.month()+1}}},{key:"getServerSideAttributes",value:function(e,t){return Object(K.a)({},e,this.getYearMonth(t))}},{key:"render",value:function(){return Object($.createElement)(X.Disabled,null,Object($.createElement)(X.ServerSideRender,{block:"core/calendar",attributes:this.getServerSideAttributes(this.props.attributes,this.props.date)}))}}]),t}($.Component),Xt=Object(le.withSelect)(function(e){return{date:e("core/editor").getEditedPostAttribute("date")}})(Jt),en="core/calendar",tn={title:Object(J.__)("Calendar"),description:Object(J.__)("A calendar of your sites posts."),icon:"calendar",category:"widgets",keywords:[Object(J.__)("posts"),Object(J.__)("archive")],supports:{align:!0},edit:Xt,save:function(){return null}},nn=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).toggleDisplayAsDropdown=e.toggleDisplayAsDropdown.bind(Object(ce.a)(Object(ce.a)(e))),e.toggleShowPostCounts=e.toggleShowPostCounts.bind(Object(ce.a)(Object(ce.a)(e))),e.toggleShowHierarchy=e.toggleShowHierarchy.bind(Object(ce.a)(Object(ce.a)(e))),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"toggleDisplayAsDropdown",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({displayAsDropdown:!t.displayAsDropdown})}},{key:"toggleShowPostCounts",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({showPostCounts:!t.showPostCounts})}},{key:"toggleShowHierarchy",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({showHierarchy:!t.showHierarchy})}},{key:"getCategories",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.props.categories;return t&&t.length?null===e?t:t.filter(function(t){return t.parent===e}):[]}},{key:"getCategoryListClassName",value:function(e){return"wp-block-categories__list wp-block-categories__list-level-".concat(e)}},{key:"renderCategoryName",value:function(e){return e.name?Object(Z.unescape)(e.name).trim():Object(J.__)("(Untitled)")}},{key:"renderCategoryList",value:function(){var e=this,t=this.props.attributes.showHierarchy?0:null,n=this.getCategories(t);return Object($.createElement)("ul",{className:this.getCategoryListClassName(0)},n.map(function(t){return e.renderCategoryListItem(t,0)}))}},{key:"renderCategoryListItem",value:function(e,t){var n=this,r=this.props.attributes,o=r.showHierarchy,a=r.showPostCounts,c=this.getCategories(e.id);return Object($.createElement)("li",{key:e.id},Object($.createElement)("a",{href:e.link,target:"_blank"},this.renderCategoryName(e)),a&&Object($.createElement)("span",{className:"wp-block-categories__post-count"}," ","(",e.count,")"),o&&!!c.length&&Object($.createElement)("ul",{className:this.getCategoryListClassName(t+1)},c.map(function(e){return n.renderCategoryListItem(e,t+1)})))}},{key:"renderCategoryDropdown",value:function(){var e=this,t=this.props.instanceId,n=this.props.attributes.showHierarchy?0:null,r=this.getCategories(n),o="blocks-category-select-".concat(t);return Object($.createElement)($.Fragment,null,Object($.createElement)("label",{htmlFor:o,className:"screen-reader-text"},Object(J.__)("Categories")),Object($.createElement)("select",{id:o,className:"wp-block-categories__dropdown"},r.map(function(t){return e.renderCategoryDropdownItem(t,0)})))}},{key:"renderCategoryDropdownItem",value:function(e,t){var n=this,r=this.props.attributes,o=r.showHierarchy,a=r.showPostCounts,c=this.getCategories(e.id);return[Object($.createElement)("option",{key:e.id},Object(Z.times)(3*t,function(){return" "}),this.renderCategoryName(e),a?" (".concat(e.count,")"):""),o&&!!c.length&&c.map(function(e){return n.renderCategoryDropdownItem(e,t+1)})]}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.isRequesting,r=t.displayAsDropdown,o=t.showHierarchy,a=t.showPostCounts,c=Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Categories Settings")},Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Display as Dropdown"),checked:r,onChange:this.toggleDisplayAsDropdown}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Show Hierarchy"),checked:o,onChange:this.toggleShowHierarchy}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Show Post Counts"),checked:a,onChange:this.toggleShowPostCounts})));return n?Object($.createElement)($.Fragment,null,c,Object($.createElement)(X.Placeholder,{icon:"admin-post",label:Object(J.__)("Categories")},Object($.createElement)(X.Spinner,null))):Object($.createElement)($.Fragment,null,c,Object($.createElement)("div",{className:this.props.className},r?this.renderCategoryDropdown():this.renderCategoryList()))}}]),t}($.Component),rn=Object(ie.compose)(Object(le.withSelect)(function(e){var t=e("core").getEntityRecords,n=e("core/data").isResolving,r={per_page:-1,hide_empty:!0};return{categories:t("taxonomy","category",r),isRequesting:n("core","getEntityRecords",["taxonomy","category",r])}}),ie.withInstanceId)(nn),on="core/categories",an={title:Object(J.__)("Categories"),description:Object(J.__)("Display a list of all categories."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(X.Path,{d:"M12,2l-5.5,9h11L12,2z M12,5.84L13.93,9h-3.87L12,5.84z"}),Object($.createElement)(X.Path,{d:"m17.5 13c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5 4.5-2.01 4.5-4.5-2.01-4.5-4.5-4.5zm0 7c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"}),Object($.createElement)(X.Path,{d:"m3 21.5h8v-8h-8v8zm2-6h4v4h-4v-4z"})),category:"widgets",attributes:{displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1}},supports:{align:!0,alignWide:!1,html:!1},edit:rn,save:function(){return null}};var cn="core/code",ln={title:Object(J.__)("Code"),description:Object(J.__)("Display code snippets that respect your spacing and tabs."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(X.Path,{d:"M9.4,16.6L4.8,12l4.6-4.6L8,6l-6,6l6,6L9.4,16.6z M14.6,16.6l4.6-4.6l-4.6-4.6L16,6l6,6l-6,6L14.6,16.6z"})),category:"formatting",attributes:{content:{type:"string",source:"text",selector:"code"}},supports:{html:!1},transforms:{from:[{type:"enter",regExp:/^```$/,transform:function(){return Object(G.createBlock)("core/code")}},{type:"raw",isMatch:function(e){return"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName},schema:{pre:{children:{code:{children:{"#text":{}}}}}}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className;return Object($.createElement)("div",{className:r},Object($.createElement)(W.PlainText,{value:t.content,onChange:function(e){return n({content:e})},placeholder:Object(J.__)("Write code…"),"aria-label":Object(J.__)("Code")}))},save:function(e){var t=e.attributes;return Object($.createElement)("pre",null,Object($.createElement)("code",null,t.content))}},sn=["core/column"],un=Zt()(function(e){return Object(Z.times)(e,function(){return["core/column"]})});function bn(e){var t,n=bn.doc;n||(n=document.implementation.createHTMLDocument(""),bn.doc=n),n.body.innerHTML=e;var r=!0,o=!1,a=void 0;try{for(var c,i=n.body.firstChild.classList[Symbol.iterator]();!(r=(c=i.next()).done);r=!0){if(t=c.value.match(/^layout-column-(\d+)$/))return Number(t[1])-1}}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}}var mn="core/columns",dn={title:Object(J.__)("Columns"),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M4,4H20a2,2,0,0,1,2,2V18a2,2,0,0,1-2,2H4a2,2,0,0,1-2-2V6A2,2,0,0,1,4,4ZM4 6V18H8V6Zm6 0V18h4V6Zm6 0V18h4V6Z"}))),category:"layout",attributes:{columns:{type:"number",default:2}},description:Object(J.__)("Add a block that displays content in multiple columns, then add whatever content blocks youd like."),supports:{align:["wide","full"],html:!1},deprecated:[{attributes:{columns:{type:"number",default:2}},isEligible:function(e,t){return!!t.some(function(e){return/layout-column-\d+/.test(e.originalContent)})&&t.some(function(e){return void 0!==bn(e.originalContent)})},migrate:function(e,t){return[e,t.reduce(function(e,t){var n=bn(t.originalContent);return void 0===n&&(n=0),e[n]||(e[n]=[]),e[n].push(t),e},[]).map(function(e){return Object(G.createBlock)("core/column",{},e)})]},save:function(e){var t=e.attributes.columns;return Object($.createElement)("div",{className:"has-".concat(t,"-columns")},Object($.createElement)(W.InnerBlocks.Content,null))}}],edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.columns,a=Y()(r,"has-".concat(o,"-columns"));return Object($.createElement)($.Fragment,null,Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,null,Object($.createElement)(X.RangeControl,{label:Object(J.__)("Columns"),value:o,onChange:function(e){n({columns:e})},min:2,max:6}))),Object($.createElement)("div",{className:a},Object($.createElement)(W.InnerBlocks,{template:un(o),templateLock:"all",allowedBlocks:sn})))},save:function(e){var t=e.attributes.columns;return Object($.createElement)("div",{className:"has-".concat(t,"-columns")},Object($.createElement)(W.InnerBlocks.Content,null))}},hn="core/column",pn={title:Object(J.__)("Column"),parent:["core/columns"],icon:Object($.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.Path,{d:"M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16zm0-11.47L17.74 9 12 13.47 6.26 9 12 4.53z"})),description:Object(J.__)("A single column within a columns block."),category:"common",supports:{inserter:!1,reusable:!1,html:!1},edit:function(){return Object($.createElement)(W.InnerBlocks,{templateLock:!1})},save:function(){return Object($.createElement)("div",null,Object($.createElement)(W.InnerBlocks.Content,null))}},gn=Object($.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{d:"M4 4h7V2H4c-1.1 0-2 .9-2 2v7h2V4zm6 9l-4 5h12l-3-4-2.03 2.71L10 13zm7-4.5c0-.83-.67-1.5-1.5-1.5S14 7.67 14 8.5s.67 1.5 1.5 1.5S17 9.33 17 8.5zM20 2h-7v2h7v7h2V4c0-1.1-.9-2-2-2zm0 18h-7v2h7c1.1 0 2-.9 2-2v-7h-2v7zM4 13H2v7c0 1.1.9 2 2 2h7v-2H4v-7z"}),Object($.createElement)(X.Path,{d:"M0 0h24v24H0z",fill:"none"})),On={title:{type:"string",source:"html",selector:"p"},url:{type:"string"},contentAlign:{type:"string",default:"center"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"}},jn="core/cover",fn=["image","video"],vn={title:Object(J.__)("Cover"),description:Object(J.__)("Add an image or video with a text overlay — great for headers."),icon:gn,category:"common",attributes:On,supports:{align:!0},transforms:{from:[{type:"block",blocks:["core/heading"],transform:function(e){var t=e.content;return Object(G.createBlock)("core/cover",{title:t})}},{type:"block",blocks:["core/image"],transform:function(e){var t=e.caption,n=e.url,r=e.align,o=e.id;return Object(G.createBlock)("core/cover",{title:t,url:n,align:r,id:o})}},{type:"block",blocks:["core/video"],transform:function(e){var t=e.caption,n=e.src,r=e.align,o=e.id;return Object(G.createBlock)("core/cover",{title:t,url:n,align:r,id:o,backgroundType:"video"})}}],to:[{type:"block",blocks:["core/heading"],transform:function(e){var t=e.title;return Object(G.createBlock)("core/heading",{content:t})}},{type:"block",blocks:["core/image"],isMatch:function(e){var t=e.backgroundType;return!e.url||"image"===t},transform:function(e){var t=e.title,n=e.url,r=e.align,o=e.id;return Object(G.createBlock)("core/image",{caption:t,url:n,align:r,id:o})}},{type:"block",blocks:["core/video"],isMatch:function(e){var t=e.backgroundType;return!e.url||"video"===t},transform:function(e){var t=e.title,n=e.url,r=e.align,o=e.id;return Object(G.createBlock)("core/video",{caption:t,src:n,id:o,align:r})}}]},edit:Object(ie.compose)([Object(W.withColors)({overlayColor:"background-color"}),X.withNotices])(function(e){var t=e.attributes,n=e.setAttributes,r=e.isSelected,o=e.className,a=e.noticeOperations,c=e.noticeUI,i=e.overlayColor,l=e.setOverlayColor,s=t.backgroundType,u=t.contentAlign,b=t.dimRatio,m=t.focalPoint,d=t.hasParallax,h=t.id,p=t.title,g=t.url,O=function(e){if(e&&e.url){var t;if(e.media_type)t="image"===e.media_type?"image":"video";else{if("image"!==e.type&&"video"!==e.type)return;t=e.type}n({url:e.url,id:e.id,backgroundType:t})}else n({url:void 0,id:void 0})},j=function(e){return n({title:e})},f=Object(K.a)({},"image"===s?kn(g):{},{backgroundColor:i.color});m&&(f.backgroundPosition="".concat(100*m.x,"% ").concat(100*m.y,"%"));var v=Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,!!g&&Object($.createElement)($.Fragment,null,Object($.createElement)(W.AlignmentToolbar,{value:u,onChange:function(e){n({contentAlign:e})}}),Object($.createElement)(W.MediaUploadCheck,null,Object($.createElement)(X.Toolbar,null,Object($.createElement)(W.MediaUpload,{onSelect:O,allowedTypes:fn,value:h,render:function(e){var t=e.open;return Object($.createElement)(X.IconButton,{className:"components-toolbar__control",label:Object(J.__)("Edit media"),icon:"edit",onClick:t})}}))))),!!g&&Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Cover Settings")},"image"===s&&Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Fixed Background"),checked:d,onChange:function(){return n({hasParallax:!d})}}),"image"===s&&!d&&Object($.createElement)(X.FocalPointPicker,{label:Object(J.__)("Focal Point Picker"),url:g,value:m,onChange:function(e){return n({focalPoint:e})}}),Object($.createElement)(W.PanelColorSettings,{title:Object(J.__)("Overlay"),initialOpen:!0,colorSettings:[{value:i.color,onChange:l,label:Object(J.__)("Overlay Color")}]},Object($.createElement)(X.RangeControl,{label:Object(J.__)("Background Opacity"),value:b,onChange:function(e){return n({dimRatio:e})},min:0,max:100,step:10})))));if(!g){var y=!W.RichText.isEmpty(p),k=y?void 0:Object($.createElement)(W.BlockIcon,{icon:gn}),w=y?Object($.createElement)(W.RichText,{tagName:"h2",value:p,onChange:j,inlineToolbar:!0}):Object(J.__)("Cover");return Object($.createElement)($.Fragment,null,v,Object($.createElement)(W.MediaPlaceholder,{icon:k,className:o,labels:{title:w,instructions:Object(J.__)("Drag an image or a video, upload a new one or select a file from your library.")},onSelect:O,accept:"image/*,video/*",allowedTypes:fn,notices:c,onError:a.createErrorNotice}))}var C=Y()(o,"center"!==u&&"has-".concat(u,"-content"),yn(b),{"has-background-dim":0!==b,"has-parallax":d});return Object($.createElement)($.Fragment,null,v,Object($.createElement)("div",{"data-url":g,style:f,className:C},"video"===s&&Object($.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:g}),(!W.RichText.isEmpty(p)||r)&&Object($.createElement)(W.RichText,{tagName:"p",className:"wp-block-cover-text",placeholder:Object(J.__)("Write title…"),value:p,onChange:j,inlineToolbar:!0})))}),save:function(e){var t=e.attributes,n=t.backgroundType,r=t.contentAlign,o=t.customOverlayColor,a=t.dimRatio,c=t.focalPoint,i=t.hasParallax,l=t.overlayColor,s=t.title,u=t.url,b=Object(W.getColorClassName)("background-color",l),m="image"===n?kn(u):{};b||(m.backgroundColor=o),c&&!i&&(m.backgroundPosition="".concat(100*c.x,"% ").concat(100*c.y,"%"));var d=Y()(yn(a),b,Object(q.a)({"has-background-dim":0!==a,"has-parallax":i},"has-".concat(r,"-content"),"center"!==r));return Object($.createElement)("div",{className:d,style:m},"video"===n&&u&&Object($.createElement)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:u}),!W.RichText.isEmpty(s)&&Object($.createElement)(W.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:s}))},deprecated:[{attributes:Object(K.a)({},On,{align:{type:"string"}}),supports:{className:!1},save:function(e){var t=e.attributes,n=t.url,r=t.title,o=t.hasParallax,a=t.dimRatio,c=t.align,i=t.contentAlign,l=t.overlayColor,s=t.customOverlayColor,u=Object(W.getColorClassName)("background-color",l),b=kn(n);u||(b.backgroundColor=s);var m=Y()("wp-block-cover-image",yn(a),u,Object(q.a)({"has-background-dim":0!==a,"has-parallax":o},"has-".concat(i,"-content"),"center"!==i),c?"align".concat(c):null);return Object($.createElement)("div",{className:m,style:b},!W.RichText.isEmpty(r)&&Object($.createElement)(W.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:r}))}},{attributes:Object(K.a)({},On,{align:{type:"string"},title:{type:"string",source:"html",selector:"h2"}}),save:function(e){var t=e.attributes,n=t.url,r=t.title,o=t.hasParallax,a=t.dimRatio,c=t.align,i=kn(n),l=Y()(yn(a),{"has-background-dim":0!==a,"has-parallax":o},c?"align".concat(c):null);return Object($.createElement)("section",{className:l,style:i},Object($.createElement)(W.RichText.Content,{tagName:"h2",value:r}))}}]};function yn(e){return 0===e||50===e?null:"has-background-dim-"+10*Math.round(e/10)}function kn(e){return e?{backgroundImage:"url(".concat(e,")")}:{}}var wn=function(e){var t=e.blockSupportsResponsive,n=e.showEditButton,r=e.themeSupportsResponsive,o=e.allowResponsive,a=e.getResponsiveHelp,c=e.toggleResponsive,i=e.switchBackToURLInput;return Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(X.Toolbar,null,n&&Object($.createElement)(X.IconButton,{className:"components-toolbar__control",label:Object(J.__)("Edit URL"),icon:"edit",onClick:i}))),r&&t&&Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Media Settings"),className:"blocks-responsive"},Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Resize for smaller devices"),checked:o,help:a,onChange:c}))))},Cn=function(){return Object($.createElement)("div",{className:"wp-block-embed is-loading"},Object($.createElement)(X.Spinner,null),Object($.createElement)("p",null,Object(J.__)("Embedding…")))},En=function(e){var t=e.icon,n=e.label,r=e.value,o=e.onSubmit,a=e.onChange,c=e.cannotEmbed,i=e.fallback,l=e.tryAgain;return Object($.createElement)(X.Placeholder,{icon:Object($.createElement)(W.BlockIcon,{icon:t,showColors:!0}),label:n,className:"wp-block-embed"},Object($.createElement)("form",{onSubmit:o},Object($.createElement)("input",{type:"url",value:r||"",className:"components-placeholder__input","aria-label":n,placeholder:Object(J.__)("Enter URL to embed here…"),onChange:a}),Object($.createElement)(X.Button,{isLarge:!0,type:"submit"},Object(J._x)("Embed","button label")),c&&Object($.createElement)("p",{className:"components-placeholder__error"},Object(J.__)("Sorry, this content could not be embedded."),Object($.createElement)("br",null),Object($.createElement)(X.Button,{isLarge:!0,onClick:l},Object(J._x)("Try again","button label"))," ",Object($.createElement)(X.Button,{isLarge:!0,onClick:i},Object(J._x)("Convert to link","button label")))))},_n=n(77),xn=window.FocusEvent,Sn=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).checkFocus=e.checkFocus.bind(Object(ce.a)(Object(ce.a)(e))),e.node=Object($.createRef)(),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"checkFocus",value:function(){var e=document.activeElement;if("IFRAME"===e.tagName&&e.parentNode===this.node.current){var t=new xn("focus",{bubbles:!0});e.dispatchEvent(t)}}},{key:"render",value:function(){var e=this.props.html;return Object($.createElement)("div",{ref:this.node,className:"wp-block-embed__wrapper",dangerouslySetInnerHTML:{__html:e}})}}]),t}($.Component),Tn=Object(ie.withGlobalEvents)({blur:"checkFocus"})(Sn),Nn=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).hideOverlay=e.hideOverlay.bind(Object(ce.a)(Object(ce.a)(e))),e.state={interactive:!1},e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"hideOverlay",value:function(){this.setState({interactive:!0})}},{key:"render",value:function(){var e,t,n,r=this.props,o=r.preview,a=r.url,c=r.type,i=r.caption,l=r.onCaptionChange,s=r.isSelected,u=r.className,b=r.icon,m=r.label,d=o.scripts,h=this.state.interactive,p="photo"===c?(t=(e=o).thumbnail_url?e.thumbnail_url:e.url,n=Object($.createElement)("p",null,Object($.createElement)("img",{src:t,alt:e.title,width:"100%"})),Object($.renderToString)(n)):o.html,g=Object(_n.parse)(a).host.split("."),O=g.splice(g.length-2,g.length-1).join("."),j=Object(Z.includes)(ze,O),f=Object(J.sprintf)(Object(J.__)("Embedded content from %s"),O),v=Fe()(c,u,"wp-block-embed__wrapper"),y="wp-embed"===c?Object($.createElement)(Tn,{html:p}):Object($.createElement)("div",{className:"wp-block-embed__wrapper"},Object($.createElement)(X.SandBox,{html:p,scripts:d,title:f,type:v,onFocus:this.hideOverlay}),!h&&Object($.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:this.hideOverlay}));return Object($.createElement)("figure",{className:Fe()(u,"wp-block-embed",{"is-type-video":"video"===c})},j?Object($.createElement)(X.Placeholder,{icon:Object($.createElement)(W.BlockIcon,{icon:b,showColors:!0}),label:m},Object($.createElement)("p",{className:"components-placeholder__error"},Object($.createElement)("a",{href:a},a)),Object($.createElement)("p",{className:"components-placeholder__error"},Object(J.sprintf)(Object(J.__)("Embedded content from %s can't be previewed in the editor."),O))):y,(!W.RichText.isEmpty(i)||s)&&Object($.createElement)(W.RichText,{tagName:"figcaption",placeholder:Object(J.__)("Write caption…"),value:i,onChange:l,inlineToolbar:!0}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!e.isSelected&&t.interactive?{interactive:!1}:null}}]),t}($.Component);function Rn(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return function(r){function o(){var e;return Object(te.a)(this,o),(e=Object(re.a)(this,Object(oe.a)(o).apply(this,arguments))).switchBackToURLInput=e.switchBackToURLInput.bind(Object(ce.a)(Object(ce.a)(e))),e.setUrl=e.setUrl.bind(Object(ce.a)(Object(ce.a)(e))),e.getAttributesFromPreview=e.getAttributesFromPreview.bind(Object(ce.a)(Object(ce.a)(e))),e.setAttributesFromPreview=e.setAttributesFromPreview.bind(Object(ce.a)(Object(ce.a)(e))),e.getResponsiveHelp=e.getResponsiveHelp.bind(Object(ce.a)(Object(ce.a)(e))),e.toggleResponsive=e.toggleResponsive.bind(Object(ce.a)(Object(ce.a)(e))),e.handleIncomingPreview=e.handleIncomingPreview.bind(Object(ce.a)(Object(ce.a)(e))),e.state={editingURL:!1,url:e.props.attributes.url},e.props.preview&&e.handleIncomingPreview(),e}return Object(ae.a)(o,r),Object(ne.a)(o,[{key:"handleIncomingPreview",value:function(){var e=this.props.attributes.allowResponsive;this.setAttributesFromPreview();var t=We(this.props,this.getAttributesFromPreview(this.props.preview,e));t&&this.props.onReplace(t)}},{key:"componentDidUpdate",value:function(e){var t=void 0!==this.props.preview,n=void 0!==e.preview,r=e.preview&&this.props.preview&&this.props.preview.html!==e.preview.html||t&&!n,o=this.props.attributes.url!==e.attributes.url;if(r||o){if(this.props.cannotEmbed)return;this.handleIncomingPreview()}}},{key:"setUrl",value:function(e){e&&e.preventDefault();var t=this.state.url,n=this.props.setAttributes;this.setState({editingURL:!1}),n({url:t})}},{key:"getAttributesFromPreview",value:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o={},a=t.type,c=void 0===a?"rich":a,i=t.html,l=t.provider_name,s=Object(Z.kebabCase)(Object(Z.toLower)(""!==l?l:e));return Ue(i)&&(c="wp-embed"),(i||"photo"===c)&&(o.type=c,o.providerNameSlug=s),o.className=Ge(i,this.props.attributes.className,n&&r),o}},{key:"setAttributesFromPreview",value:function(){var e=this.props,t=e.setAttributes,n=e.preview,r=this.props.attributes.allowResponsive;t(this.getAttributesFromPreview(n,r))}},{key:"switchBackToURLInput",value:function(){this.setState({editingURL:!0})}},{key:"getResponsiveHelp",value:function(e){return e?Object(J.__)("This embed will preserve its aspect ratio when the browser is resized."):Object(J.__)("This embed may not preserve its aspect ratio when the browser is resized.")}},{key:"toggleResponsive",value:function(){var e=this.props.attributes,t=e.allowResponsive,r=e.className,o=this.props.preview.html,a=!t;this.props.setAttributes({allowResponsive:a,className:Ge(o,r,n&&a)})}},{key:"render",value:function(){var r=this,o=this.state,a=o.url,c=o.editingURL,i=this.props.attributes,l=i.caption,s=i.type,u=i.allowResponsive,b=this.props,m=b.fetching,d=b.setAttributes,h=b.isSelected,p=b.className,g=b.preview,O=b.cannotEmbed,j=b.themeSupportsResponsive,f=b.tryAgain;if(m)return Object($.createElement)(Cn,null);var v=Object(J.sprintf)(Object(J.__)("%s URL"),e);return!g||O||c?Object($.createElement)(En,{icon:t,label:v,onSubmit:this.setUrl,value:a,cannotEmbed:O,onChange:function(e){return r.setState({url:e.target.value})},fallback:function(){return function(e,t){var n=Object($.createElement)("a",{href:e},e);t(Object(G.createBlock)("core/paragraph",{content:Object($.renderToString)(n)}))}(a,r.props.onReplace)},tryAgain:f}):Object($.createElement)($.Fragment,null,Object($.createElement)(wn,{showEditButton:g&&!O,themeSupportsResponsive:j,blockSupportsResponsive:n,allowResponsive:u,getResponsiveHelp:this.getResponsiveHelp,toggleResponsive:this.toggleResponsive,switchBackToURLInput:this.switchBackToURLInput}),Object($.createElement)(Nn,{preview:g,className:p,url:a,type:s,caption:l,onCaptionChange:function(e){return d({caption:e})},isSelected:h,icon:t,label:v}))}}]),o}($.Component)}var Bn={url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0}};function An(e){var t=e.title,n=e.description,r=e.icon,o=e.category,a=void 0===o?"embed":o,c=e.transforms,i=e.keywords,l=void 0===i?[]:i,s=e.supports,u=void 0===s?{}:s,b=e.responsive,m=void 0===b||b,d=n||Object(J.__)("Add a block that displays content pulled from other sites, like Twitter, Instagram or YouTube."),h=Rn(t,r,m);return{title:t,description:d,icon:r,category:a,keywords:l,attributes:Bn,supports:Object(K.a)({align:!0},u),transforms:c,edit:Object(ie.compose)(Object(le.withSelect)(function(e,t){var n=t.attributes.url,r=e("core"),o=r.getEmbedPreview,a=r.isPreviewEmbedFallback,c=r.isRequestingEmbedPreview,i=r.getThemeSupports,l=void 0!==n&&o(n),s=void 0!==n&&a(n),u=void 0!==n&&c(n),b=i(),m=!!l&&void 0===l.type&&!1===l.html,d=!!l&&l.data&&404===l.data.status,h=!!l&&!m&&!d,p=void 0!==n&&(!h||s);return{preview:h?l:void 0,fetching:u,themeSupportsResponsive:b["responsive-embeds"],cannotEmbed:p}}),Object(le.withDispatch)(function(e,t){var n=t.attributes.url,r=e("core/data");return{tryAgain:function(){r.invalidateResolution("core","getEmbedPreview",[n])}}}))(h),save:function(e){var t,n=e.attributes,r=n.url,o=n.caption,a=n.type,c=n.providerNameSlug;if(!r)return null;var i=Fe()("wp-block-embed",(t={},Object(q.a)(t,"is-type-".concat(a),a),Object(q.a)(t,"is-provider-".concat(c),c),t));return Object($.createElement)("figure",{className:i},Object($.createElement)("div",{className:"wp-block-embed__wrapper"},"\n".concat(r,"\n")),!W.RichText.isEmpty(o)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:o}))},deprecated:[{attributes:Bn,save:function(e){var t,n=e.attributes,r=n.url,o=n.caption,a=n.type,c=n.providerNameSlug;if(!r)return null;var i=Fe()("wp-block-embed",(t={},Object(q.a)(t,"is-type-".concat(a),a),Object(q.a)(t,"is-provider-".concat(c),c),t));return Object($.createElement)("figure",{className:i},"\n".concat(r,"\n"),!W.RichText.isEmpty(o)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:o}))}}]}}var Pn="core/embed",In=An({title:Object(J._x)("Embed","block title"),description:Object(J.__)("Embed videos, images, tweets, audio, and other content from external sources."),icon:ye,responsive:!1,transforms:{from:[{type:"raw",isMatch:function(e){return"P"===e.nodeName&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)},transform:function(e){return Object(G.createBlock)("core/embed",{url:e.textContent.trim()})}}]}}),Ln=Le.map(function(e){return Object(K.a)({},e,{settings:An(e.settings)})}),Mn=Me.map(function(e){return Object(K.a)({},e,{settings:An(e.settings)})}),zn=Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.Path,{d:"M9.17 6l2 2H20v10H4V6h5.17M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"}));function Hn(e){var t=e.hrefs,n=e.openInNewWindow,r=e.showDownloadButton,o=e.changeLinkDestinationOption,a=e.changeOpenInNewWindow,c=e.changeShowDownloadButton,i=t.href,l=t.textLinkHref,s=t.attachmentPage,u=[{value:i,label:Object(J.__)("URL")}];return s&&(u=[{value:i,label:Object(J.__)("Media File")},{value:s,label:Object(J.__)("Attachment Page")}]),Object($.createElement)($.Fragment,null,Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Text Link Settings")},Object($.createElement)(X.SelectControl,{label:Object(J.__)("Link To"),value:l,options:u,onChange:o}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Open in New Tab"),checked:n,onChange:a})),Object($.createElement)(X.PanelBody,{title:Object(J.__)("Download Button Settings")},Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Show Download Button"),checked:r,onChange:c}))))}var Dn=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).onSelectFile=e.onSelectFile.bind(Object(ce.a)(Object(ce.a)(e))),e.confirmCopyURL=e.confirmCopyURL.bind(Object(ce.a)(Object(ce.a)(e))),e.resetCopyConfirmation=e.resetCopyConfirmation.bind(Object(ce.a)(Object(ce.a)(e))),e.changeLinkDestinationOption=e.changeLinkDestinationOption.bind(Object(ce.a)(Object(ce.a)(e))),e.changeOpenInNewWindow=e.changeOpenInNewWindow.bind(Object(ce.a)(Object(ce.a)(e))),e.changeShowDownloadButton=e.changeShowDownloadButton.bind(Object(ce.a)(Object(ce.a)(e))),e.state={hasError:!1,showCopyConfirmation:!1},e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.noticeOperations,o=n.href;if(Object(Oe.isBlobURL)(o)){var a=Object(Oe.getBlobByURL)(o);Object(W.mediaUpload)({filesList:[a],onFileChange:function(t){var n=Object(je.a)(t,1)[0];return e.onSelectFile(n)},onError:function(t){e.setState({hasError:!0}),r.createErrorNotice(t)}}),Object(Oe.revokeBlobURL)(o)}}},{key:"componentDidUpdate",value:function(e){e.isSelected&&!this.props.isSelected&&this.setState({showCopyConfirmation:!1})}},{key:"onSelectFile",value:function(e){e&&e.url&&(this.setState({hasError:!1}),this.props.setAttributes({href:e.url,fileName:e.title,textLinkHref:e.url,id:e.id}))}},{key:"confirmCopyURL",value:function(){this.setState({showCopyConfirmation:!0})}},{key:"resetCopyConfirmation",value:function(){this.setState({showCopyConfirmation:!1})}},{key:"changeLinkDestinationOption",value:function(e){this.props.setAttributes({textLinkHref:e})}},{key:"changeOpenInNewWindow",value:function(e){this.props.setAttributes({textLinkTarget:!!e&&"_blank"})}},{key:"changeShowDownloadButton",value:function(e){this.props.setAttributes({showDownloadButton:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.isSelected,r=e.attributes,o=e.setAttributes,a=e.noticeUI,c=e.noticeOperations,i=e.media,l=r.fileName,s=r.href,u=r.textLinkHref,b=r.textLinkTarget,m=r.showDownloadButton,d=r.downloadButtonText,h=r.id,p=this.state,g=p.hasError,O=p.showCopyConfirmation,j=i&&i.link;if(!s||g)return Object($.createElement)(W.MediaPlaceholder,{icon:Object($.createElement)(W.BlockIcon,{icon:zn}),labels:{title:Object(J.__)("File"),instructions:Object(J.__)("Drag a file, upload a new one or select a file from your library.")},onSelect:this.onSelectFile,notices:a,onError:c.createErrorNotice,accept:"*"});var f=Y()(t,{"is-transient":Object(Oe.isBlobURL)(s)});return Object($.createElement)($.Fragment,null,Object($.createElement)(Hn,Object(ee.a)({hrefs:{href:s,textLinkHref:u,attachmentPage:j}},{openInNewWindow:!!b,showDownloadButton:m,changeLinkDestinationOption:this.changeLinkDestinationOption,changeOpenInNewWindow:this.changeOpenInNewWindow,changeShowDownloadButton:this.changeShowDownloadButton})),Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.MediaUploadCheck,null,Object($.createElement)(X.Toolbar,null,Object($.createElement)(W.MediaUpload,{onSelect:this.onSelectFile,value:h,render:function(e){var t=e.open;return Object($.createElement)(X.IconButton,{className:"components-toolbar__control",label:Object(J.__)("Edit file"),onClick:t,icon:"edit"})}})))),Object($.createElement)("div",{className:f},Object($.createElement)("div",{className:"wp-block-file__content-wrapper"},Object($.createElement)(W.RichText,{wrapperClassName:"wp-block-file__textlink",tagName:"div",value:l,placeholder:Object(J.__)("Write file name…"),keepPlaceholderOnFocus:!0,formattingControls:[],onChange:function(e){return o({fileName:e})}}),m&&Object($.createElement)("div",{className:"wp-block-file__button-richtext-wrapper"},Object($.createElement)(W.RichText,{tagName:"div",className:"wp-block-file__button",value:d,formattingControls:[],placeholder:Object(J.__)("Add text…"),keepPlaceholderOnFocus:!0,onChange:function(e){return o({downloadButtonText:e})}}))),n&&Object($.createElement)(X.ClipboardButton,{isDefault:!0,text:s,className:"wp-block-file__copy-url-button",onCopy:this.confirmCopyURL,onFinishCopy:this.resetCopyConfirmation,disabled:Object(Oe.isBlobURL)(s)},O?Object(J.__)("Copied!"):Object(J.__)("Copy URL"))))}}]),t}($.Component),Fn=Object(ie.compose)([Object(le.withSelect)(function(e,t){var n=e("core").getMedia,r=t.attributes.id;return{media:void 0===r?void 0:n(r)}}),X.withNotices])(Dn),Vn="core/file",Un={title:Object(J.__)("File"),description:Object(J.__)("Add a link to a downloadable file."),icon:zn,category:"common",keywords:[Object(J.__)("document"),Object(J.__)("pdf")],attributes:{id:{type:"number"},href:{type:"string"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]",default:Object(J._x)("Download","button label")}},supports:{align:!0},transforms:{from:[{type:"files",isMatch:function(e){return e.length>0},priority:15,transform:function(e){var t=[];return e.forEach(function(e){var n=Object(Oe.createBlobURL)(e);t.push(Object(G.createBlock)("core/file",{href:n,fileName:e.name,textLinkHref:n}))}),t}},{type:"block",blocks:["core/audio"],transform:function(e){return Object(G.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id})}},{type:"block",blocks:["core/video"],transform:function(e){return Object(G.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id})}},{type:"block",blocks:["core/image"],transform:function(e){return Object(G.createBlock)("core/file",{href:e.url,fileName:e.caption,textLinkHref:e.url,id:e.id})}}],to:[{type:"block",blocks:["core/audio"],isMatch:function(e){var t=e.id;if(!t)return!1;var n=(0,Object(le.select)("core").getMedia)(t);return!!n&&Object(Z.includes)(n.mime_type,"audio")},transform:function(e){return Object(G.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id})}},{type:"block",blocks:["core/video"],isMatch:function(e){var t=e.id;if(!t)return!1;var n=(0,Object(le.select)("core").getMedia)(t);return!!n&&Object(Z.includes)(n.mime_type,"video")},transform:function(e){return Object(G.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id})}},{type:"block",blocks:["core/image"],isMatch:function(e){var t=e.id;if(!t)return!1;var n=(0,Object(le.select)("core").getMedia)(t);return!!n&&Object(Z.includes)(n.mime_type,"image")},transform:function(e){return Object(G.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id})}}]},edit:Fn,save:function(e){var t=e.attributes,n=t.href,r=t.fileName,o=t.textLinkHref,a=t.textLinkTarget,c=t.showDownloadButton,i=t.downloadButtonText;return n&&Object($.createElement)("div",null,!W.RichText.isEmpty(r)&&Object($.createElement)("a",{href:o,target:a,rel:!!a&&"noreferrer noopener"},Object($.createElement)(W.RichText.Content,{value:r})),c&&Object($.createElement)("a",{href:n,className:"wp-block-file__button",download:!0},Object($.createElement)(W.RichText.Content,{value:i})))}},Wn=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).state={isPreview:!1,styles:[]},e.switchToHTML=e.switchToHTML.bind(Object(ce.a)(Object(ce.a)(e))),e.switchToPreview=e.switchToPreview.bind(Object(ce.a)(Object(ce.a)(e))),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"componentDidMount",value:function(){var e=this.props.styles;this.setState({styles:["\n\t\t\thtml,body,:root {\n\t\t\t\tmargin: 0 !important;\n\t\t\t\tpadding: 0 !important;\n\t\t\t\toverflow: visible !important;\n\t\t\t\tmin-height: auto !important;\n\t\t\t}\n\t\t"].concat(Object(U.a)(Object(W.transformStyles)(e)))})}},{key:"switchToPreview",value:function(){this.setState({isPreview:!0})}},{key:"switchToHTML",value:function(){this.setState({isPreview:!1})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=this.state,o=r.isPreview,a=r.styles;return Object($.createElement)("div",{className:"wp-block-html"},Object($.createElement)(W.BlockControls,null,Object($.createElement)("div",{className:"components-toolbar"},Object($.createElement)("button",{className:"components-tab-button ".concat(o?"":"is-active"),onClick:this.switchToHTML},Object($.createElement)("span",null,"HTML")),Object($.createElement)("button",{className:"components-tab-button ".concat(o?"is-active":""),onClick:this.switchToPreview},Object($.createElement)("span",null,Object(J.__)("Preview"))))),Object($.createElement)(X.Disabled.Consumer,null,function(e){return o||e?Object($.createElement)(X.SandBox,{html:t.content,styles:a}):Object($.createElement)(W.PlainText,{value:t.content,onChange:function(e){return n({content:e})},placeholder:Object(J.__)("Write HTML…"),"aria-label":Object(J.__)("HTML")})}))}}]),t}($.Component),Gn=Object(le.withSelect)(function(e){return{styles:(0,e("core/block-editor").getSettings)().styles}})(Wn),qn="core/html",Kn={title:Object(J.__)("Custom HTML"),description:Object(J.__)("Add custom HTML code and preview it as you edit."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{d:"M4.5,11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5V11z M7,10.5h1.5V15H10v-4.5h1.5V9H7V10.5z M14.5,10l-1-1H12v6h1.5v-3.9 l1,1l1-1V15H17V9h-1.5L14.5,10z M19.5,13.5V9H18v6h5v-1.5H19.5z"})),category:"formatting",keywords:[Object(J.__)("embed")],supports:{customClassName:!1,className:!1,html:!1},attributes:{content:{type:"string",source:"html"}},transforms:{from:[{type:"raw",isMatch:function(e){return"FIGURE"===e.nodeName&&!!e.querySelector("iframe")},schema:{figure:{require:["iframe"],children:{iframe:{attributes:["src","allowfullscreen","height","width"]},figcaption:{children:Object(G.getPhrasingContentSchema)()}}}}}]},edit:Gn,save:function(e){var t=e.attributes;return Object($.createElement)($.RawHTML,null,t.content)}},$n=Object($.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{d:"M18 2l2 4h-2l-2-4h-3l2 4h-2l-2-4h-1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V2zm2 12H10V4.4L11.8 8H20z"}),Object($.createElement)(X.Path,{d:"M14 20H4V10h3V8H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3h-2z"}),Object($.createElement)(X.Path,{d:"M5 19h8l-1.59-2H9.24l-.84 1.1L7 16.3 5 19z"})),Qn=["image","video"],Yn=function(e){function t(){return Object(te.a)(this,t),Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"renderToolbarEditButton",value:function(){var e=this.props,t=e.mediaId,n=e.onSelectMedia;return Object($.createElement)(W.BlockControls,null,Object($.createElement)(X.Toolbar,null,Object($.createElement)(W.MediaUpload,{onSelect:n,allowedTypes:Qn,value:t,render:function(e){var t=e.open;return Object($.createElement)(X.IconButton,{className:"components-toolbar__control",label:Object(J.__)("Edit media"),icon:"edit",onClick:t})}})))}},{key:"renderImage",value:function(){var e=this.props,t=e.mediaAlt,n=e.mediaUrl,r=e.className;return Object($.createElement)($.Fragment,null,this.renderToolbarEditButton(),Object($.createElement)("figure",{className:r},Object($.createElement)("img",{src:n,alt:t})))}},{key:"renderVideo",value:function(){var e=this.props,t=e.mediaUrl,n=e.className;return Object($.createElement)($.Fragment,null,this.renderToolbarEditButton(),Object($.createElement)("figure",{className:n},Object($.createElement)("video",{controls:!0,src:t})))}},{key:"renderPlaceholder",value:function(){var e=this.props,t=e.onSelectMedia,n=e.className;return Object($.createElement)(W.MediaPlaceholder,{icon:Object($.createElement)(W.BlockIcon,{icon:$n}),labels:{title:Object(J.__)("Media area")},className:n,onSelect:t,accept:"image/*,video/*",allowedTypes:Qn})}},{key:"render",value:function(){var e=this.props,t=e.mediaPosition,n=e.mediaUrl,r=e.mediaType,o=e.mediaWidth,a=e.commitWidthChange,c=e.onWidthChange;if(r&&n){var i={right:"left"===t,left:"right"===t},l=null;switch(r){case"image":l=this.renderImage();break;case"video":l=this.renderVideo()}return Object($.createElement)(X.ResizableBox,{className:"editor-media-container__resizer",size:{width:o+"%"},minWidth:"10%",maxWidth:"100%",enable:i,onResize:function(e,t,n){c(parseInt(n.style.width))},onResizeStop:function(e,t,n){a(parseInt(n.style.width))},axis:"x"},l)}return this.renderPlaceholder()}}]),t}($.Component),Zn=["core/button","core/paragraph","core/heading","core/list"],Jn=[["core/paragraph",{fontSize:"large",placeholder:Object(J._x)("Content…","content placeholder")}]],Xn=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).onSelectMedia=e.onSelectMedia.bind(Object(ce.a)(Object(ce.a)(e))),e.onWidthChange=e.onWidthChange.bind(Object(ce.a)(Object(ce.a)(e))),e.commitWidthChange=e.commitWidthChange.bind(Object(ce.a)(Object(ce.a)(e))),e.state={mediaWidth:null},e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"onSelectMedia",value:function(e){var t,n,r=this.props.setAttributes;"image"===(t=e.media_type?"image"===e.media_type?"image":"video":e.type)&&(n=Object(Z.get)(e,["sizes","large","url"])||Object(Z.get)(e,["media_details","sizes","large","source_url"])),r({mediaAlt:e.alt,mediaId:e.id,mediaType:t,mediaUrl:n||e.url})}},{key:"onWidthChange",value:function(e){this.setState({mediaWidth:e})}},{key:"commitWidthChange",value:function(e){(0,this.props.setAttributes)({mediaWidth:e}),this.setState({mediaWidth:null})}},{key:"renderMediaArea",value:function(){var e=this.props.attributes,t=e.mediaAlt,n=e.mediaId,r=e.mediaPosition,o=e.mediaType,a=e.mediaUrl,c=e.mediaWidth;return Object($.createElement)(Yn,Object(ee.a)({className:"block-library-media-text__media-container",onSelectMedia:this.onSelectMedia,onWidthChange:this.onWidthChange,commitWidthChange:this.commitWidthChange},{mediaAlt:t,mediaId:n,mediaType:o,mediaUrl:a,mediaPosition:r,mediaWidth:c}))}},{key:"render",value:function(){var e,t=this.props,n=t.attributes,r=t.className,o=t.backgroundColor,a=t.isSelected,c=t.setAttributes,i=t.setBackgroundColor,l=n.isStackedOnMobile,s=n.mediaAlt,u=n.mediaPosition,b=n.mediaType,m=n.mediaWidth,d=this.state.mediaWidth,h=Y()(r,(e={"has-media-on-the-right":"right"===u,"is-selected":a},Object(q.a)(e,o.class,o.class),Object(q.a)(e,"is-stacked-on-mobile",l),e)),p="".concat(d||m,"%"),g={gridTemplateColumns:"right"===u?"auto ".concat(p):"".concat(p," auto"),backgroundColor:o.color},O=[{value:o.color,onChange:i,label:Object(J.__)("Background Color")}],j=[{icon:"align-pull-left",title:Object(J.__)("Show media on left"),isActive:"left"===u,onClick:function(){return c({mediaPosition:"left"})}},{icon:"align-pull-right",title:Object(J.__)("Show media on right"),isActive:"right"===u,onClick:function(){return c({mediaPosition:"right"})}}],f=Object($.createElement)(X.PanelBody,{title:Object(J.__)("Media & Text Settings")},Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Stack on mobile"),checked:l,onChange:function(){return c({isStackedOnMobile:!l})}}),"image"===b&&Object($.createElement)(X.TextareaControl,{label:Object(J.__)("Alt Text (Alternative Text)"),value:s,onChange:function(e){c({mediaAlt:e})},help:Object(J.__)("Alternative text describes your image to people who cant see it. Add a short description with its key details.")}));return Object($.createElement)($.Fragment,null,Object($.createElement)(W.InspectorControls,null,f,Object($.createElement)(W.PanelColorSettings,{title:Object(J.__)("Color Settings"),initialOpen:!1,colorSettings:O})),Object($.createElement)(W.BlockControls,null,Object($.createElement)(X.Toolbar,{controls:j})),Object($.createElement)("div",{className:h,style:g},this.renderMediaArea(),Object($.createElement)(W.InnerBlocks,{allowedBlocks:Zn,template:Jn,templateInsertUpdatesSelection:!1})))}}]),t}($.Component),er=Object(W.withColors)("backgroundColor")(Xn),tr=Object($.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{d:"M13 17h8v-2h-8v2zM3 19h8V5H3v14zM13 9h8V7h-8v2zm0 4h8v-2h-8v2z"})),nr="core/media-text",rr={align:{type:"string",default:"wide"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!1}},or={title:Object(J.__)("Media & Text"),description:Object(J.__)("Set media and words side-by-side for a richer layout."),icon:tr,category:"layout",keywords:[Object(J.__)("image"),Object(J.__)("video")],attributes:rr,supports:{align:["wide","full"],html:!1},transforms:{from:[{type:"block",blocks:["core/image"],transform:function(e){var t=e.alt,n=e.url,r=e.id;return Object(G.createBlock)("core/media-text",{mediaAlt:t,mediaId:r,mediaUrl:n,mediaType:"image"})}},{type:"block",blocks:["core/video"],transform:function(e){var t=e.src,n=e.id;return Object(G.createBlock)("core/media-text",{mediaId:n,mediaUrl:t,mediaType:"video"})}}],to:[{type:"block",blocks:["core/image"],isMatch:function(e){var t=e.mediaType;return!e.mediaUrl||"image"===t},transform:function(e){var t=e.mediaAlt,n=e.mediaId,r=e.mediaUrl;return Object(G.createBlock)("core/image",{alt:t,id:n,url:r})}},{type:"block",blocks:["core/video"],isMatch:function(e){var t=e.mediaType;return!e.mediaUrl||"video"===t},transform:function(e){var t=e.mediaId,n=e.mediaUrl;return Object(G.createBlock)("core/video",{id:t,src:n})}}]},edit:er,save:function(e){var t,n,r=e.attributes,o=r.backgroundColor,a=r.customBackgroundColor,c=r.isStackedOnMobile,i=r.mediaAlt,l=r.mediaPosition,s=r.mediaType,u=r.mediaUrl,b=r.mediaWidth,m=r.mediaId,d={image:function(){return Object($.createElement)("img",{src:u,alt:i,className:m&&"image"===s?"wp-image-".concat(m):null})},video:function(){return Object($.createElement)("video",{controls:!0,src:u})}},h=Object(W.getColorClassName)("background-color",o),p=Y()((t={"has-media-on-the-right":"right"===l},Object(q.a)(t,h,h),Object(q.a)(t,"is-stacked-on-mobile",c),t));50!==b&&(n="right"===l?"auto ".concat(b,"%"):"".concat(b,"% auto"));var g={backgroundColor:h?void 0:a,gridTemplateColumns:n};return Object($.createElement)("div",{className:p,style:g},Object($.createElement)("figure",{className:"wp-block-media-text__media"},(d[s]||Z.noop)()),Object($.createElement)("div",{className:"wp-block-media-text__content"},Object($.createElement)(W.InnerBlocks.Content,null)))},deprecated:[{attributes:rr,save:function(e){var t,n,r=e.attributes,o=r.backgroundColor,a=r.customBackgroundColor,c=r.isStackedOnMobile,i=r.mediaAlt,l=r.mediaPosition,s=r.mediaType,u=r.mediaUrl,b=r.mediaWidth,m={image:function(){return Object($.createElement)("img",{src:u,alt:i})},video:function(){return Object($.createElement)("video",{controls:!0,src:u})}},d=Object(W.getColorClassName)("background-color",o),h=Y()((t={"has-media-on-the-right":"right"===l},Object(q.a)(t,d,d),Object(q.a)(t,"is-stacked-on-mobile",c),t));50!==b&&(n="right"===l?"auto ".concat(b,"%"):"".concat(b,"% auto"));var p={backgroundColor:d?void 0:a,gridTemplateColumns:n};return Object($.createElement)("div",{className:h,style:p},Object($.createElement)("figure",{className:"wp-block-media-text__media"},(m[s]||Z.noop)()),Object($.createElement)("div",{className:"wp-block-media-text__content"},Object($.createElement)(W.InnerBlocks.Content,null)))}}]},ar=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).setAlignment=e.setAlignment.bind(Object(ce.a)(Object(ce.a)(e))),e.setCommentsToShow=e.setCommentsToShow.bind(Object(ce.a)(Object(ce.a)(e))),e.toggleDisplayAvatar=e.createToggleAttribute("displayAvatar"),e.toggleDisplayDate=e.createToggleAttribute("displayDate"),e.toggleDisplayExcerpt=e.createToggleAttribute("displayExcerpt"),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"createToggleAttribute",value:function(e){var t=this;return function(){var n=t.props.attributes[e];(0,t.props.setAttributes)(Object(q.a)({},e,!n))}}},{key:"setAlignment",value:function(e){this.props.setAttributes({align:e})}},{key:"setCommentsToShow",value:function(e){this.props.setAttributes({commentsToShow:e})}},{key:"render",value:function(){var e=this.props.attributes,t=e.align,n=e.commentsToShow,r=e.displayAvatar,o=e.displayDate,a=e.displayExcerpt;return Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.BlockAlignmentToolbar,{value:t,onChange:this.setAlignment})),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Latest Comments Settings")},Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Display Avatar"),checked:r,onChange:this.toggleDisplayAvatar}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Display Date"),checked:o,onChange:this.toggleDisplayDate}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Display Excerpt"),checked:a,onChange:this.toggleDisplayExcerpt}),Object($.createElement)(X.RangeControl,{label:Object(J.__)("Number of Comments"),value:n,onChange:this.setCommentsToShow,min:1,max:100}))),Object($.createElement)(X.Disabled,null,Object($.createElement)(W.ServerSideRender,{block:"core/latest-comments",attributes:this.props.attributes})))}}]),t}($.Component),cr="core/latest-comments",ir={title:Object(J.__)("Latest Comments"),description:Object(J.__)("Display a list of your most recent comments."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}))),category:"widgets",keywords:[Object(J.__)("recent comments")],supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if(["left","center","right","wide","full"].includes(t))return{"data-align":t}},edit:ar,save:function(){return null}},lr=n(31),sr=n.n(lr),ur=n(46),br={per_page:-1},mr=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).state={categoriesList:[]},e.toggleDisplayPostDate=e.toggleDisplayPostDate.bind(Object(ce.a)(Object(ce.a)(e))),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"componentWillMount",value:function(){var e=this;this.isStillMounted=!0,this.fetchRequest=sr()({path:Object(fe.addQueryArgs)("/wp/v2/categories",br)}).then(function(t){e.isStillMounted&&e.setState({categoriesList:t})}).catch(function(){e.isStillMounted&&e.setState({categoriesList:[]})})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"toggleDisplayPostDate",value:function(){var e=this.props.attributes.displayPostDate;(0,this.props.setAttributes)({displayPostDate:!e})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.latestPosts,o=this.state.categoriesList,a=t.displayPostDate,c=t.align,i=t.postLayout,l=t.columns,s=t.order,u=t.orderBy,b=t.categories,m=t.postsToShow,d=Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Latest Posts Settings")},Object($.createElement)(X.QueryControls,Object(ee.a)({order:s,orderBy:u},{numberOfItems:m,categoriesList:o,selectedCategoryId:b,onOrderChange:function(e){return n({order:e})},onOrderByChange:function(e){return n({orderBy:e})},onCategoryChange:function(e){return n({categories:""!==e?e:void 0})},onNumberOfItemsChange:function(e){return n({postsToShow:e})}})),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Display post date"),checked:a,onChange:this.toggleDisplayPostDate}),"grid"===i&&Object($.createElement)(X.RangeControl,{label:Object(J.__)("Columns"),value:l,onChange:function(e){return n({columns:e})},min:2,max:h?Math.min(6,r.length):6}))),h=Array.isArray(r)&&r.length;if(!h)return Object($.createElement)($.Fragment,null,d,Object($.createElement)(X.Placeholder,{icon:"admin-post",label:Object(J.__)("Latest Posts")},Array.isArray(r)?Object(J.__)("No posts found."):Object($.createElement)(X.Spinner,null)));var p=r.length>m?r.slice(0,m):r,g=[{icon:"list-view",title:Object(J.__)("List View"),onClick:function(){return n({postLayout:"list"})},isActive:"list"===i},{icon:"grid-view",title:Object(J.__)("Grid View"),onClick:function(){return n({postLayout:"grid"})},isActive:"grid"===i}],O=Object(ur.__experimentalGetSettings)().formats.date;return Object($.createElement)($.Fragment,null,d,Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.BlockAlignmentToolbar,{value:c,onChange:function(e){n({align:e})}}),Object($.createElement)(X.Toolbar,{controls:g})),Object($.createElement)("ul",{className:Y()(this.props.className,Object(q.a)({"is-grid":"grid"===i,"has-dates":a},"columns-".concat(l),"grid"===i))},p.map(function(e,t){var n=e.title.rendered.trim();return Object($.createElement)("li",{key:t},Object($.createElement)("a",{href:e.link,target:"_blank"},n?Object($.createElement)($.RawHTML,null,n):Object(J.__)("(Untitled)")),a&&e.date_gmt&&Object($.createElement)("time",{dateTime:Object(ur.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date"},Object(ur.dateI18n)(O,e.date_gmt)))})))}}]),t}($.Component),dr=Object(le.withSelect)(function(e,t){var n=t.attributes,r=n.postsToShow,o=n.order,a=n.orderBy,c=n.categories;return{latestPosts:(0,e("core").getEntityRecords)("postType","post",Object(Z.pickBy)({categories:c,order:o,orderby:a,per_page:r},function(e){return!Object(Z.isUndefined)(e)}))}})(mr),hr="core/latest-posts",pr={title:Object(J.__)("Latest Posts"),description:Object(J.__)("Display a list of your most recent posts."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(X.Rect,{x:"11",y:"7",width:"6",height:"2"}),Object($.createElement)(X.Rect,{x:"11",y:"11",width:"6",height:"2"}),Object($.createElement)(X.Rect,{x:"11",y:"15",width:"6",height:"2"}),Object($.createElement)(X.Rect,{x:"7",y:"7",width:"2",height:"2"}),Object($.createElement)(X.Rect,{x:"7",y:"11",width:"2",height:"2"}),Object($.createElement)(X.Rect,{x:"7",y:"15",width:"2",height:"2"}),Object($.createElement)(X.Path,{d:"M20.1,3H3.9C3.4,3,3,3.4,3,3.9v16.2C3,20.5,3.4,21,3.9,21h16.2c0.4,0,0.9-0.5,0.9-0.9V3.9C21,3.4,20.5,3,20.1,3z M19,19H5V5h14V19z"})),category:"widgets",keywords:[Object(J.__)("recent posts")],supports:{html:!1},getEditWrapperProps:function(e){var t=e.align;if(["left","center","right","wide","full"].includes(t))return{"data-align":t}},edit:dr,save:function(){return null}},gr=Object(K.a)({},Object(G.getPhrasingContentSchema)(),{ul:{},ol:{attributes:["type"]}});["ul","ol"].forEach(function(e){gr[e].children={li:{children:gr}}});var Or={className:!1},jr={ordered:{type:"boolean",default:!1},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",default:""}},fr="core/list",vr={title:Object(J.__)("List"),description:Object(J.__)("Create a bulleted or numbered list."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"}))),category:"common",keywords:[Object(J.__)("bullet list"),Object(J.__)("ordered list"),Object(J.__)("numbered list")],attributes:jr,supports:Or,transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/list",{values:Object(ht.toHTMLString)({value:Object(ht.join)(e.map(function(t){var n=t.content,r=Object(ht.create)({html:n});return e.length>1?r:Object(ht.replace)(r,/\n/g,ht.LINE_SEPARATOR)}),ht.LINE_SEPARATOR),multilineTag:"li"})})}},{type:"block",blocks:["core/quote"],transform:function(e){var t=e.value;return Object(G.createBlock)("core/list",{values:Object(ht.toHTMLString)({value:Object(ht.create)({html:t,multilineTag:"p"}),multilineTag:"li"})})}},{type:"raw",selector:"ol,ul",schema:{ol:gr.ol,ul:gr.ul},transform:function(e){return Object(G.createBlock)("core/list",Object(K.a)({},Object(G.getBlockAttributes)("core/list",e.outerHTML),{ordered:"OL"===e.nodeName}))}}].concat(Object(U.a)(["*","-"].map(function(e){return{type:"prefix",prefix:e,transform:function(e){return Object(G.createBlock)("core/list",{values:"<li>".concat(e,"</li>")})}}})),Object(U.a)(["1.","1)"].map(function(e){return{type:"prefix",prefix:e,transform:function(e){return Object(G.createBlock)("core/list",{ordered:!0,values:"<li>".concat(e,"</li>")})}}}))),to:[{type:"block",blocks:["core/paragraph"],transform:function(e){var t=e.values;return Object(ht.split)(Object(ht.create)({html:t,multilineTag:"li",multilineWrapperTags:["ul","ol"]}),ht.LINE_SEPARATOR).map(function(e){return Object(G.createBlock)("core/paragraph",{content:Object(ht.toHTMLString)({value:e})})})}},{type:"block",blocks:["core/quote"],transform:function(e){var t=e.values;return Object(G.createBlock)("core/quote",{value:Object(ht.toHTMLString)({value:Object(ht.create)({html:t,multilineTag:"li",multilineWrapperTags:["ul","ol"]}),multilineTag:"p"})})}}]},deprecated:[{supports:Or,attributes:Object(K.a)({},Object(Z.omit)(jr,["ordered"]),{nodeName:{type:"string",source:"property",selector:"ol,ul",property:"nodeName",default:"UL"}}),migrate:function(e){var t=e.nodeName,n=Object(ct.a)(e,["nodeName"]);return Object(K.a)({},n,{ordered:"OL"===t})},save:function(e){var t=e.attributes,n=t.nodeName,r=t.values;return Object($.createElement)(W.RichText.Content,{tagName:n.toLowerCase(),value:r})}}],merge:function(e,t){var n=t.values;return n&&"<li></li>"!==n?Object(K.a)({},e,{values:e.values+n}):e},edit:function(e){var t=e.attributes,n=e.insertBlocksAfter,r=e.setAttributes,o=e.mergeBlocks,a=e.onReplace,c=e.className,i=t.ordered,l=t.values;return Object($.createElement)(W.RichText,{identifier:"values",multiline:"li",tagName:i?"ol":"ul",onChange:function(e){return r({values:e})},value:l,wrapperClassName:"block-library-list",className:c,placeholder:Object(J.__)("Write list…"),onMerge:o,unstableOnSplit:n?function(e,t){for(var o=arguments.length,a=new Array(o>2?o-2:0),c=2;c<o;c++)a[c-2]=arguments[c];a.length||a.push(Object(G.createBlock)("core/paragraph")),"<li></li>"!==t&&a.push(Object(G.createBlock)("core/list",{ordered:i,values:t})),r({values:e}),n(a)}:void 0,onRemove:function(){return a([])},onTagNameChange:function(e){return r({ordered:"ol"===e})}})},save:function(e){var t=e.attributes,n=t.ordered,r=t.values,o=n?"ol":"ul";return Object($.createElement)(W.RichText.Content,{tagName:o,value:r,multiline:"li"})}};var yr=Object(le.withDispatch)(function(e,t){var n=t.clientId,r=t.attributes,o=e("core/block-editor").replaceBlock;return{convertToHTML:function(){o(n,Object(G.createBlock)("core/html",{content:r.originalUndelimitedContent}))}}})(function(e){var t,n=e.attributes,r=e.convertToHTML,o=n.originalName,a=n.originalUndelimitedContent,c=!!a,i=Object(G.getBlockType)("core/html"),l=[];return c&&i?(t=Object(J.sprintf)(Object(J.__)('Your site doesnt include support for the "%s" block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely.'),o),l.push(Object($.createElement)(X.Button,{key:"convert",onClick:r,isLarge:!0,isPrimary:!0},Object(J.__)("Keep as HTML")))):t=Object(J.sprintf)(Object(J.__)('Your site doesnt include support for the "%s" block. You can leave this block intact or remove it entirely.'),o),Object($.createElement)($.Fragment,null,Object($.createElement)(W.Warning,{actions:l},t),Object($.createElement)($.RawHTML,null,a))}),kr="core/missing",wr={name:kr,category:"common",title:Object(J.__)("Unrecognized Block"),description:Object(J.__)("Your site doesnt include support for this block."),supports:{className:!1,customClassName:!1,inserter:!1,html:!1,reusable:!1},attributes:{originalName:{type:"string"},originalUndelimitedContent:{type:"string"},originalContent:{type:"string",source:"html"}},edit:yr,save:function(e){var t=e.attributes;return Object($.createElement)($.RawHTML,null,t.originalContent)}},Cr=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).onChangeInput=e.onChangeInput.bind(Object(ce.a)(Object(ce.a)(e))),e.onKeyDown=e.onKeyDown.bind(Object(ce.a)(Object(ce.a)(e))),e.state={defaultText:Object(J.__)("Read more")},e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"onChangeInput",value:function(e){this.setState({defaultText:""});var t=0===e.target.value.length?void 0:e.target.value;this.props.setAttributes({customText:t})}},{key:"onKeyDown",value:function(e){var t=e.keyCode,n=this.props.insertBlocksAfter;t===jt.ENTER&&n([Object(G.createBlock)(Object(G.getDefaultBlockName)())])}},{key:"getHideExcerptHelp",value:function(e){return e?Object(J.__)("The excerpt is hidden."):Object(J.__)("The excerpt is visible.")}},{key:"render",value:function(){var e=this.props.attributes,t=e.customText,n=e.noTeaser,r=this.props.setAttributes,o=this.state.defaultText,a=void 0!==t?t:o,c=a.length+1;return Object($.createElement)($.Fragment,null,Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,null,Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Hide the excerpt on the full content page"),checked:!!n,onChange:function(){return r({noTeaser:!n})},help:this.getHideExcerptHelp}))),Object($.createElement)("div",{className:"wp-block-more"},Object($.createElement)("input",{type:"text",value:a,size:c,onChange:this.onChangeInput,onKeyDown:this.onKeyDown})))}}]),t}($.Component),Er="core/more",_r={title:Object(J._x)("More","block name"),description:Object(J.__)("Content before this block will be shown in the excerpt on your archives page."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M2 9v2h19V9H2zm0 6h5v-2H2v2zm7 0h5v-2H9v2zm7 0h5v-2h-5v2z"}))),category:"layout",supports:{customClassName:!1,className:!1,html:!1,multiple:!1},attributes:{customText:{type:"string"},noTeaser:{type:"boolean",default:!1}},transforms:{from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:function(e){return e.dataset&&"core/more"===e.dataset.block},transform:function(e){var t=e.dataset,n=t.customText,r=t.noTeaser,o={};return n&&(o.customText=n),""===r&&(o.noTeaser=!0),Object(G.createBlock)("core/more",o)}}]},edit:Cr,save:function(e){var t=e.attributes,n=t.customText,r=t.noTeaser,o=n?"\x3c!--more ".concat(n,"--\x3e"):"\x3c!--more--\x3e",a=r?"\x3c!--noteaser--\x3e":"";return Object($.createElement)($.RawHTML,null,Object(Z.compact)([o,a]).join("\n"))}};var xr="core/nextpage",Sr={title:Object(J.__)("Page Break"),description:Object(J.__)("Separate your content into a multi-page experience."),icon:Object($.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M9 12h6v-2H9zm-7 0h5v-2H2zm15 0h5v-2h-5zm3 2v2l-6 6H6a2 2 0 0 1-2-2v-6h2v6h6v-4a2 2 0 0 1 2-2h6zM4 8V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4h-2V4H6v4z"}))),category:"layout",keywords:[Object(J.__)("next page"),Object(J.__)("pagination")],supports:{customClassName:!1,className:!1,html:!1},attributes:{},transforms:{from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:function(e){return e.dataset&&"core/nextpage"===e.dataset.block},transform:function(){return Object(G.createBlock)("core/nextpage",{})}}]},edit:function(){return Object($.createElement)("div",{className:"wp-block-nextpage"},Object($.createElement)("span",null,Object(J.__)("Page break")))},save:function(){return Object($.createElement)($.RawHTML,null,"\x3c!--nextpage--\x3e")}},Tr="core/preformatted",Nr={title:Object(J.__)("Preformatted"),description:Object(J.__)("Add text that respects your spacing and tabs, and also allows styling."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(X.Path,{d:"M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4V6h16V18z"}),Object($.createElement)(X.Rect,{x:"6",y:"10",width:"2",height:"2"}),Object($.createElement)(X.Rect,{x:"6",y:"14",width:"8",height:"2"}),Object($.createElement)(X.Rect,{x:"16",y:"14",width:"2",height:"2"}),Object($.createElement)(X.Rect,{x:"10",y:"10",width:"8",height:"2"})),category:"formatting",attributes:{content:{type:"string",source:"html",selector:"pre",default:""}},transforms:{from:[{type:"block",blocks:["core/code","core/paragraph"],transform:function(e){var t=e.content;return Object(G.createBlock)("core/preformatted",{content:t})}},{type:"raw",isMatch:function(e){return"PRE"===e.nodeName&&!(1===e.children.length&&"CODE"===e.firstChild.nodeName)},schema:{pre:{children:Object(G.getPhrasingContentSchema)()}}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/paragraph",e)}}]},edit:function(e){var t=e.attributes,n=e.mergeBlocks,r=e.setAttributes,o=e.className,a=t.content;return Object($.createElement)(W.RichText,{tagName:"pre",value:a.replace(/\n/g,"<br>"),onChange:function(e){r({content:e})},placeholder:Object(J.__)("Write preformatted text…"),wrapperClassName:o,onMerge:n})},save:function(e){var t=e.attributes.content;return Object($.createElement)(W.RichText.Content,{tagName:"pre",value:t})},merge:function(e,t){return{content:e.content+t.content}}},Rr="is-style-".concat("solid-color"),Br=function(e){function t(e){var n;return Object(te.a)(this,t),(n=Object(re.a)(this,Object(oe.a)(t).call(this,e))).wasTextColorAutomaticallyComputed=!1,n.pullQuoteMainColorSetter=n.pullQuoteMainColorSetter.bind(Object(ce.a)(Object(ce.a)(n))),n.pullQuoteTextColorSetter=n.pullQuoteTextColorSetter.bind(Object(ce.a)(Object(ce.a)(n))),n}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"pullQuoteMainColorSetter",value:function(e){var t=this.props,n=t.colorUtils,r=t.textColor,o=t.setTextColor,a=t.setMainColor,c=t.className,i=Object(Z.includes)(c,Rr),l=!r.color||this.wasTextColorAutomaticallyComputed,s=i&&l&&e;a(e),s&&(this.wasTextColorAutomaticallyComputed=!0,o(n.getMostReadableColor(e)))}},{key:"pullQuoteTextColorSetter",value:function(e){(0,this.props.setTextColor)(e),this.wasTextColorAutomaticallyComputed=!1}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.mainColor,r=e.textColor,o=e.setAttributes,a=e.isSelected,c=e.className,i=t.value,l=t.citation,s=Object(Z.includes)(c,Rr),u=s?{backgroundColor:n.color}:{borderColor:n.color},b={color:r.color},m=r.color?Y()("has-text-color",Object(q.a)({},r.class,r.class)):void 0;return Object($.createElement)($.Fragment,null,Object($.createElement)("figure",{style:u,className:Y()(c,Object(q.a)({},n.class,s&&n.class))},Object($.createElement)("blockquote",{style:b,className:m},Object($.createElement)(W.RichText,{multiline:!0,value:i,onChange:function(e){return o({value:e})},placeholder:Object(J.__)("Write quote…"),wrapperClassName:"block-library-pullquote__content"}),(!W.RichText.isEmpty(l)||a)&&Object($.createElement)(W.RichText,{value:l,placeholder:Object(J.__)("Write citation…"),onChange:function(e){return o({citation:e})},className:"wp-block-pullquote__citation"}))),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(W.PanelColorSettings,{title:Object(J.__)("Color Settings"),colorSettings:[{value:n.color,onChange:this.pullQuoteMainColorSetter,label:Object(J.__)("Main Color")},{value:r.color,onChange:this.pullQuoteTextColorSetter,label:Object(J.__)("Text Color")}]},s&&Object($.createElement)(W.ContrastChecker,Object(ee.a)({textColor:r.color,backgroundColor:n.color},{isLargeText:!1})))))}}]),t}($.Component),Ar=Object(W.withColors)({mainColor:"background-color",textColor:"color"})(Br),Pr={value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},Ir="core/pullquote",Lr={title:Object(J.__)("Pullquote"),description:Object(J.__)("Give special visual emphasis to a quote from your text."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(X.Polygon,{points:"21 18 2 18 2 20 21 20"}),Object($.createElement)(X.Path,{d:"m19 10v4h-15v-4h15m1-2h-17c-0.55 0-1 0.45-1 1v6c0 0.55 0.45 1 1 1h17c0.55 0 1-0.45 1-1v-6c0-0.55-0.45-1-1-1z"}),Object($.createElement)(X.Polygon,{points:"21 4 2 4 2 6 21 6"})),category:"formatting",attributes:Pr,styles:[{name:"default",label:Object(J._x)("Default","block style"),isDefault:!0},{name:"solid-color",label:Object(J.__)("Solid Color")}],supports:{align:["left","right","wide","full"]},edit:Ar,save:function(e){var t,n,r=e.attributes,o=r.mainColor,a=r.customMainColor,c=r.textColor,i=r.customTextColor,l=r.value,s=r.citation,u=r.className;if(Object(Z.includes)(u,Rr))(t=Object(W.getColorClassName)("background-color",o))||(n={backgroundColor:a});else if(a)n={borderColor:a};else if(o){var b=Object(Z.get)(Object(le.select)("core/block-editor").getSettings(),["colors"],[]);n={borderColor:Object(W.getColorObjectByAttributeValues)(b,o).color}}var m=Object(W.getColorClassName)("color",c),d=c||i?Y()("has-text-color",Object(q.a)({},m,m)):void 0,h=m?void 0:{color:i};return Object($.createElement)("figure",{className:t,style:n},Object($.createElement)("blockquote",{className:d,style:h},Object($.createElement)(W.RichText.Content,{value:l,multiline:!0}),!W.RichText.isEmpty(s)&&Object($.createElement)(W.RichText.Content,{tagName:"cite",value:s})))},deprecated:[{attributes:Object(K.a)({},Pr),save:function(e){var t=e.attributes,n=t.value,r=t.citation;return Object($.createElement)("blockquote",null,Object($.createElement)(W.RichText.Content,{value:n,multiline:!0}),!W.RichText.isEmpty(r)&&Object($.createElement)(W.RichText.Content,{tagName:"cite",value:r}))}},{attributes:Object(K.a)({},Pr,{citation:{type:"string",source:"html",selector:"footer"},align:{type:"string",default:"none"}}),save:function(e){var t=e.attributes,n=t.value,r=t.citation,o=t.align;return Object($.createElement)("blockquote",{className:"align".concat(o)},Object($.createElement)(W.RichText.Content,{value:n,multiline:!0}),!W.RichText.isEmpty(r)&&Object($.createElement)(W.RichText.Content,{tagName:"footer",value:r}))}}]},Mr=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).titleField=Object($.createRef)(),e.editButton=Object($.createRef)(),e.handleFormSubmit=e.handleFormSubmit.bind(Object(ce.a)(Object(ce.a)(e))),e.handleTitleChange=e.handleTitleChange.bind(Object(ce.a)(Object(ce.a)(e))),e.handleTitleKeyDown=e.handleTitleKeyDown.bind(Object(ce.a)(Object(ce.a)(e))),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"componentDidMount",value:function(){this.props.isEditing&&this.titleField.current&&this.titleField.current.select()}},{key:"componentDidUpdate",value:function(e){!e.isEditing&&this.props.isEditing&&this.titleField.current.select(),!e.isEditing&&!e.isSaving||this.props.isEditing||this.props.isSaving||this.editButton.current.focus()}},{key:"handleFormSubmit",value:function(e){e.preventDefault(),this.props.onSave()}},{key:"handleTitleChange",value:function(e){this.props.onChangeTitle(e.target.value)}},{key:"handleTitleKeyDown",value:function(e){e.keyCode===jt.ESCAPE&&(e.stopPropagation(),this.props.onCancel())}},{key:"render",value:function(){var e=this.props,t=e.isEditing,n=e.title,r=e.isSaving,o=e.isEditDisabled,a=e.onEdit,c=e.instanceId;return Object($.createElement)($.Fragment,null,!t&&!r&&Object($.createElement)("div",{className:"reusable-block-edit-panel"},Object($.createElement)("b",{className:"reusable-block-edit-panel__info"},n),Object($.createElement)(X.Button,{ref:this.editButton,isLarge:!0,className:"reusable-block-edit-panel__button",disabled:o,onClick:a},Object(J.__)("Edit"))),(t||r)&&Object($.createElement)("form",{className:"reusable-block-edit-panel",onSubmit:this.handleFormSubmit},Object($.createElement)("label",{htmlFor:"reusable-block-edit-panel__title-".concat(c),className:"reusable-block-edit-panel__label"},Object(J.__)("Name:")),Object($.createElement)("input",{ref:this.titleField,type:"text",disabled:r,className:"reusable-block-edit-panel__title",value:n,onChange:this.handleTitleChange,onKeyDown:this.handleTitleKeyDown,id:"reusable-block-edit-panel__title-".concat(c)}),Object($.createElement)(X.Button,{type:"submit",isLarge:!0,isBusy:r,disabled:!n||r,className:"reusable-block-edit-panel__button"},Object(J.__)("Save"))))}}]),t}($.Component),zr=Object(ie.withInstanceId)(Mr);var Hr=function(e){var t=e.title,n=Object(J.sprintf)(Object(J.__)("Reusable Block: %s"),t);return Object($.createElement)(X.Tooltip,{text:n},Object($.createElement)("span",{className:"reusable-block-indicator"},Object($.createElement)(X.Dashicon,{icon:"controls-repeat"})))},Dr=function(e){function t(e){var n,r=e.reusableBlock;return Object(te.a)(this,t),(n=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).startEditing=n.startEditing.bind(Object(ce.a)(Object(ce.a)(n))),n.stopEditing=n.stopEditing.bind(Object(ce.a)(Object(ce.a)(n))),n.setAttributes=n.setAttributes.bind(Object(ce.a)(Object(ce.a)(n))),n.setTitle=n.setTitle.bind(Object(ce.a)(Object(ce.a)(n))),n.save=n.save.bind(Object(ce.a)(Object(ce.a)(n))),r&&r.isTemporary?n.state={isEditing:!0,title:r.title,changedAttributes:{}}:n.state={isEditing:!1,title:null,changedAttributes:null},n}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"componentDidMount",value:function(){this.props.reusableBlock||this.props.fetchReusableBlock()}},{key:"startEditing",value:function(){var e=this.props.reusableBlock;this.setState({isEditing:!0,title:e.title,changedAttributes:{}})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,title:null,changedAttributes:null})}},{key:"setAttributes",value:function(e){this.setState(function(t){if(null!==t.changedAttributes)return{changedAttributes:Object(K.a)({},t.changedAttributes,e)}})}},{key:"setTitle",value:function(e){this.setState({title:e})}},{key:"save",value:function(){var e=this.props,t=e.reusableBlock,n=e.onUpdateTitle,r=e.updateAttributes,o=e.block,a=e.onSave,c=this.state,i=c.title,l=c.changedAttributes;i!==t.title&&n(i),r(o.clientId,l),a(),this.stopEditing()}},{key:"render",value:function(){var e=this.props,t=e.isSelected,n=e.reusableBlock,r=e.block,o=e.isFetching,a=e.isSaving,c=e.canUpdateBlock,i=this.state,l=i.isEditing,s=i.title,u=i.changedAttributes;if(!n&&o)return Object($.createElement)(X.Placeholder,null,Object($.createElement)(X.Spinner,null));if(!n||!r)return Object($.createElement)(X.Placeholder,null,Object(J.__)("Block has been deleted or is unavailable."));var b=Object($.createElement)(W.BlockEdit,Object(ee.a)({},this.props,{isSelected:l&&t,clientId:r.clientId,name:r.name,attributes:Object(K.a)({},r.attributes,u),setAttributes:l?this.setAttributes:Z.noop}));return l||(b=Object($.createElement)(X.Disabled,null,b)),Object($.createElement)($.Fragment,null,(t||l)&&Object($.createElement)(zr,{isEditing:l,title:null!==s?s:n.title,isSaving:a&&!n.isTemporary,isEditDisabled:!c,onEdit:this.startEditing,onChangeTitle:this.setTitle,onSave:this.save,onCancel:this.stopEditing}),!t&&!l&&Object($.createElement)(Hr,{title:n.title}),b)}}]),t}($.Component),Fr=Object(ie.compose)([Object(le.withSelect)(function(e,t){var n=e("core/editor"),r=n.__experimentalGetReusableBlock,o=n.__experimentalIsFetchingReusableBlock,a=n.__experimentalIsSavingReusableBlock,c=e("core").canUser,i=e("core/block-editor").getBlock,l=t.attributes.ref,s=r(l);return{reusableBlock:s,isFetching:o(l),isSaving:a(l),block:s?i(s.clientId):null,canUpdateBlock:!!s&&!s.isTemporary&&!!c("update","blocks",l)}}),Object(le.withDispatch)(function(e,t){var n=e("core/editor"),r=n.__experimentalFetchReusableBlocks,o=n.__experimentalUpdateReusableBlockTitle,a=n.__experimentalSaveReusableBlock,c=e("core/block-editor").updateBlockAttributes,i=t.attributes.ref;return{fetchReusableBlock:Object(Z.partial)(r,i),updateAttributes:c,onUpdateTitle:Object(Z.partial)(o,i),onSave:Object(Z.partial)(a,i)}})])(Dr),Vr="core/block",Ur={title:Object(J.__)("Reusable Block"),category:"reusable",description:Object(J.__)("Create content, and save it for you and other contributors to reuse across your site. Update the block, and the changes apply everywhere its used."),attributes:{ref:{type:"number"}},supports:{customClassName:!1,html:!1,inserter:!1},edit:Fr,save:function(){return null}},Wr=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.feedURL},e.toggleAttribute=e.toggleAttribute.bind(Object(ce.a)(Object(ce.a)(e))),e.onSubmitURL=e.onSubmitURL.bind(Object(ce.a)(Object(ce.a)(e))),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"toggleAttribute",value:function(e){var t=this;return function(){var n=t.props.attributes[e];(0,t.props.setAttributes)(Object(q.a)({},e,!n))}}},{key:"onSubmitURL",value:function(e){e.preventDefault(),this.props.attributes.feedURL&&this.setState({editing:!1})}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.blockLayout,r=t.columns,o=t.displayAuthor,a=t.displayExcerpt,c=t.displayDate,i=t.excerptLength,l=t.feedURL,s=t.itemsToShow,u=this.props.setAttributes;if(this.state.editing)return Object($.createElement)(X.Placeholder,{icon:"rss",label:"RSS"},Object($.createElement)("form",{onSubmit:this.onSubmitURL},Object($.createElement)(X.TextControl,{placeholder:Object(J.__)("Enter URL here…"),value:l,onChange:function(e){return u({feedURL:e})},className:"components-placeholder__input"}),Object($.createElement)(X.Button,{isLarge:!0,type:"submit"},Object(J.__)("Use URL"))));var b=[{icon:"edit",title:Object(J.__)("Edit RSS URL"),onClick:function(){return e.setState({editing:!0})}},{icon:"list-view",title:Object(J.__)("List View"),onClick:function(){return u({blockLayout:"list"})},isActive:"list"===n},{icon:"grid-view",title:Object(J.__)("Grid View"),onClick:function(){return u({blockLayout:"grid"})},isActive:"grid"===n}];return Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(X.Toolbar,{controls:b})),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("RSS Settings")},Object($.createElement)(X.RangeControl,{label:Object(J.__)("Number of items"),value:s,onChange:function(e){return u({itemsToShow:e})},min:1,max:10}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Display author"),checked:o,onChange:this.toggleAttribute("displayAuthor")}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Display date"),checked:c,onChange:this.toggleAttribute("displayDate")}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Display excerpt"),checked:a,onChange:this.toggleAttribute("displayExcerpt")}),a&&Object($.createElement)(X.RangeControl,{label:Object(J.__)("Max number of words in excerpt"),value:i,onChange:function(e){return u({excerptLength:e})},min:10,max:100}),"grid"===n&&Object($.createElement)(X.RangeControl,{label:Object(J.__)("Columns"),value:r,onChange:function(e){return u({columns:e})},min:2,max:6}))),Object($.createElement)(X.Disabled,null,Object($.createElement)(X.ServerSideRender,{block:"core/rss",attributes:this.props.attributes})))}}]),t}($.Component),Gr="core/rss",qr={title:Object(J.__)("RSS"),description:Object(J.__)("Display entries from any RSS or Atom feed."),icon:"rss",category:"widgets",keywords:[Object(J.__)("atom"),Object(J.__)("feed")],supports:{html:!1},edit:Wr,save:function(){return null}};var Kr="core/search",$r={title:Object(J.__)("Search"),description:Object(J.__)("Help visitors find your content."),icon:"search",category:"widgets",keywords:[Object(J.__)("find")],edit:function(e){var t=e.className,n=e.attributes,r=e.setAttributes,o=n.label,a=n.placeholder,c=n.buttonText;return Object($.createElement)("div",{className:t},Object($.createElement)(W.RichText,{wrapperClassName:"wp-block-search__label","aria-label":Object(J.__)("Label text"),placeholder:Object(J.__)("Add label…"),keepPlaceholderOnFocus:!0,formattingControls:[],value:o,onChange:function(e){return r({label:e})}}),Object($.createElement)("input",{className:"wp-block-search__input","aria-label":Object(J.__)("Optional placeholder text"),placeholder:a?void 0:Object(J.__)("Optional placeholder…"),value:a,onChange:function(e){return r({placeholder:e.target.value})}}),Object($.createElement)(W.RichText,{wrapperClassName:"wp-block-search__button",className:"wp-block-search__button-rich-text","aria-label":Object(J.__)("Button text"),placeholder:Object(J.__)("Add button text…"),keepPlaceholderOnFocus:!0,formattingControls:[],value:c,onChange:function(e){return r({buttonText:e})}}))},save:function(){return null}},Qr="core/separator",Yr={title:Object(J.__)("Separator"),description:Object(J.__)("Create a break between ideas or sections with a horizontal separator."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.Path,{d:"M19 13H5v-2h14v2z"})),category:"layout",keywords:[Object(J.__)("horizontal-line"),"hr",Object(J.__)("divider")],styles:[{name:"default",label:Object(J.__)("Default"),isDefault:!0},{name:"wide",label:Object(J.__)("Wide Line")},{name:"dots",label:Object(J.__)("Dots")}],transforms:{from:[{type:"enter",regExp:/^-{3,}$/,transform:function(){return Object(G.createBlock)("core/separator")}},{type:"raw",selector:"hr",schema:{hr:{}}}]},edit:function(e){var t=e.className;return Object($.createElement)("hr",{className:t})},save:function(){return Object($.createElement)("hr",null)}},Zr=n(60),Jr="core/shortcode",Xr={title:Object(J.__)("Shortcode"),description:Object(J.__)("Insert additional custom elements with a WordPress shortcode."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{d:"M8.5,21.4l1.9,0.5l5.2-19.3l-1.9-0.5L8.5,21.4z M3,19h4v-2H5V7h2V5H3V19z M17,5v2h2v10h-2v2h4V5H17z"})),category:"widgets",attributes:{text:{type:"string",source:"html"}},transforms:{from:[{type:"shortcode",tag:"[a-z][a-z0-9_-]*",attributes:{text:{type:"string",shortcode:function(e,t){var n=t.content;return Object(Zr.removep)(Object(Zr.autop)(n))}}},priority:20}]},supports:{customClassName:!1,className:!1,html:!1},edit:Object(ie.withInstanceId)(function(e){var t=e.attributes,n=e.setAttributes,r=e.instanceId,o="blocks-shortcode-input-".concat(r);return Object($.createElement)("div",{className:"wp-block-shortcode"},Object($.createElement)("label",{htmlFor:o},Object($.createElement)(X.Dashicon,{icon:"shortcode"}),Object(J.__)("Shortcode")),Object($.createElement)(W.PlainText,{className:"input-control",id:o,value:t.text,placeholder:Object(J.__)("Write shortcode here…"),onChange:function(e){return n({text:e})}}))}),save:function(e){var t=e.attributes;return Object($.createElement)($.RawHTML,null,t.text)}},eo="core/spacer",to={title:Object(J.__)("Spacer"),description:Object(J.__)("Add white space between blocks and customize its height."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M13 4v2h3.59L6 16.59V13H4v7h7v-2H7.41L18 7.41V11h2V4h-7"}))),category:"layout",attributes:{height:{type:"number",default:100}},edit:Object(ie.withInstanceId)(function(e){var t=e.attributes,n=e.isSelected,r=e.setAttributes,o=e.toggleSelection,a=e.instanceId,c=t.height,i="block-spacer-height-input-".concat(a);return Object($.createElement)($.Fragment,null,Object($.createElement)(X.ResizableBox,{className:Y()("block-library-spacer__resize-container",{"is-selected":n}),size:{height:c},minHeight:"20",enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStop:function(e,t,n,a){r({height:parseInt(c+a.height,10)}),o(!0)},onResizeStart:function(){o(!1)}}),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Spacer Settings")},Object($.createElement)(X.BaseControl,{label:Object(J.__)("Height in pixels"),id:i},Object($.createElement)("input",{type:"number",id:i,onChange:function(e){r({height:parseInt(e.target.value,10)})},value:c,min:"20",step:"10"})))))}),save:function(e){var t=e.attributes;return Object($.createElement)("div",{style:{height:t.height},"aria-hidden":!0})}},no=n(49),ro=n.n(no),oo="core/subhead",ao={title:Object(J.__)("Subheading (deprecated)"),description:Object(J.__)("This block is deprecated. Please use the Paragraph block instead."),icon:Object($.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(X.Path,{d:"M7.1 6l-.5 3h4.5L9.4 19h3l1.8-10h4.5l.5-3H7.1z"})),category:"common",supports:{inserter:!1,multiple:!1},attributes:{content:{type:"string",source:"html",selector:"p"},align:{type:"string"}},transforms:{to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/paragraph",e)}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.align,a=t.content,c=t.placeholder;return ro()("The Subheading block",{alternative:"the Paragraph block",plugin:"Gutenberg"}),Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.AlignmentToolbar,{value:o,onChange:function(e){n({align:e})}})),Object($.createElement)(W.RichText,{tagName:"p",value:a,onChange:function(e){n({content:e})},style:{textAlign:o},className:r,placeholder:c||Object(J.__)("Write subheading…")}))},save:function(e){var t=e.attributes,n=t.align,r=t.content;return Object($.createElement)(W.RichText.Content,{tagName:"p",style:{textAlign:n},value:r})}};var co=[{color:"#f3f4f5",name:"Subtle light gray",slug:"subtle-light-gray"},{color:"#e9fbe5",name:"Subtle pale green",slug:"subtle-pale-green"},{color:"#e7f5fe",name:"Subtle pale blue",slug:"subtle-pale-blue"},{color:"#fcf0ef",name:"Subtle pale pink",slug:"subtle-pale-pink"}],io=Object(W.createCustomColorsHOC)(co),lo=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).onCreateTable=e.onCreateTable.bind(Object(ce.a)(Object(ce.a)(e))),e.onChangeFixedLayout=e.onChangeFixedLayout.bind(Object(ce.a)(Object(ce.a)(e))),e.onChange=e.onChange.bind(Object(ce.a)(Object(ce.a)(e))),e.onChangeInitialColumnCount=e.onChangeInitialColumnCount.bind(Object(ce.a)(Object(ce.a)(e))),e.onChangeInitialRowCount=e.onChangeInitialRowCount.bind(Object(ce.a)(Object(ce.a)(e))),e.renderSection=e.renderSection.bind(Object(ce.a)(Object(ce.a)(e))),e.getTableControls=e.getTableControls.bind(Object(ce.a)(Object(ce.a)(e))),e.onInsertRow=e.onInsertRow.bind(Object(ce.a)(Object(ce.a)(e))),e.onInsertRowBefore=e.onInsertRowBefore.bind(Object(ce.a)(Object(ce.a)(e))),e.onInsertRowAfter=e.onInsertRowAfter.bind(Object(ce.a)(Object(ce.a)(e))),e.onDeleteRow=e.onDeleteRow.bind(Object(ce.a)(Object(ce.a)(e))),e.onInsertColumn=e.onInsertColumn.bind(Object(ce.a)(Object(ce.a)(e))),e.onInsertColumnBefore=e.onInsertColumnBefore.bind(Object(ce.a)(Object(ce.a)(e))),e.onInsertColumnAfter=e.onInsertColumnAfter.bind(Object(ce.a)(Object(ce.a)(e))),e.onDeleteColumn=e.onDeleteColumn.bind(Object(ce.a)(Object(ce.a)(e))),e.state={initialRowCount:2,initialColumnCount:2,selectedCell:null},e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"onChangeInitialColumnCount",value:function(e){this.setState({initialColumnCount:e})}},{key:"onChangeInitialRowCount",value:function(e){this.setState({initialRowCount:e})}},{key:"onCreateTable",value:function(e){e.preventDefault();var t,n,r,o=this.props.setAttributes,a=this.state,c=a.initialRowCount,i=a.initialColumnCount;c=parseInt(c,10)||2,i=parseInt(i,10)||2,o((n=(t={rowCount:c,columnCount:i}).rowCount,r=t.columnCount,{body:Object(Z.times)(n,function(){return{cells:Object(Z.times)(r,function(){return{content:"",tag:"td"}})}})}))}},{key:"onChangeFixedLayout",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({hasFixedLayout:!t.hasFixedLayout})}},{key:"onChange",value:function(e){var t=this.state.selectedCell;if(t){var n=this.props,r=n.attributes;(0,n.setAttributes)(function(e,t){var n=t.section,r=t.rowIndex,o=t.columnIndex,a=t.content;return Object(q.a)({},n,e[n].map(function(e,t){return t!==r?e:{cells:e.cells.map(function(e,t){return t!==o?e:Object(K.a)({},e,{content:a})})}}))}(r,{section:t.section,rowIndex:t.rowIndex,columnIndex:t.columnIndex,content:e}))}}},{key:"onInsertRow",value:function(e){var t=this.state.selectedCell;if(t){var n=this.props,r=n.attributes,o=n.setAttributes,a=t.section,c=t.rowIndex;this.setState({selectedCell:null}),o(function(e,t){var n=t.section,r=t.rowIndex,o=e[n][0].cells.length;return Object(q.a)({},n,[].concat(Object(U.a)(e[n].slice(0,r)),[{cells:Object(Z.times)(o,function(){return{content:"",tag:"td"}})}],Object(U.a)(e[n].slice(r))))}(r,{section:a,rowIndex:c+e}))}}},{key:"onInsertRowBefore",value:function(){this.onInsertRow(0)}},{key:"onInsertRowAfter",value:function(){this.onInsertRow(1)}},{key:"onDeleteRow",value:function(){var e=this.state.selectedCell;if(e){var t=this.props,n=t.attributes,r=t.setAttributes,o=e.section,a=e.rowIndex;this.setState({selectedCell:null}),r(function(e,t){var n=t.section,r=t.rowIndex;return Object(q.a)({},n,e[n].filter(function(e,t){return t!==r}))}(n,{section:o,rowIndex:a}))}}},{key:"onInsertColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.state.selectedCell;if(t){var n=this.props,r=n.attributes,o=n.setAttributes,a=t.section,c=t.columnIndex;this.setState({selectedCell:null}),o(function(e,t){var n=t.section,r=t.columnIndex;return Object(q.a)({},n,e[n].map(function(e){return{cells:[].concat(Object(U.a)(e.cells.slice(0,r)),[{content:"",tag:"td"}],Object(U.a)(e.cells.slice(r)))}}))}(r,{section:a,columnIndex:c+e}))}}},{key:"onInsertColumnBefore",value:function(){this.onInsertColumn(0)}},{key:"onInsertColumnAfter",value:function(){this.onInsertColumn(1)}},{key:"onDeleteColumn",value:function(){var e=this.state.selectedCell;if(e){var t=this.props,n=t.attributes,r=t.setAttributes,o=e.section,a=e.columnIndex;this.setState({selectedCell:null}),r(function(e,t){var n=t.section,r=t.columnIndex;return Object(q.a)({},n,e[n].map(function(e){return{cells:e.cells.filter(function(e,t){return t!==r})}}).filter(function(e){return e.cells.length}))}(n,{section:o,columnIndex:a}))}}},{key:"createOnFocus",value:function(e){var t=this;return function(){t.setState({selectedCell:e})}}},{key:"getTableControls",value:function(){var e=this.state.selectedCell;return[{icon:"table-row-before",title:Object(J.__)("Add Row Before"),isDisabled:!e,onClick:this.onInsertRowBefore},{icon:"table-row-after",title:Object(J.__)("Add Row After"),isDisabled:!e,onClick:this.onInsertRowAfter},{icon:"table-row-delete",title:Object(J.__)("Delete Row"),isDisabled:!e,onClick:this.onDeleteRow},{icon:"table-col-before",title:Object(J.__)("Add Column Before"),isDisabled:!e,onClick:this.onInsertColumnBefore},{icon:"table-col-after",title:Object(J.__)("Add Column After"),isDisabled:!e,onClick:this.onInsertColumnAfter},{icon:"table-col-delete",title:Object(J.__)("Delete Column"),isDisabled:!e,onClick:this.onDeleteColumn}]}},{key:"renderSection",value:function(e){var t=this,n=e.type,r=e.rows;if(!r.length)return null;var o="t".concat(n),a=this.state.selectedCell;return Object($.createElement)(o,null,r.map(function(e,r){var o=e.cells;return Object($.createElement)("tr",{key:r},o.map(function(e,o){var c=e.content,i=e.tag,l=a&&n===a.section&&r===a.rowIndex&&o===a.columnIndex,s={section:n,rowIndex:r,columnIndex:o},u=Y()({"is-selected":l});return Object($.createElement)(i,{key:o,className:u},Object($.createElement)(W.RichText,{className:"wp-block-table__cell-content",value:c,onChange:t.onChange,unstableOnFocus:t.createOnFocus(s)}))}))}))}},{key:"componentDidUpdate",value:function(){var e=this.props.isSelected,t=this.state.selectedCell;!e&&t&&this.setState({selectedCell:null})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.className,r=e.backgroundColor,o=e.setBackgroundColor,a=this.state,c=a.initialRowCount,i=a.initialColumnCount,l=t.hasFixedLayout,s=t.head,u=t.body,b=t.foot,m=!s.length&&!u.length&&!b.length,d=this.renderSection;if(m)return Object($.createElement)("form",{onSubmit:this.onCreateTable},Object($.createElement)(X.TextControl,{type:"number",label:Object(J.__)("Column Count"),value:i,onChange:this.onChangeInitialColumnCount,min:"1"}),Object($.createElement)(X.TextControl,{type:"number",label:Object(J.__)("Row Count"),value:c,onChange:this.onChangeInitialRowCount,min:"1"}),Object($.createElement)(X.Button,{isPrimary:!0,type:"submit"},Object(J.__)("Create")));var h=Y()(n,r.class,{"has-fixed-layout":l,"has-background":!!r.color});return Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(X.Toolbar,null,Object($.createElement)(X.DropdownMenu,{icon:"editor-table",label:Object(J.__)("Edit table"),controls:this.getTableControls()}))),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Table Settings"),className:"blocks-table-settings"},Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Fixed width table cells"),checked:!!l,onChange:this.onChangeFixedLayout})),Object($.createElement)(W.PanelColorSettings,{title:Object(J.__)("Color Settings"),initialOpen:!1,colorSettings:[{value:r.color,onChange:o,label:Object(J.__)("Background Color"),disableCustomColors:!0,colors:co}]})),Object($.createElement)("table",{className:h},Object($.createElement)(d,{type:"head",rows:s}),Object($.createElement)(d,{type:"body",rows:u}),Object($.createElement)(d,{type:"foot",rows:b})))}}]),t}($.Component),so=io("backgroundColor")(lo),uo={tr:{allowEmpty:!0,children:{th:{allowEmpty:!0,children:Object(G.getPhrasingContentSchema)()},td:{allowEmpty:!0,children:Object(G.getPhrasingContentSchema)()}}}},bo={table:{children:{thead:{allowEmpty:!0,children:uo},tfoot:{allowEmpty:!0,children:uo},tbody:{allowEmpty:!0,children:uo}}}};function mo(e){return{type:"array",default:[],source:"query",selector:"t".concat(e," tr"),query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"}}}}}}var ho="core/table",po={title:Object(J.__)("Table"),description:Object(J.__)("Insert a table — perfect for sharing charts and data."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M20 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h15zm-5 14h-5v-9h5v9zM5 10h3v9H5v-9zm12 9v-9h3v9h-3z"}))),category:"formatting",attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},head:mo("head"),body:mo("body"),foot:mo("foot")},styles:[{name:"regular",label:Object(J._x)("Default","block style"),isDefault:!0},{name:"stripes",label:Object(J.__)("Stripes")}],supports:{align:!0},transforms:{from:[{type:"raw",selector:"table",schema:bo}]},edit:so,save:function(e){var t=e.attributes,n=t.hasFixedLayout,r=t.head,o=t.body,a=t.foot,c=t.backgroundColor;if(!r.length&&!o.length&&!a.length)return null;var i=Object(W.getColorClassName)("background-color",c),l=Y()(i,{"has-fixed-layout":n,"has-background":!!i}),s=function(e){var t=e.type,n=e.rows;if(!n.length)return null;var r="t".concat(t);return Object($.createElement)(r,null,n.map(function(e,t){var n=e.cells;return Object($.createElement)("tr",{key:t},n.map(function(e,t){var n=e.content,r=e.tag;return Object($.createElement)(W.RichText.Content,{tagName:r,value:n,key:t})}))}))};return Object($.createElement)("table",{className:l},Object($.createElement)(s,{type:"head",rows:r}),Object($.createElement)(s,{type:"body",rows:o}),Object($.createElement)(s,{type:"foot",rows:a}))}},go="core/template",Oo={title:Object(J.__)("Reusable Template"),category:"reusable",description:Object(J.__)("Template block used as a container."),icon:Object($.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object($.createElement)(X.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object($.createElement)(X.G,null,Object($.createElement)(X.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),supports:{customClassName:!1,html:!1,inserter:!1},edit:function(){return Object($.createElement)(W.InnerBlocks,null)},save:function(){return Object($.createElement)(W.InnerBlocks.Content,null)}},jo="core/text-columns",fo={supports:{inserter:!1},title:Object(J.__)("Text Columns (deprecated)"),description:Object(J.__)("This block is deprecated. Please use the Columns block instead."),icon:"columns",category:"layout",attributes:{content:{type:"array",source:"query",selector:"p",query:{children:{type:"string",source:"html"}},default:[{},{}]},columns:{type:"number",default:2},width:{type:"string"}},transforms:{to:[{type:"block",blocks:["core/columns"],transform:function(e){var t=e.className,n=e.columns,r=e.content,o=e.width;return Object(G.createBlock)("core/columns",{align:"wide"===o||"full"===o?o:void 0,className:t,columns:n},r.map(function(e){var t=e.children;return Object(G.createBlock)("core/column",{},[Object(G.createBlock)("core/paragraph",{content:t})])}))}}]},getEditWrapperProps:function(e){var t=e.width;if("wide"===t||"full"===t)return{"data-align":t}},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=t.width,a=t.content,c=t.columns;return ro()("The Text Columns block",{alternative:"the Columns block",plugin:"Gutenberg"}),Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.BlockAlignmentToolbar,{value:o,onChange:function(e){return n({width:e})},controls:["center","wide","full"]})),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,null,Object($.createElement)(X.RangeControl,{label:Object(J.__)("Columns"),value:c,onChange:function(e){return n({columns:e})},min:2,max:4}))),Object($.createElement)("div",{className:"".concat(r," align").concat(o," columns-").concat(c)},Object(Z.times)(c,function(e){return Object($.createElement)("div",{className:"wp-block-column",key:"column-".concat(e)},Object($.createElement)(W.RichText,{tagName:"p",value:Object(Z.get)(a,[e,"children"]),onChange:function(t){n({content:[].concat(Object(U.a)(a.slice(0,e)),[{children:t}],Object(U.a)(a.slice(e+1)))})},placeholder:Object(J.__)("New Column")}))})))},save:function(e){var t=e.attributes,n=t.width,r=t.content,o=t.columns;return Object($.createElement)("div",{className:"align".concat(n," columns-").concat(o)},Object(Z.times)(o,function(e){return Object($.createElement)("div",{className:"wp-block-column",key:"column-".concat(e)},Object($.createElement)(W.RichText.Content,{tagName:"p",value:Object(Z.get)(r,[e,"children"])}))}))}},vo="core/verse",yo={title:Object(J.__)("Verse"),description:Object(J.__)("Insert poetry. Use special spacing formats. Or quote song lyrics."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.Path,{d:"M3 17v4h4l11-11-4-4L3 17zm3 2H5v-1l9-9 1 1-9 9zM21 6l-3-3h-1l-2 2 4 4 2-2V6z"})),category:"formatting",keywords:[Object(J.__)("poetry")],attributes:{content:{type:"string",source:"html",selector:"pre",default:""},textAlign:{type:"string"}},transforms:{from:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/verse",e)}}],to:[{type:"block",blocks:["core/paragraph"],transform:function(e){return Object(G.createBlock)("core/paragraph",e)}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.className,o=e.mergeBlocks,a=t.textAlign,c=t.content;return Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(W.AlignmentToolbar,{value:a,onChange:function(e){n({textAlign:e})}})),Object($.createElement)(W.RichText,{tagName:"pre",value:c,onChange:function(e){n({content:e})},style:{textAlign:a},placeholder:Object(J.__)("Write…"),wrapperClassName:r,onMerge:o}))},save:function(e){var t=e.attributes,n=t.textAlign,r=t.content;return Object($.createElement)(W.RichText.Content,{tagName:"pre",style:{textAlign:n},value:r})},merge:function(e,t){return{content:e.content+t.content}}},ko=Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object($.createElement)(X.Path,{d:"M4 6.47L5.76 10H20v8H4V6.47M22 4h-4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4z"})),wo=["video"],Co=["image"],Eo=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.src},e.videoPlayer=Object($.createRef)(),e.posterImageButton=Object($.createRef)(),e.toggleAttribute=e.toggleAttribute.bind(Object(ce.a)(Object(ce.a)(e))),e.onSelectURL=e.onSelectURL.bind(Object(ce.a)(Object(ce.a)(e))),e.onSelectPoster=e.onSelectPoster.bind(Object(ce.a)(Object(ce.a)(e))),e.onRemovePoster=e.onRemovePoster.bind(Object(ce.a)(Object(ce.a)(e))),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.attributes,r=t.noticeOperations,o=t.setAttributes,a=n.id,c=n.src,i=void 0===c?"":c;if(!a&&Object(Oe.isBlobURL)(i)){var l=Object(Oe.getBlobByURL)(i);l&&Object(W.mediaUpload)({filesList:[l],onFileChange:function(e){var t=Object(je.a)(e,1)[0].url;o({src:t})},onError:function(t){e.setState({editing:!0}),r.createErrorNotice(t)},allowedTypes:wo})}}},{key:"componentDidUpdate",value:function(e){this.props.attributes.poster!==e.attributes.poster&&this.videoPlayer.current.load()}},{key:"toggleAttribute",value:function(e){var t=this;return function(n){t.props.setAttributes(Object(q.a)({},e,n))}}},{key:"onSelectURL",value:function(e){var t=this.props,n=t.attributes,r=t.setAttributes;if(e!==n.src){var o=We({attributes:{url:e}});if(void 0!==o)return void this.props.onReplace(o);r({src:e,id:void 0})}this.setState({editing:!1})}},{key:"onSelectPoster",value:function(e){(0,this.props.setAttributes)({poster:e.url})}},{key:"onRemovePoster",value:function(){(0,this.props.setAttributes)({poster:""}),this.posterImageButton.current.focus()}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.autoplay,r=t.caption,o=t.controls,a=t.loop,c=t.muted,i=t.poster,l=t.preload,s=t.src,u=this.props,b=u.setAttributes,m=u.isSelected,d=u.className,h=u.noticeOperations,p=u.noticeUI,g=this.state.editing,O=function(){e.setState({editing:!0})};return g?Object($.createElement)(W.MediaPlaceholder,{icon:Object($.createElement)(W.BlockIcon,{icon:ko}),className:d,onSelect:function(t){if(!t||!t.url)return b({src:void 0,id:void 0}),void O();b({src:t.url,id:t.id}),e.setState({src:t.url,editing:!1})},onSelectURL:this.onSelectURL,accept:"video/*",allowedTypes:wo,value:this.props.attributes,notices:p,onError:h.createErrorNotice}):Object($.createElement)($.Fragment,null,Object($.createElement)(W.BlockControls,null,Object($.createElement)(X.Toolbar,null,Object($.createElement)(X.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(J.__)("Edit video"),onClick:O,icon:"edit"}))),Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Video Settings")},Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Autoplay"),onChange:this.toggleAttribute("autoplay"),checked:n}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Loop"),onChange:this.toggleAttribute("loop"),checked:a}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Muted"),onChange:this.toggleAttribute("muted"),checked:c}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Playback Controls"),onChange:this.toggleAttribute("controls"),checked:o}),Object($.createElement)(X.SelectControl,{label:Object(J.__)("Preload"),value:l,onChange:function(e){return b({preload:e})},options:[{value:"auto",label:Object(J.__)("Auto")},{value:"metadata",label:Object(J.__)("Metadata")},{value:"none",label:Object(J.__)("None")}]}),Object($.createElement)(W.MediaUploadCheck,null,Object($.createElement)(X.BaseControl,{className:"editor-video-poster-control",label:Object(J.__)("Poster Image")},Object($.createElement)(W.MediaUpload,{title:Object(J.__)("Select Poster Image"),onSelect:this.onSelectPoster,allowedTypes:Co,render:function(t){var n=t.open;return Object($.createElement)(X.Button,{isDefault:!0,onClick:n,ref:e.posterImageButton},e.props.attributes.poster?Object(J.__)("Replace image"):Object(J.__)("Select Poster Image"))}}),!!this.props.attributes.poster&&Object($.createElement)(X.Button,{onClick:this.onRemovePoster,isLink:!0,isDestructive:!0},Object(J.__)("Remove Poster Image")))))),Object($.createElement)("figure",{className:d},Object($.createElement)(X.Disabled,null,Object($.createElement)("video",{controls:o,poster:i,src:s,ref:this.videoPlayer})),(!W.RichText.isEmpty(r)||m)&&Object($.createElement)(W.RichText,{tagName:"figcaption",placeholder:Object(J.__)("Write caption…"),value:r,onChange:function(e){return b({caption:e})},inlineToolbar:!0})))}}]),t}($.Component),_o=Object(X.withNotices)(Eo),xo="core/video",So={title:Object(J.__)("Video"),description:Object(J.__)("Embed a video from your media library or upload a new one."),icon:ko,keywords:[Object(J.__)("movie")],category:"common",attributes:{autoplay:{type:"boolean",source:"attribute",selector:"video",attribute:"autoplay"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",source:"attribute",selector:"video",attribute:"controls",default:!0},id:{type:"number"},loop:{type:"boolean",source:"attribute",selector:"video",attribute:"loop"},muted:{type:"boolean",source:"attribute",selector:"video",attribute:"muted"},poster:{type:"string",source:"attribute",selector:"video",attribute:"poster"},preload:{type:"string",source:"attribute",selector:"video",attribute:"preload",default:"metadata"},src:{type:"string",source:"attribute",selector:"video",attribute:"src"}},transforms:{from:[{type:"files",isMatch:function(e){return 1===e.length&&0===e[0].type.indexOf("video/")},transform:function(e){var t=e[0];return Object(G.createBlock)("core/video",{src:Object(Oe.createBlobURL)(t)})}}]},supports:{align:!0},edit:_o,save:function(e){var t=e.attributes,n=t.autoplay,r=t.caption,o=t.controls,a=t.loop,c=t.muted,i=t.poster,l=t.preload,s=t.src;return Object($.createElement)("figure",null,s&&Object($.createElement)("video",{autoPlay:n,controls:o,loop:a,muted:c,poster:i,preload:"metadata"!==l?l:void 0,src:s}),!W.RichText.isEmpty(r)&&Object($.createElement)(W.RichText.Content,{tagName:"figcaption",value:r}))}},To=function(e){function t(){var e;return Object(te.a)(this,t),(e=Object(re.a)(this,Object(oe.a)(t).apply(this,arguments))).state={editing:!e.props.attributes.taxonomy},e.setTaxonomy=e.setTaxonomy.bind(Object(ce.a)(Object(ce.a)(e))),e.toggleShowTagCounts=e.toggleShowTagCounts.bind(Object(ce.a)(Object(ce.a)(e))),e}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"getTaxonomyOptions",value:function(){var e=Object(Z.filter)(this.props.taxonomies,"show_cloud"),t={label:Object(J.__)("- Select -"),value:""},n=Object(Z.map)(e,function(e){return{value:e.slug,label:e.name}});return[t].concat(Object(U.a)(n))}},{key:"setTaxonomy",value:function(e){(0,this.props.setAttributes)({taxonomy:e})}},{key:"toggleShowTagCounts",value:function(){var e=this.props,t=e.attributes;(0,e.setAttributes)({showTagCounts:!t.showTagCounts})}},{key:"render",value:function(){var e=this.props.attributes,t=e.taxonomy,n=e.showTagCounts,r=this.getTaxonomyOptions(),o=Object($.createElement)(W.InspectorControls,null,Object($.createElement)(X.PanelBody,{title:Object(J.__)("Tag Cloud Settings")},Object($.createElement)(X.SelectControl,{label:Object(J.__)("Taxonomy"),options:r,value:t,onChange:this.setTaxonomy}),Object($.createElement)(X.ToggleControl,{label:Object(J.__)("Show post counts"),checked:n,onChange:this.toggleShowTagCounts})));return Object($.createElement)($.Fragment,null,o,Object($.createElement)(X.ServerSideRender,{key:"tag-cloud",block:"core/tag-cloud",attributes:e}))}}]),t}($.Component),No=Object(le.withSelect)(function(e){return{taxonomies:e("core").getTaxonomies()}})(To),Ro="core/tag-cloud",Bo={title:Object(J.__)("Tag Cloud"),description:Object(J.__)("A cloud of your most used tags."),icon:"tag",category:"widgets",supports:{html:!1,align:!0},edit:No,save:function(){return null}},Ao=window.wp;var Po=function(e){function t(e){var n;return Object(te.a)(this,t),(n=Object(re.a)(this,Object(oe.a)(t).call(this,e))).initialize=n.initialize.bind(Object(ce.a)(Object(ce.a)(n))),n.onSetup=n.onSetup.bind(Object(ce.a)(Object(ce.a)(n))),n.focus=n.focus.bind(Object(ce.a)(Object(ce.a)(n))),n}return Object(ae.a)(t,e),Object(ne.a)(t,[{key:"componentDidMount",value:function(){var e=window.wpEditorL10n.tinymce,t=e.baseURL,n=e.suffix;window.tinymce.EditorManager.overrideDefaults({base_url:t,suffix:n}),"complete"===document.readyState?this.initialize():window.addEventListener("DOMContentLoaded",this.initialize)}},{key:"componentWillUnmount",value:function(){window.addEventListener("DOMContentLoaded",this.initialize),Ao.oldEditor.remove("editor-".concat(this.props.clientId))}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.clientId,r=t.attributes.content,o=window.tinymce.get("editor-".concat(n));e.attributes.content!==r&&o.setContent(r||"")}},{key:"initialize",value:function(){var e=this.props.clientId,t=window.wpEditorL10n.tinymce.settings;Ao.oldEditor.initialize("editor-".concat(e),{tinymce:Object(K.a)({},t,{inline:!0,content_css:!1,fixed_toolbar_container:"#toolbar-".concat(e),setup:this.onSetup})})}},{key:"onSetup",value:function(e){var t,n=this,r=this.props,o=r.attributes.content,a=r.setAttributes,c=this.ref;this.editor=e,o&&e.on("loadContent",function(){return e.setContent(o)}),e.on("blur",function(){return t=e.selection.getBookmark(2,!0),a({content:e.getContent()}),e.once("focus",function(){t&&e.selection.moveToBookmark(t)}),!1}),e.on("mousedown touchstart",function(){t=null}),e.on("keydown",function(t){t.keyCode!==jt.BACKSPACE&&t.keyCode!==jt.DELETE||!function(e){var t=e.getBody();return!(t.childNodes.length>1)&&(0===t.childNodes.length||!(t.childNodes[0].childNodes.length>1)&&/^\n?$/.test(t.innerText||t.textContent))}(e)||(n.props.onReplace([]),t.preventDefault(),t.stopImmediatePropagation()),t.altKey&&t.keyCode===jt.F10&&t.stopPropagation()}),e.addButton("kitchensink",{tooltip:Object(J._x)("More","button to expand options"),icon:"dashicon dashicons-editor-kitchensink",onClick:function(){var t=!this.active();this.active(t),e.dom.toggleClass(c,"has-advanced-toolbar",t)}}),e.on("init",function(){e.settings.toolbar1&&-1===e.settings.toolbar1.indexOf("kitchensink")&&e.dom.addClass(c,"has-advanced-toolbar")}),e.addButton("wp_add_media",{tooltip:Object(J.__)("Insert Media"),icon:"dashicon dashicons-admin-media",cmd:"WP_Medialib"}),e.on("init",function(){var e=n.editor.getBody();document.activeElement===e&&(e.blur(),n.editor.focus())})}},{key:"focus",value:function(){this.editor&&this.editor.focus()}},{key:"onToolbarKeyDown",value:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}},{key:"render",value:function(){var e=this,t=this.props.clientId;return[Object($.createElement)("div",{key:"toolbar",id:"toolbar-".concat(t),ref:function(t){return e.ref=t},className:"block-library-classic__toolbar",onClick:this.focus,"data-placeholder":Object(J.__)("Classic"),onKeyDown:this.onToolbarKeyDown}),Object($.createElement)("div",{key:"editor",id:"editor-".concat(t),className:"wp-block-freeform block-library-rich-text__tinymce"})]}}]),t}($.Component),Io="core/freeform",Lo={title:Object(J._x)("Classic","block title"),description:Object(J.__)("Use the classic WordPress editor."),icon:Object($.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object($.createElement)(X.Path,{d:"M0,0h24v24H0V0z M0,0h24v24H0V0z",fill:"none"}),Object($.createElement)(X.Path,{d:"m20 7v10h-16v-10h16m0-2h-16c-1.1 0-1.99 0.9-1.99 2l-0.01 10c0 1.1 0.9 2 2 2h16c1.1 0 2-0.9 2-2v-10c0-1.1-0.9-2-2-2z"}),Object($.createElement)(X.Rect,{x:"11",y:"8",width:"2",height:"2"}),Object($.createElement)(X.Rect,{x:"11",y:"11",width:"2",height:"2"}),Object($.createElement)(X.Rect,{x:"8",y:"8",width:"2",height:"2"}),Object($.createElement)(X.Rect,{x:"8",y:"11",width:"2",height:"2"}),Object($.createElement)(X.Rect,{x:"5",y:"11",width:"2",height:"2"}),Object($.createElement)(X.Rect,{x:"5",y:"8",width:"2",height:"2"}),Object($.createElement)(X.Rect,{x:"8",y:"14",width:"8",height:"2"}),Object($.createElement)(X.Rect,{x:"14",y:"11",width:"2",height:"2"}),Object($.createElement)(X.Rect,{x:"14",y:"8",width:"2",height:"2"}),Object($.createElement)(X.Rect,{x:"17",y:"11",width:"2",height:"2"}),Object($.createElement)(X.Rect,{x:"17",y:"8",width:"2",height:"2"})),category:"formatting",attributes:{content:{type:"string",source:"html"}},supports:{className:!1,customClassName:!1,reusable:!1},edit:Po,save:function(e){var t=e.attributes.content;return Object($.createElement)($.RawHTML,null,t)}};n.d(t,"registerCoreBlocks",function(){return Mo});var Mo=function(){[r,o,a,i,w,c,A,l,s,u,b,m,d,h,p,g,O].concat(Object(U.a)(Ln),Object(U.a)(Mn),[j,window.wp&&window.wp.oldEditor?V:null,f,v,y,k,C,E,_,x,S,N,R,B,T,P,I,L,F,M,z,H,D]).forEach(function(e){if(e){var t=e.name,n=e.settings;Object(G.registerBlockType)(t,n)}}),Object(G.setDefaultBlockName)(pe),window.wp&&window.wp.oldEditor&&Object(G.setFreeformContentHandlerName)(Io),Object(G.setUnregisteredTypeHandlerName)(kr)}},31:function(e,t){!function(){e.exports=this.wp.apiFetch}()},32:function(e,t){!function(){e.exports=this.wp.blob}()},33:function(e,t,n){"use strict";function r(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",function(){return r})},34:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return r})},35:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,"a",function(){return r})},37:function(e,t){!function(){e.exports=this.wp.viewport}()},38:function(e,t,n){e.exports=function(e,t){var n,r,o,a=0;function c(){var t,c,i=r,l=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(c=0;c<l;c++)if(i.args[c]!==arguments[c]){i=i.next;continue e}return i!==r&&(i===o&&(o=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=r,i.prev=null,r.prev=i,r=i),i.val}i=i.next}for(t=new Array(l),c=0;c<l;c++)t[c]=arguments[c];return i={args:t,val:e.apply(null,t)},r?(r.prev=i,i.next=r):o=i,a===n?(o=o.prev).next=null:a++,r=i,i.val}return t&&t.maxSize&&(n=t.maxSize),c.clear=function(){r=null,o=null,a=0},c}},4:function(e,t){!function(){e.exports=this.wp.components}()},46:function(e,t){!function(){e.exports=this.wp.date}()},49:function(e,t){!function(){e.exports=this.wp.deprecated}()},5:function(e,t){!function(){e.exports=this.wp.data}()},51:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},58:function(e,t){!function(){e.exports=this.wp.blockEditor}()},6:function(e,t){!function(){e.exports=this.wp.editor}()},60:function(e,t){!function(){e.exports=this.wp.autop}()},62:function(e,t,n){var r;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
!function(){"use strict";var n=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)o(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function o(e,o){if(o){var a=typeof o;"string"===a?function(e,t){for(var n=t.split(r),o=n.length,a=0;a<o;++a)e[n[a]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===a?function(e,t){for(var r in t)n.call(t,r)&&(e[r]=!!t[r])}(e,o):"number"===a&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=new e;t(a,r);var c=[];for(var i in a)a[i]&&c.push(i);return c.join(" ")}}();e.exports?(n.default=n,e.exports=n):void 0===(r=function(){return n}.apply(t,[]))||(e.exports=r)}()},7:function(e,t){!function(){e.exports=this.wp.compose}()},77:function(e,t,n){"use strict";var r=n(101),o=n(103);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=f,t.resolve=function(e,t){return f(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?f(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=f(e));return e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var c=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,s=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(s),b=["%","/","?",";","#"].concat(u),m=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},O={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},j=n(104);function f(e,t,n){if(e&&o.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),i=-1!==a&&a<e.indexOf("#")?"?":"#",s=e.split(i);s[0]=s[0].replace(/\\/g,"/");var f=e=s.join(i);if(f=f.trim(),!n&&1===e.split("#").length){var v=l.exec(f);if(v)return this.path=f,this.href=f,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?j.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var y=c.exec(f);if(y){var k=(y=y[0]).toLowerCase();this.protocol=k,f=f.substr(y.length)}if(n||y||f.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===f.substr(0,2);!w||y&&g[y]||(f=f.substr(2),this.slashes=!0)}if(!g[y]&&(w||y&&!O[y])){for(var C,E,_=-1,x=0;x<m.length;x++){-1!==(S=f.indexOf(m[x]))&&(-1===_||S<_)&&(_=S)}-1!==(E=-1===_?f.lastIndexOf("@"):f.lastIndexOf("@",_))&&(C=f.slice(0,E),f=f.slice(E+1),this.auth=decodeURIComponent(C)),_=-1;for(x=0;x<b.length;x++){var S;-1!==(S=f.indexOf(b[x]))&&(-1===_||S<_)&&(_=S)}-1===_&&(_=f.length),this.host=f.slice(0,_),f=f.slice(_),this.parseHost(),this.hostname=this.hostname||"";var T="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!T)for(var N=this.hostname.split(/\./),R=(x=0,N.length);x<R;x++){var B=N[x];if(B&&!B.match(d)){for(var A="",P=0,I=B.length;P<I;P++)B.charCodeAt(P)>127?A+="x":A+=B[P];if(!A.match(d)){var L=N.slice(0,x),M=N.slice(x+1),z=B.match(h);z&&(L.push(z[1]),M.unshift(z[2])),M.length&&(f="/"+M.join(".")+f),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=r.toASCII(this.hostname));var H=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+H,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==f[0]&&(f="/"+f))}if(!p[k])for(x=0,R=u.length;x<R;x++){var F=u[x];if(-1!==f.indexOf(F)){var V=encodeURIComponent(F);V===F&&(V=escape(F)),f=f.split(F).join(V)}}var U=f.indexOf("#");-1!==U&&(this.hash=f.substr(U),f=f.slice(0,U));var W=f.indexOf("?");if(-1!==W?(this.search=f.substr(W),this.query=f.substr(W+1),t&&(this.query=j.parse(this.query)),f=f.slice(0,W)):t&&(this.search="",this.query={}),f&&(this.pathname=f),O[k]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){H=this.pathname||"";var G=this.search||"";this.path=H+G}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",a=!1,c="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(c=j.stringify(this.query));var i=this.search||c&&"?"+c||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||O[t])&&!1!==a?(a="//"+(a||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):a||(a=""),r&&"#"!==r.charAt(0)&&(r="#"+r),i&&"?"!==i.charAt(0)&&(i="?"+i),t+a+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(i=i.replace("#","%23"))+r},a.prototype.resolve=function(e){return this.resolveObject(f(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(o.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var n=new a,r=Object.keys(this),c=0;c<r.length;c++){var i=r[c];n[i]=this[i]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),s=0;s<l.length;s++){var u=l[s];"protocol"!==u&&(n[u]=e[u])}return O[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!O[e.protocol]){for(var b=Object.keys(e),m=0;m<b.length;m++){var d=b[m];n[d]=e[d]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var p=n.pathname||"",j=n.search||"";n.path=p+j}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var f=n.pathname&&"/"===n.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=v||f||n.host&&e.pathname,k=y,w=n.pathname&&n.pathname.split("/")||[],C=(h=e.pathname&&e.pathname.split("/")||[],n.protocol&&!O[n.protocol]);if(C&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),y=y&&(""===h[0]||""===w[0])),v)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,w=h;else if(h.length)w||(w=[]),w.pop(),w=w.concat(h),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(C)n.hostname=n.host=w.shift(),(T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=w.slice(-1)[0],_=(n.host||e.host||w.length>1)&&("."===E||".."===E)||""===E,x=0,S=w.length;S>=0;S--)"."===(E=w[S])?w.splice(S,1):".."===E?(w.splice(S,1),x++):x&&(w.splice(S,1),x--);if(!y&&!k)for(;x--;x)w.unshift("..");!y||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),_&&"/"!==w.join("/").substr(-1)&&w.push("");var T,N=""===w[0]||w[0]&&"/"===w[0].charAt(0);C&&(n.hostname=n.host=N?"":w.length?w.shift():"",(T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift()));return(y=y||n.host&&w.length)&&!N&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=i.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},8:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(15);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){Object(r.a)(e,t,n[t])})}return e}},81:function(e,t){!function(){e.exports=this.wp.coreData}()},9: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})}});