Full Site Editing - Version 3.50331

Version Description

Download this release

Release Info

Developer dsas
Plugin Icon wp plugin Full Site Editing
Version 3.50331
Comparing to
See all releases

Code changes from version 3.50324 to 3.50331

build_meta.txt CHANGED
@@ -1,3 +1,3 @@
1
- commit_hash=47d5234c3bdd1363390326e7754ab54539fa685f
2
- commit_url=https://github.com/Automattic/wp-calypso/commit/47d5234c3bdd1363390326e7754ab54539fa685f
3
- build_number=3.50324
1
+ commit_hash=9019dccf6f3316d54a47c30e6e21cb0e8d0f5fa5
2
+ commit_url=https://github.com/Automattic/wp-calypso/commit/9019dccf6f3316d54a47c30e6e21cb0e8d0f5fa5
3
+ build_number=3.50331
full-site-editing-plugin.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: WordPress.com Editing Toolkit
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
- * Version: 3.50324
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
@@ -42,7 +42,7 @@ namespace A8C\FSE;
42
  *
43
  * @var string
44
  */
45
- define( 'A8C_ETK_PLUGIN_VERSION', '3.50324' );
46
 
47
  // Always include these helper files for dotcom FSE.
48
  require_once __DIR__ . '/dotcom-fse/helpers.php';
2
  /**
3
  * Plugin Name: WordPress.com Editing Toolkit
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
+ * Version: 3.50331
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
42
  *
43
  * @var string
44
  */
45
+ define( 'A8C_ETK_PLUGIN_VERSION', '3.50331' );
46
 
47
  // Always include these helper files for dotcom FSE.
48
  require_once __DIR__ . '/dotcom-fse/helpers.php';
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: automattic
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.5
5
  Tested up to: 6.0
6
- Stable tag: 3.50324
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.5
5
  Tested up to: 6.0
6
+ Stable tag: 3.50331
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
wpcom-global-styles/dist/wpcom-global-styles.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill'), 'version' => '2426affec11f405f3845');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill'), 'version' => '11df70d5a5f9bbcfebb1');
wpcom-global-styles/dist/wpcom-global-styles.js CHANGED
@@ -1695,7 +1695,7 @@ function GlobalStylesNoticeComponent() {
1695
  status: "warning",
1696
  isDismissible: false,
1697
  className: "wpcom-global-styles-notice"
1698
- }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createInterpolateElement)(__('To publish these styles, and to unlock tons of other features, <a>upgrade to a Premium plan</a>.', 'full-site-editing'), {
1699
  a: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ExternalLink, {
1700
  href: wpcomGlobalStyles.upgradeUrl,
1701
  target: "_blank",
1695
  status: "warning",
1696
  isDismissible: false,
1697
  className: "wpcom-global-styles-notice"
1698
+ }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createInterpolateElement)(__('Your changes include customized styles that will only be visible once you <a>upgrade to a Premium plan</a>.', 'full-site-editing'), {
1699
  a: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ExternalLink, {
1700
  href: wpcomGlobalStyles.upgradeUrl,
1701
  target: "_blank",
wpcom-global-styles/dist/wpcom-global-styles.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var e={421:(e,t)=>{"use strict";var n=decodeURIComponent,r=encodeURIComponent,o=/; */,s=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function i(e,t){try{return t(e)}catch(n){return e}}},881:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,s=7*o,i=365.25*o;function a(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"weeks":case"week":case"w":return c*s;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var s=Math.abs(e);if(s>=o)return a(e,s,o,"day");if(s>=r)return a(e,s,r,"hour");if(s>=n)return a(e,s,n,"minute");if(s>=t)return a(e,s,t,"second");return e+" ms"}(e):function(e){var s=Math.abs(e);if(s>=o)return Math.round(e/o)+"d";if(s>=r)return Math.round(e/r)+"h";if(s>=n)return Math.round(e/n)+"m";if(s>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},699:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,s),r(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,o,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var i=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var o,s,i,l;if(a(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),i=s[t]),void 0===i)i=s[t]=n,++e._eventsCount;else if("function"==typeof i?i=s[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(o=c(e))>0&&i.length>o&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):p(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(s){r.once&&e.removeEventListener(t,o),n(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,s=this._events;if(void 0!==s)o=o&&void 0===s.error;else if(!o)return!1;if(o){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var c=s[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var l=c.length,u=p(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,s,i;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){i=n[s].listener,o=s;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,s=Object.keys(n);for(r=0;r<s.length;++r)"removeListener"!==(o=s[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},495:(e,t,n)=>{"use strict";var r=n(212),o=n(561);function s(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=s,s.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},s.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},s.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,s=8;s<this.padLength;s++)r[o++]=0;return r}},32:(e,t,n)=>{"use strict";var r=n(212),o=n(495),s=n(713),i=n(561),a=r.sum32,c=r.sum32_4,l=r.sum32_5,u=s.ch32,f=s.maj32,d=s.s0_256,h=s.s1_256,p=s.g0_256,g=s.g1_256,m=o.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}r.inherits(v,m),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=c(g(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var o=this.h[0],s=this.h[1],m=this.h[2],y=this.h[3],v=this.h[4],_=this.h[5],w=this.h[6],C=this.h[7];for(i(this.k.length===n.length),r=0;r<n.length;r++){var b=l(C,h(v),u(v,_,w),this.k[r],n[r]),F=a(d(o),f(o,s,m));C=w,w=_,_=v,v=a(y,b),y=m,m=s,s=o,o=a(b,F)}this.h[0]=a(this.h[0],o),this.h[1]=a(this.h[1],s),this.h[2]=a(this.h[2],m),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],v),this.h[5]=a(this.h[5],_),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],C)},v.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},713:(e,t,n)=>{"use strict";var r=n(212).rotr32;function o(e,t,n){return e&t^~e&n}function s(e,t,n){return e&t^e&n^t&n}function i(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?i(t,n,r):2===e?s(t,n,r):void 0},t.ch32=o,t.maj32=s,t.p32=i,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},212:(e,t,n)=>{"use strict";var r=n(561),o=n(285);function s(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var i=e.charCodeAt(o);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):s(e,o)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++o)),n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=a(e[n].toString(16));return t},t.htonl=i,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];"little"===t&&(o=i(o)),n+=c(o.toString(16))}return n},t.zero2=a,t.zero8=c,t.join32=function(e,t,n,o){var s=n-t;r(s%4==0);for(var i=new Array(s/4),a=0,c=t;a<i.length;a++,c+=4){var l;l="big"===o?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],i[a]=l>>>0}return i},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var s=e[r];"big"===t?(n[o]=s>>>24,n[o+1]=s>>>16&255,n[o+2]=s>>>8&255,n[o+3]=255&s):(n[o+3]=s>>>24,n[o+2]=s>>>16&255,n[o+1]=s>>>8&255,n[o]=255&s)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],s=r+e[t+1]>>>0,i=(s<r?1:0)+n+o;e[t]=i>>>0,e[t+1]=s},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,s,i,a){var c=0,l=t;return c+=(l=l+r>>>0)<t?1:0,c+=(l=l+s>>>0)<s?1:0,e+n+o+i+(c+=(l=l+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,s,i,a){return t+r+s+a>>>0},t.sum64_5_hi=function(e,t,n,r,o,s,i,a,c,l){var u=0,f=t;return u+=(f=f+r>>>0)<t?1:0,u+=(f=f+s>>>0)<s?1:0,u+=(f=f+a>>>0)<a?1:0,e+n+o+i+c+(u+=(f=f+l>>>0)<l?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,s,i,a,c,l){return t+r+s+a+l>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},285:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},612:()=>{},131:()=>{},561:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},93:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(307),o=n(115),s=n(609),i=n(818),a=n(736),c=(n(196),n(731));n(612);const __=a.__,l=()=>{const e=(0,i.useSelect)((e=>e("automattic/wpcom-global-styles").isModalVisible()),[]),{dismissModal:t}=(0,i.useDispatch)("automattic/wpcom-global-styles"),{set:n}=(0,i.useDispatch)("core/preferences");(0,r.useEffect)((()=>{n("core/edit-site","welcomeGuideStyles",!1)}),[n]),(0,r.useEffect)((()=>{e&&(0,o.jN)("calypso_global_styles_gating_modal_show",{context:"site-editor"})}),[e]);const a=()=>{t(),(0,o.jN)("calypso_global_styles_gating_modal_dismiss",{context:"site-editor"})};return e?(0,r.createElement)(s.Modal,{className:"wpcom-global-styles-modal",onRequestClose:a,shouldCloseOnClickOutside:!1},(0,r.createElement)("div",{className:"wpcom-global-styles-modal__text"},(0,r.createElement)("h1",{className:"wpcom-global-styles-modal__heading"},__("A powerful new way to style your site","full-site-editing")),(0,r.createElement)("p",{className:"wpcom-global-styles-modal__description"},__("Change all of your site's fonts, colors and more. Available on the Premium plan.","full-site-editing")),(0,r.createElement)("div",{className:"wpcom-global-styles-modal__actions"},(0,r.createElement)(s.Button,{variant:"secondary",onClick:a},__("Try it out","full-site-editing")),(0,r.createElement)(s.Button,{variant:"primary",href:wpcomGlobalStyles.upgradeUrl,target:"_top",onClick:()=>(0,o.jN)("calypso_global_styles_gating_modal_upgrade_click",{context:"site-editor"})},__("Upgrade plan","full-site-editing")))),(0,r.createElement)("div",{className:"wpcom-global-styles-modal__image"},(0,r.createElement)("img",{src:c,alt:""}))):null}},624:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(307),o=n(115),s=n(609),i=n(818),a=n(736);n(131);const __=a.__;function c(){const{globalStylesConfig:e,siteChanges:t}=(0,i.useSelect)((e=>{const{getEditedEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n,__experimentalGetDirtyEntityRecords:r}=e("core"),o=t("root","globalStyles",n?n():null);return{globalStylesConfig:{styles:(null==o?void 0:o.styles)??{},settings:(null==o?void 0:o.settings)??{}},siteChanges:r?r():[]}}),[]),n=Object.keys(e.styles).length||Object.keys(e.settings).length;return(0,r.useEffect)((()=>{var e;t.length||(null===(e=document.querySelector(".entities-saved-states__panel-header button:last-child"))||void 0===e||e.click())}),[t]),(0,r.useEffect)((()=>{n&&(0,o.jN)("calypso_global_styles_gating_notice_show",{context:"site-editor"})}),[n]),n?(0,r.createElement)(s.Notice,{status:"warning",isDismissible:!1,className:"wpcom-global-styles-notice"},(0,r.createInterpolateElement)(__("To publish these styles, and to unlock tons of other features, <a>upgrade to a Premium plan</a>.","full-site-editing"),{a:(0,r.createElement)(s.ExternalLink,{href:wpcomGlobalStyles.upgradeUrl,target:"_blank",onClick:()=>(0,o.jN)("calypso_global_styles_gating_notice_upgrade_click",{context:"site-editor"})})})):null}function l(){const{globalStylesConfig:e,isSaveViewOpened:t}=(0,i.useSelect)((e=>({globalStylesConfig:e("core").getEntityConfig("root","globalStyles"),isSaveViewOpened:e("core/edit-site").isSaveViewOpened()}))),[n,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{if(!e||!t)return void o(!1);if(n)return;const s=document.querySelectorAll(".entities-saved-states__panel .components-panel__body.is-opened .components-panel__body-title");for(const t of s){if(t.textContent!==e.label)continue;const n=document.createElement("div");t.parentElement.append(n),(0,r.render)((0,r.createElement)(c,null),n),o(!0);break}}),[e,n,t]),null}},915:(e,t,n)=>{var r;"object"==typeof window&&null!==(r=window.wpcomGlobalStyles)&&void 0!==r&&r.assetsUrl&&(n.p=window.wpcomGlobalStyles.assetsUrl)},366:(e,t,n)=>{"use strict";var r=n(818);const o={isModalVisible:!0};(0,r.registerStore)("automattic/wpcom-global-styles",{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;return"DISMISS_MODAL"===t.type?{...e,isModalVisible:!1}:e},actions:{dismissModal:()=>({type:"DISMISS_MODAL"})},selectors:{isModalVisible:(0,r.createRegistrySelector)((e=>t=>"edit-site/global-styles"===e("core/interface").getActiveComplementaryArea("core/edit-site")&&t.isModalVisible))},persist:!0})},115:(e,t,n)=>{"use strict";n.d(t,{jN:()=>r.jN});n(694),n(209),n(377);var r=n(792);n(722)},377:(e,t,n)=>{"use strict";let r=null;"undefined"!=typeof window&&window.addEventListener("popstate",(function(){r=null}))},792:(e,t,n)=>{"use strict";n.d(t,{jN:()=>d});var r=n(699),o=n(898),s=(n(421),n(819)),i=(n(377),n(209),n(358));n(694);const a=["a8c_cookie_banner_ok","wcadmin_storeprofiler_create_jetpack_account","wcadmin_storeprofiler_connect_store","wcadmin_storeprofiler_login_jetpack_account","wcadmin_storeprofiler_payment_login","wcadmin_storeprofiler_payment_create_account","calypso_checkout_switch_to_p_24","calypso_checkout_composite_p24_submit_clicked","wpcom_launchbar_button_click"];let c,l=Promise.resolve();function u(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&(l=(0,o.ve)("//stats.wp.com/w.js?63"));const f=new r.EventEmitter;function d(e,t){if(t=t||{},(0,i.Z)('Record event "%s" called with props %o',e,t),e.startsWith("calypso_")||(0,s.includes)(a,e)){if(c){const e=c(t);t={...t,...e}}t=(0,s.omitBy)(t,(e=>void 0===e)),(0,i.Z)('Recording event "%s" with actual props %o',e,t),u(["recordEvent",e,t]),f.emit("record-event",e,t)}else(0,i.Z)('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}},722:(e,t,n)=>{"use strict";n(792)},209:(e,t,n)=>{"use strict";n(4)},358:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(49);const o=n.n(r)()("calypso:analytics")},694:(e,t,n)=>{"use strict";n(358)},4:(e,t,n)=>{"use strict";n(32)},340:(e,t,n)=>{"use strict";n.d(t,{hg:()=>a,lZ:()=>c,_W:()=>u,Yt:()=>f});var r=n(49);const o=n.n(r)()("lib/load-script/callback-handler"),s=new Map;function i(){return s}function a(e){return i().has(e)}function c(e,t){const n=i();a(e)?(o(`Adding a callback for an existing script from "${e}"`),n.get(e).add(t)):(o(`Adding a callback for a new script from "${e}"`),n.set(e,new Set([t])))}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=i(),r=n.get(e);if(r){o(`Executing callbacks for "${e}"`+(null===t?" with success":` with error "${t}"`)),r.forEach((e=>{"function"==typeof e&&e(t)})),n.delete(e)}}function u(){const e=this.getAttribute("src");o(`Handling successful request for "${e}"`),l(e),this.onload=null}function f(){const e=this.getAttribute("src");o(`Handling failed request for "${e}"`),l(e,new Error(`Failed to load script "${e}"`)),this.onerror=null}},606:(e,t,n)=>{"use strict";n.d(t,{C:()=>a,k:()=>c});var r=n(49),o=n.n(r),s=n(340);const i=o()("lib/load-script/dom-operations");function a(e,t){i(`Creating script element for "${e}"`);const n=document.createElement("script");return n.src=e,n.type="text/javascript",n.onload=s._W,n.onerror=s.Yt,n.async=!0,t&&Object.entries(t).forEach((e=>{let[t,r]=e;return n[t]=r})),n}function c(e){i("Attaching element to head"),document.head.appendChild(e)}},898:(e,t,n)=>{"use strict";n.d(t,{ve:()=>a});var r=n(49),o=n.n(r),s=n(340),i=n(606);o()("package/load-script");function a(e,t,n){if(!(0,s.hg)(e)&&(0,i.k)((0,i.C)(e,n)),"function"!=typeof t)return new Promise(((t,n)=>{(0,s.lZ)(e,(e=>{null===e?t():n(e)}))}));(0,s.lZ)(e,t)}},49:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(632)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},632:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,s,i=null;function a(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];if(!a.enabled)return;const s=a,i=Number(new Date),c=i-(n||i);s.diff=c,s.prev=n,s.curr=i,n=i,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");let l=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,((e,n)=>{if("%%"===e)return"%";l++;const o=t.formatters[n];if("function"==typeof o){const t=r[l];e=o.call(s,t),r.splice(l,1),l--}return e})),t.formatArgs.call(s,r);const u=s.log||t.log;u.apply(s,r)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(o!==t.namespaces&&(o=t.namespaces,s=t.enabled(e)),s),set:e=>{i=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(881),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},731:(e,t,n)=>{"use strict";e.exports=n.p+"images/image-f40c6b2b12b942b650ea.svg"},196:e=>{"use strict";e.exports=window.React},819:e=>{"use strict";e.exports=window.lodash},609:e=>{"use strict";e.exports=window.wp.components},818:e=>{"use strict";e.exports=window.wp.data},701:e=>{"use strict";e.exports=window.wp.domReady},307:e=>{"use strict";e.exports=window.wp.element},736:e=>{"use strict";e.exports=window.wp.i18n},817:e=>{"use strict";e.exports=window.wp.plugins}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})();var r={};(()=>{"use strict";n.r(r);var e=n(307),t=(n(915),n(701)),o=n.n(t),s=n(817),i=n(93),a=n(624);n(366);o()((()=>{(0,s.registerPlugin)("wpcom-global-styles",{render:()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(i.Z,null),(0,e.createElement)(a.Z,null))})}))})(),window.EditingToolkit=r})();
2
  //# sourceMappingURL=wpcom-global-styles.min.js.map
1
+ (()=>{var e={421:(e,t)=>{"use strict";var n=decodeURIComponent,r=encodeURIComponent,o=/; */,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(n){return e}}},881:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o,s=365.25*o;function c(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,a){a=a||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!c)return;var a=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"weeks":case"week":case"w":return a*i;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===l&&isFinite(e))return a.long?function(e){var i=Math.abs(e);if(i>=o)return c(e,i,o,"day");if(i>=r)return c(e,i,r,"hour");if(i>=n)return c(e,i,n,"minute");if(i>=t)return c(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=o)return Math.round(e/o)+"d";if(i>=r)return Math.round(e/r)+"h";if(i>=n)return Math.round(e/n)+"m";if(i>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},699:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,o,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function a(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var o,i,s,l;if(c(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=a(e))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):p(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return a(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var c=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw c.context=s,c}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)r(a,this,t);else{var l=a.length,u=p(a,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return c(t),this.on(e,f(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,f(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,o,i,s;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},495:(e,t,n)=>{"use strict";var r=n(212),o=n(561);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=i,i.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var o=0;o<e.length;o+=this._delta32)this._update(e,o,o+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},i.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}},32:(e,t,n)=>{"use strict";var r=n(212),o=n(495),i=n(713),s=n(561),c=r.sum32,a=r.sum32_4,l=r.sum32_5,u=i.ch32,f=i.maj32,d=i.s0_256,h=i.s1_256,p=i.g0_256,g=i.g1_256,m=o.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}r.inherits(v,m),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=a(g(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var o=this.h[0],i=this.h[1],m=this.h[2],y=this.h[3],v=this.h[4],_=this.h[5],w=this.h[6],C=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var b=l(C,h(v),u(v,_,w),this.k[r],n[r]),F=c(d(o),f(o,i,m));C=w,w=_,_=v,v=c(y,b),y=m,m=i,i=o,o=c(b,F)}this.h[0]=c(this.h[0],o),this.h[1]=c(this.h[1],i),this.h[2]=c(this.h[2],m),this.h[3]=c(this.h[3],y),this.h[4]=c(this.h[4],v),this.h[5]=c(this.h[5],_),this.h[6]=c(this.h[6],w),this.h[7]=c(this.h[7],C)},v.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},713:(e,t,n)=>{"use strict";var r=n(212).rotr32;function o(e,t,n){return e&t^~e&n}function i(e,t,n){return e&t^e&n^t&n}function s(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?o(t,n,r):1===e||3===e?s(t,n,r):2===e?i(t,n,r):void 0},t.ch32=o,t.maj32=i,t.p32=s,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},212:(e,t,n)=>{"use strict";var r=n(561),o=n(285);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function c(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var s=e.charCodeAt(o);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):i(e,o)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++o)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=c(e[n].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];"little"===t&&(o=s(o)),n+=a(o.toString(16))}return n},t.zero2=c,t.zero8=a,t.join32=function(e,t,n,o){var i=n-t;r(i%4==0);for(var s=new Array(i/4),c=0,a=t;c<s.length;c++,a+=4){var l;l="big"===o?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],s[c]=l>>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,o){return e+t+n+r+o>>>0},t.sum64=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,s=(i<r?1:0)+n+o;e[t]=s>>>0,e[t+1]=i},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,i,s,c){var a=0,l=t;return a+=(l=l+r>>>0)<t?1:0,a+=(l=l+i>>>0)<i?1:0,e+n+o+s+(a+=(l=l+c>>>0)<c?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,i,s,c){return t+r+i+c>>>0},t.sum64_5_hi=function(e,t,n,r,o,i,s,c,a,l){var u=0,f=t;return u+=(f=f+r>>>0)<t?1:0,u+=(f=f+i>>>0)<i?1:0,u+=(f=f+c>>>0)<c?1:0,e+n+o+s+a+(u+=(f=f+l>>>0)<l?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,i,s,c,a,l){return t+r+i+c+l>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},285:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},612:()=>{},131:()=>{},561:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},93:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(307),o=n(115),i=n(609),s=n(818),c=n(736),a=(n(196),n(731));n(612);const __=c.__,l=()=>{const e=(0,s.useSelect)((e=>e("automattic/wpcom-global-styles").isModalVisible()),[]),{dismissModal:t}=(0,s.useDispatch)("automattic/wpcom-global-styles"),{set:n}=(0,s.useDispatch)("core/preferences");(0,r.useEffect)((()=>{n("core/edit-site","welcomeGuideStyles",!1)}),[n]),(0,r.useEffect)((()=>{e&&(0,o.jN)("calypso_global_styles_gating_modal_show",{context:"site-editor"})}),[e]);const c=()=>{t(),(0,o.jN)("calypso_global_styles_gating_modal_dismiss",{context:"site-editor"})};return e?(0,r.createElement)(i.Modal,{className:"wpcom-global-styles-modal",onRequestClose:c,shouldCloseOnClickOutside:!1},(0,r.createElement)("div",{className:"wpcom-global-styles-modal__text"},(0,r.createElement)("h1",{className:"wpcom-global-styles-modal__heading"},__("A powerful new way to style your site","full-site-editing")),(0,r.createElement)("p",{className:"wpcom-global-styles-modal__description"},__("Change all of your site's fonts, colors and more. Available on the Premium plan.","full-site-editing")),(0,r.createElement)("div",{className:"wpcom-global-styles-modal__actions"},(0,r.createElement)(i.Button,{variant:"secondary",onClick:c},__("Try it out","full-site-editing")),(0,r.createElement)(i.Button,{variant:"primary",href:wpcomGlobalStyles.upgradeUrl,target:"_top",onClick:()=>(0,o.jN)("calypso_global_styles_gating_modal_upgrade_click",{context:"site-editor"})},__("Upgrade plan","full-site-editing")))),(0,r.createElement)("div",{className:"wpcom-global-styles-modal__image"},(0,r.createElement)("img",{src:a,alt:""}))):null}},624:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(307),o=n(115),i=n(609),s=n(818),c=n(736);n(131);const __=c.__;function a(){const{globalStylesConfig:e,siteChanges:t}=(0,s.useSelect)((e=>{const{getEditedEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n,__experimentalGetDirtyEntityRecords:r}=e("core"),o=t("root","globalStyles",n?n():null);return{globalStylesConfig:{styles:(null==o?void 0:o.styles)??{},settings:(null==o?void 0:o.settings)??{}},siteChanges:r?r():[]}}),[]),n=Object.keys(e.styles).length||Object.keys(e.settings).length;return(0,r.useEffect)((()=>{var e;t.length||(null===(e=document.querySelector(".entities-saved-states__panel-header button:last-child"))||void 0===e||e.click())}),[t]),(0,r.useEffect)((()=>{n&&(0,o.jN)("calypso_global_styles_gating_notice_show",{context:"site-editor"})}),[n]),n?(0,r.createElement)(i.Notice,{status:"warning",isDismissible:!1,className:"wpcom-global-styles-notice"},(0,r.createInterpolateElement)(__("Your changes include customized styles that will only be visible once you <a>upgrade to a Premium plan</a>.","full-site-editing"),{a:(0,r.createElement)(i.ExternalLink,{href:wpcomGlobalStyles.upgradeUrl,target:"_blank",onClick:()=>(0,o.jN)("calypso_global_styles_gating_notice_upgrade_click",{context:"site-editor"})})})):null}function l(){const{globalStylesConfig:e,isSaveViewOpened:t}=(0,s.useSelect)((e=>({globalStylesConfig:e("core").getEntityConfig("root","globalStyles"),isSaveViewOpened:e("core/edit-site").isSaveViewOpened()}))),[n,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{if(!e||!t)return void o(!1);if(n)return;const i=document.querySelectorAll(".entities-saved-states__panel .components-panel__body.is-opened .components-panel__body-title");for(const t of i){if(t.textContent!==e.label)continue;const n=document.createElement("div");t.parentElement.append(n),(0,r.render)((0,r.createElement)(a,null),n),o(!0);break}}),[e,n,t]),null}},915:(e,t,n)=>{var r;"object"==typeof window&&null!==(r=window.wpcomGlobalStyles)&&void 0!==r&&r.assetsUrl&&(n.p=window.wpcomGlobalStyles.assetsUrl)},366:(e,t,n)=>{"use strict";var r=n(818);const o={isModalVisible:!0};(0,r.registerStore)("automattic/wpcom-global-styles",{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;return"DISMISS_MODAL"===t.type?{...e,isModalVisible:!1}:e},actions:{dismissModal:()=>({type:"DISMISS_MODAL"})},selectors:{isModalVisible:(0,r.createRegistrySelector)((e=>t=>"edit-site/global-styles"===e("core/interface").getActiveComplementaryArea("core/edit-site")&&t.isModalVisible))},persist:!0})},115:(e,t,n)=>{"use strict";n.d(t,{jN:()=>r.jN});n(694),n(209),n(377);var r=n(792);n(722)},377:(e,t,n)=>{"use strict";let r=null;"undefined"!=typeof window&&window.addEventListener("popstate",(function(){r=null}))},792:(e,t,n)=>{"use strict";n.d(t,{jN:()=>d});var r=n(699),o=n(898),i=(n(421),n(819)),s=(n(377),n(209),n(358));n(694);const c=["a8c_cookie_banner_ok","wcadmin_storeprofiler_create_jetpack_account","wcadmin_storeprofiler_connect_store","wcadmin_storeprofiler_login_jetpack_account","wcadmin_storeprofiler_payment_login","wcadmin_storeprofiler_payment_create_account","calypso_checkout_switch_to_p_24","calypso_checkout_composite_p24_submit_clicked","wpcom_launchbar_button_click"];let a,l=Promise.resolve();function u(e){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(e))}"undefined"!=typeof document&&(l=(0,o.ve)("//stats.wp.com/w.js?63"));const f=new r.EventEmitter;function d(e,t){if(t=t||{},(0,s.Z)('Record event "%s" called with props %o',e,t),e.startsWith("calypso_")||(0,i.includes)(c,e)){if(a){const e=a(t);t={...t,...e}}t=(0,i.omitBy)(t,(e=>void 0===e)),(0,s.Z)('Recording event "%s" with actual props %o',e,t),u(["recordEvent",e,t]),f.emit("record-event",e,t)}else(0,s.Z)('- Event name must be prefixed by "calypso_" or added to `EVENT_NAME_EXCEPTIONS`')}},722:(e,t,n)=>{"use strict";n(792)},209:(e,t,n)=>{"use strict";n(4)},358:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(49);const o=n.n(r)()("calypso:analytics")},694:(e,t,n)=>{"use strict";n(358)},4:(e,t,n)=>{"use strict";n(32)},340:(e,t,n)=>{"use strict";n.d(t,{hg:()=>c,lZ:()=>a,_W:()=>u,Yt:()=>f});var r=n(49);const o=n.n(r)()("lib/load-script/callback-handler"),i=new Map;function s(){return i}function c(e){return s().has(e)}function a(e,t){const n=s();c(e)?(o(`Adding a callback for an existing script from "${e}"`),n.get(e).add(t)):(o(`Adding a callback for a new script from "${e}"`),n.set(e,new Set([t])))}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=s(),r=n.get(e);if(r){o(`Executing callbacks for "${e}"`+(null===t?" with success":` with error "${t}"`)),r.forEach((e=>{"function"==typeof e&&e(t)})),n.delete(e)}}function u(){const e=this.getAttribute("src");o(`Handling successful request for "${e}"`),l(e),this.onload=null}function f(){const e=this.getAttribute("src");o(`Handling failed request for "${e}"`),l(e,new Error(`Failed to load script "${e}"`)),this.onerror=null}},606:(e,t,n)=>{"use strict";n.d(t,{C:()=>c,k:()=>a});var r=n(49),o=n.n(r),i=n(340);const s=o()("lib/load-script/dom-operations");function c(e,t){s(`Creating script element for "${e}"`);const n=document.createElement("script");return n.src=e,n.type="text/javascript",n.onload=i._W,n.onerror=i.Yt,n.async=!0,t&&Object.entries(t).forEach((e=>{let[t,r]=e;return n[t]=r})),n}function a(e){s("Attaching element to head"),document.head.appendChild(e)}},898:(e,t,n)=>{"use strict";n.d(t,{ve:()=>c});var r=n(49),o=n.n(r),i=n(340),s=n(606);o()("package/load-script");function c(e,t,n){if(!(0,i.hg)(e)&&(0,s.k)((0,s.C)(e,n)),"function"!=typeof t)return new Promise(((t,n)=>{(0,i.lZ)(e,(e=>{null===e?t():n(e)}))}));(0,i.lZ)(e,t)}},49:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(632)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},632:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,s=null;function c(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];if(!c.enabled)return;const i=c,s=Number(new Date),a=s-(n||s);i.diff=a,i.prev=n,i.curr=s,n=s,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");let l=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,((e,n)=>{if("%%"===e)return"%";l++;const o=t.formatters[n];if("function"==typeof o){const t=r[l];e=o.call(i,t),r.splice(l,1),l--}return e})),t.formatArgs.call(i,r);const u=i.log||t.log;u.apply(i,r)}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=r,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(c),c}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(881),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},731:(e,t,n)=>{"use strict";e.exports=n.p+"images/image-f40c6b2b12b942b650ea.svg"},196:e=>{"use strict";e.exports=window.React},819:e=>{"use strict";e.exports=window.lodash},609:e=>{"use strict";e.exports=window.wp.components},818:e=>{"use strict";e.exports=window.wp.data},701:e=>{"use strict";e.exports=window.wp.domReady},307:e=>{"use strict";e.exports=window.wp.element},736:e=>{"use strict";e.exports=window.wp.i18n},817:e=>{"use strict";e.exports=window.wp.plugins}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})();var r={};(()=>{"use strict";n.r(r);var e=n(307),t=(n(915),n(701)),o=n.n(t),i=n(817),s=n(93),c=n(624);n(366);o()((()=>{(0,i.registerPlugin)("wpcom-global-styles",{render:()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(s.Z,null),(0,e.createElement)(c.Z,null))})}))})(),window.EditingToolkit=r})();
2
  //# sourceMappingURL=wpcom-global-styles.min.js.map
wpcom-global-styles/index.php CHANGED
@@ -264,10 +264,10 @@ function wpcom_display_global_styles_launch_bar( $bar_controls ) {
264
  $upgrade_url = 'https://wordpress.com/plans/' . $site_slug . '?plan=value_bundle';
265
 
266
  if ( wpcom_is_previewing_global_styles() ) {
267
- $preview_text = __( 'Hide premium styles', 'full-site-editing' );
268
  $preview_location = remove_query_arg( 'preview-global-styles' );
269
  } else {
270
- $preview_text = __( 'Preview styles before upgrading', 'full-site-editing' );
271
  $preview_location = add_query_arg( 'preview-global-styles', '' );
272
  }
273
 
@@ -275,7 +275,7 @@ function wpcom_display_global_styles_launch_bar( $bar_controls ) {
275
  <div class="launch-bar-global-styles-button">
276
  <div class="launch-bar-global-styles-popover hidden">
277
  <div>
278
- <?php echo esc_html__( 'Publish your style changes and unlock tons of other features by upgrading to a Premium plan.', 'full-site-editing' ); ?>
279
  </div>
280
  <a
281
  class="launch-bar-global-styles-upgrade-button"
@@ -295,7 +295,7 @@ function wpcom_display_global_styles_launch_bar( $bar_controls ) {
295
  <?php echo esc_html__( 'Styles', 'full-site-editing' ); ?>
296
  </span>
297
  <span class="is-desktop">
298
- <?php echo esc_html__( 'Publish styles', 'full-site-editing' ); ?>
299
  </span>
300
  </a>
301
  </div>
264
  $upgrade_url = 'https://wordpress.com/plans/' . $site_slug . '?plan=value_bundle';
265
 
266
  if ( wpcom_is_previewing_global_styles() ) {
267
+ $preview_text = __( 'Hide custom styles', 'full-site-editing' );
268
  $preview_location = remove_query_arg( 'preview-global-styles' );
269
  } else {
270
+ $preview_text = __( 'Preview custom styles', 'full-site-editing' );
271
  $preview_location = add_query_arg( 'preview-global-styles', '' );
272
  }
273
 
275
  <div class="launch-bar-global-styles-button">
276
  <div class="launch-bar-global-styles-popover hidden">
277
  <div>
278
+ <?php echo esc_html__( 'Your site contains customized styles that will only be visible once you upgrade to a Premium plan.', 'full-site-editing' ); ?>
279
  </div>
280
  <a
281
  class="launch-bar-global-styles-upgrade-button"
295
  <?php echo esc_html__( 'Styles', 'full-site-editing' ); ?>
296
  </span>
297
  <span class="is-desktop">
298
+ <?php echo esc_html__( 'Custom styles', 'full-site-editing' ); ?>
299
  </span>
300
  </a>
301
  </div>
wpcom-global-styles/notice.js CHANGED
@@ -65,7 +65,7 @@ function GlobalStylesNoticeComponent() {
65
  <Notice status="warning" isDismissible={ false } className="wpcom-global-styles-notice">
66
  { createInterpolateElement(
67
  __(
68
- 'To publish these styles, and to unlock tons of other features, <a>upgrade to a Premium plan</a>.',
69
  'full-site-editing'
70
  ),
71
  {
65
  <Notice status="warning" isDismissible={ false } className="wpcom-global-styles-notice">
66
  { createInterpolateElement(
67
  __(
68
+ 'Your changes include customized styles that will only be visible once you <a>upgrade to a Premium plan</a>.',
69
  'full-site-editing'
70
  ),
71
  {