Changeset 2934358
- Timestamp:
- 07/05/2023 09:51:00 AM (3 years ago)
- Location:
- full-site-editing/trunk
- Files:
-
- 8 edited
-
build_meta.txt (modified) (1 diff)
-
full-site-editing-plugin.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
wpcom-global-styles/dist/wpcom-global-styles.asset.php (modified) (1 diff)
-
wpcom-global-styles/dist/wpcom-global-styles.js (modified) (4 diffs)
-
wpcom-global-styles/dist/wpcom-global-styles.min.js (modified) (1 diff)
-
wpcom-global-styles/index.php (modified) (1 diff)
-
wpcom-global-styles/notices.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
full-site-editing/trunk/build_meta.txt
r2934351 r2934358 1 commit_hash= acbcdeb00d105d65baf00bd003e6f7c4b73c854c2 commit_url=https://github.com/Automattic/wp-calypso/commit/ acbcdeb00d105d65baf00bd003e6f7c4b73c854c3 build_number=3.70 8331 commit_hash=1f55d9f821f39b44ad46988a0e97f1fd44eb7cdd 2 commit_url=https://github.com/Automattic/wp-calypso/commit/1f55d9f821f39b44ad46988a0e97f1fd44eb7cdd 3 build_number=3.70904 -
full-site-editing/trunk/full-site-editing-plugin.php
r2934351 r2934358 3 3 * Plugin Name: WordPress.com Editing Toolkit 4 4 * Description: Enhances your page creation workflow within the Block Editor. 5 * Version: 3.70 8335 * Version: 3.70904 6 6 * Author: Automattic 7 7 * Author URI: https://automattic.com/wordpress-plugins/ … … 43 43 * @var string 44 44 */ 45 define( 'A8C_ETK_PLUGIN_VERSION', '3.70 833' );45 define( 'A8C_ETK_PLUGIN_VERSION', '3.70904' ); 46 46 47 47 // Always include these helper files for dotcom FSE. -
full-site-editing/trunk/readme.txt
r2934351 r2934358 4 4 Requires at least: 5.5 5 5 Tested up to: 6.0 6 Stable tag: 3.70 8336 Stable tag: 3.70904 7 7 Requires PHP: 5.6.20 8 8 License: GPLv2 or later -
full-site-editing/trunk/wpcom-global-styles/dist/wpcom-global-styles.asset.php
r2929627 r2934358 1 <?php return array('dependencies' => array('react', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-url'), 'version' => ' 5bfcbd45d8738af2c471');1 <?php return array('dependencies' => array('react', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-url'), 'version' => 'ce4c0734a1c178fb3899'); -
full-site-editing/trunk/wpcom-global-styles/dist/wpcom-global-styles.js
r2932017 r2934358 1657 1657 1658 1658 1659 const GLOBAL_STYLES_TREATMENT_GROUP = '1'; 1659 1660 const trackEvent = function (eventName) { 1660 1661 let isSiteEditor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; … … 1676 1677 return null; 1677 1678 } 1679 let upgradeTranslation; 1680 if (wpcomGlobalStyles?.globalStylesInPersonalPlan === GLOBAL_STYLES_TREATMENT_GROUP) { 1681 upgradeTranslation = __('Your site includes customized styles that are only visible to visitors after <a>upgrading to the Personal plan or higher</a>.', 'full-site-editing'); 1682 } else { 1683 upgradeTranslation = __('Your site includes customized styles that are only visible to visitors after <a>upgrading to the Premium plan or higher</a>.', 'full-site-editing'); 1684 } 1678 1685 return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Notice, { 1679 1686 status: "warning", 1680 1687 isDismissible: false, 1681 1688 className: "wpcom-global-styles-notice" 1682 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createInterpolateElement)( __('Your site includes customized styles that are only visible to visitors after <a>upgrading to the Premium plan or higher</a>.', 'full-site-editing'), {1689 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createInterpolateElement)(upgradeTranslation, { 1683 1690 a: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ExternalLink, { 1684 1691 href: wpcomGlobalStyles.upgradeUrl, … … 1757 1764 }, [editEntityRecord, globalStylesId, isSiteEditor]); 1758 1765 const openResetGlobalStylesSupport = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => { 1759 window.open( 'https://wordpress.com/support/using-styles/#reset-all-styles', '_blank').focus();1766 window.open(wpcomGlobalStyles.resetGlobalStylesSupportUrl, '_blank').focus(); 1760 1767 trackEvent('calypso_global_styles_gating_notice_reset_support_click', isSiteEditor); 1761 1768 }, [isSiteEditor]); … … 1784 1791 className: isSiteEditor ? '' : 'wpcom-global-styles-action-has-icon wpcom-global-styles-action-is-external wpcom-global-styles-action-is-support' 1785 1792 }); 1786 createWarningNotice(__('Your site includes customized styles that are only visible to visitors after upgrading to the Premium plan or higher.', 'full-site-editing'), { 1787 id: NOTICE_ID, 1788 actions: actions 1789 }); 1793 if (wpcomGlobalStyles?.globalStylesInPersonalPlan === GLOBAL_STYLES_TREATMENT_GROUP) { 1794 createWarningNotice(__('Your site includes customized styles that are only visible to visitors after upgrading to the Personal plan or higher.', 'full-site-editing'), { 1795 id: NOTICE_ID, 1796 actions: actions 1797 }); 1798 } else { 1799 createWarningNotice(__('Your site includes customized styles that are only visible to visitors after upgrading to the Premium plan or higher.', 'full-site-editing'), { 1800 id: NOTICE_ID, 1801 actions: actions 1802 }); 1803 } 1790 1804 trackEvent('calypso_global_styles_gating_notice_show', isSiteEditor); 1791 1805 }, [canPreviewPost, createWarningNotice, isPostEditor, isSiteEditor, openResetGlobalStylesSupport, previewPost, resetGlobalStyles, upgradePlan]); -
full-site-editing/trunk/wpcom-global-styles/dist/wpcom-global-styles.min.js
r2929627 r2934358 1 (()=>{var t={421:(t,e)=>{"use strict";var n=decodeURIComponent,r=encodeURIComponent,s=/; */,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function i(t,e){try{return e(t)}catch(n){return t}}},881:t=>{var e=1e3,n=60*e,r=60*n,s=24*r,o=7*s,i=365.25*s;function a(t,e,n,r){var s=e>=1.5*n;return Math.round(t/n)+" "+r+(s?"s":"")}t.exports=function(t, c){c=c||{};var l=typeof t;if("string"===l&&t.length>0)return function(t){if((t=String(t)).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(t);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*o;case"days":case"day":case"d":return c*s;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*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(t);if("number"===l&&isFinite(t))return c.long?function(t){var o=Math.abs(t);if(o>=s)return a(t,o,s,"day");if(o>=r)return a(t,o,r,"hour");if(o>=n)return a(t,o,n,"minute");if(o>=e)return a(t,o,e,"second");return t+" ms"}(t):function(t){var o=Math.abs(t);if(o>=s)return Math.round(t/s)+"d";if(o>=r)return Math.round(t/r)+"h";if(o>=n)return Math.round(t/n)+"m";if(o>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},699:t=>{"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(n,r){function s(n){t.removeListener(e,o),r(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",s),n([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&g(t,"error",e,n)}(t,s,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function l(t,e,n,r){var s,o,i,l;if(a(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),i=o[e]),void 0===i)i=o[e]=n,++t._eventsCount;else if("function"==typeof i?i=o[e]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(s=c(t))>0&&i.length>s&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=i.length,l=u,console&&console.warn&&console.warn(l)}return t}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 d(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},s=u.bind(r);return s.listener=n,r.wrapFn=s,s}function f(t,e,n){var r=t._events;if(void 0===r)return[];var s=r[e];return void 0===s?[]:"function"==typeof s?n?[s.listener||s]:[s]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(s):h(s,s.length)}function p(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function g(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function s(o){r.once&&t.removeEventListener(e,s),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");i=t}}),o.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},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var s="error"===t,o=this._events;if(void 0!==o)s=s&&void 0===o.error;else if(!s)return!1;if(s){var i;if(e.length>0&&(i=e[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var c=o[t];if(void 0===c)return!1;if("function"==typeof c)r(c,this,e);else{var l=c.length,u=h(c,l);for(n=0;n<l;++n)r(u[n],this,e)}return!0},o.prototype.addListener=function(t,e){return l(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return l(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,d(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,d(this,t,e)),this},o.prototype.removeListener=function(t,e){var n,r,s,o,i;if(a(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){i=n[o].listener,s=o;break}if(s<0)return this;0===s?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,s),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,i||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,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[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var s,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(s=o[r])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},o.prototype.listeners=function(t){return f(this,t,!0)},o.prototype.rawListeners=function(t){return f(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},495:(t,e,n)=>{"use strict";var r=n(212),s=n(561);function o(){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}e.BlockHash=o,o.prototype.update=function(t,e){if(t=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var s=0;s<t.length;s+=this._delta32)this._update(t,s,s+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),s(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,n=e-(t+this.padLength)%e,r=new Array(n+this.padLength);r[0]=128;for(var s=1;s<n;s++)r[s]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[s++]=0;r[s++]=0,r[s++]=0,r[s++]=0,r[s++]=0,r[s++]=t>>>24&255,r[s++]=t>>>16&255,r[s++]=t>>>8&255,r[s++]=255&t}else for(r[s++]=255&t,r[s++]=t>>>8&255,r[s++]=t>>>16&255,r[s++]=t>>>24&255,r[s++]=0,r[s++]=0,r[s++]=0,r[s++]=0,o=8;o<this.padLength;o++)r[s++]=0;return r}},32:(t,e,n)=>{"use strict";var r=n(212),s=n(495),o=n(713),i=n(561),a=r.sum32,c=r.sum32_4,l=r.sum32_5,u=o.ch32,d=o.maj32,f=o.s0_256,p=o.s1_256,h=o.g0_256,g=o.g1_256,m=s.BlockHash,v=[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 y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}r.inherits(y,m),t.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=c(g(n[r-2]),n[r-7],h(n[r-15]),n[r-16]);var s=this.h[0],o=this.h[1],m=this.h[2],v=this.h[3],y=this.h[4],w=this.h[5],_=this.h[6],b=this.h[7];for(i(this.k.length===n.length),r=0;r<n.length;r++){var C=l(b,p(y),u(y,w,_),this.k[r],n[r]),k=a(f(s),d(s,o,m));b=_,_=w,w=y,y=a(v,C),v=m,m=o,o=s,s=a(C,k)}this.h[0]=a(this.h[0],s),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],m),this.h[3]=a(this.h[3],v),this.h[4]=a(this.h[4],y),this.h[5]=a(this.h[5],w),this.h[6]=a(this.h[6],_),this.h[7]=a(this.h[7],b)},y.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},713:(t,e,n)=>{"use strict";var r=n(212).rotr32;function s(t,e,n){return t&e^~t&n}function o(t,e,n){return t&e^t&n^e&n}function i(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?s(e,n,r):1===t||3===t?i(e,n,r):2===t?o(e,n,r):void 0},e.ch32=s,e.maj32=o,e.p32=i,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},212:(t,e,n)=>{"use strict";var r=n(561),s=n(285);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function i(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function c(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=s,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),s=0;s<t.length;s+=2)n.push(parseInt(t[s]+t[s+1],16))}else for(var r=0,s=0;s<t.length;s++){var i=t.charCodeAt(s);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):o(t,s)?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++s)),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(s=0;s<t.length;s++)n[s]=0|t[s];return n},e.toHex=function(t){for(var e="",n=0;n<t.length;n++)e+=a(t[n].toString(16));return e},e.htonl=i,e.toHex32=function(t,e){for(var n="",r=0;r<t.length;r++){var s=t[r];"little"===e&&(s=i(s)),n+=c(s.toString(16))}return n},e.zero2=a,e.zero8=c,e.join32=function(t,e,n,s){var o=n-e;r(o%4==0);for(var i=new Array(o/4),a=0,c=e;a<i.length;a++,c+=4){var l;l="big"===s?t[c]<<24|t[c+1]<<16|t[c+2]<<8|t[c+3]:t[c+3]<<24|t[c+2]<<16|t[c+1]<<8|t[c],i[a]=l>>>0}return i},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,s=0;r<t.length;r++,s+=4){var o=t[r];"big"===e?(n[s]=o>>>24,n[s+1]=o>>>16&255,n[s+2]=o>>>8&255,n[s+3]=255&o):(n[s+3]=o>>>24,n[s+2]=o>>>16&255,n[s+1]=o>>>8&255,n[s]=255&o)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,s){return t+e+n+r+s>>>0},e.sum64=function(t,e,n,r){var s=t[e],o=r+t[e+1]>>>0,i=(o<r?1:0)+n+s;t[e]=i>>>0,t[e+1]=o},e.sum64_hi=function(t,e,n,r){return(e+r>>>0<e?1:0)+t+n>>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,s,o,i,a){var c=0,l=e;return c+=(l=l+r>>>0)<e?1:0,c+=(l=l+o>>>0)<o?1:0,t+n+s+i+(c+=(l=l+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,n,r,s,o,i,a){return e+r+o+a>>>0},e.sum64_5_hi=function(t,e,n,r,s,o,i,a,c,l){var u=0,d=e;return u+=(d=d+r>>>0)<e?1:0,u+=(d=d+o>>>0)<o?1:0,u+=(d=d+a>>>0)<a?1:0,t+n+s+i+c+(u+=(d=d+l>>>0)<l?1:0)>>>0},e.sum64_5_lo=function(t,e,n,r,s,o,i,a,c,l){return e+r+o+a+l>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},285:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},612:()=>{},131:()=>{},561:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},93:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(307),s=n(115),o=n(609),i=n(818),a=n(736),c=(n(196),n(731)),l=n(773);n(612);const __=a.__,u=()=>{const t=(0,i.useSelect)((t=>!!t("core/edit-site")),[]),{viewCanvasPath:e}=(0,l.$)(),n=(0,i.useSelect)((n=>{if(!t)return!1;const r=n("core/interface").getActiveComplementaryArea("core/edit-site");return n("automattic/wpcom-global-styles").isModalVisible(r,e)}),[e,t]),{dismissModal:a}=(0,i.useDispatch)("automattic/wpcom-global-styles"),{set:u}=(0,i.useDispatch)("core/preferences");(0,r.useEffect)((()=>{t&&u("core/edit-site","welcomeGuideStyles",!1)}),[u,t]),(0,r.useEffect)((()=>{n&&(0,s.jN)("calypso_global_styles_gating_modal_show",{context:"site-editor"})}),[n]);const d=()=>{a(),(0,s.jN)("calypso_global_styles_gating_modal_dismiss",{context:"site-editor"})};return t&&n?(0,r.createElement)(o.Modal,{className:"wpcom-global-styles-modal",onRequestClose:d,shouldCloseOnClickOutside:!1},(0,r.createElement)("div",{className:"wpcom-global-styles-modal__content"},(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)(o.Button,{variant:"secondary",onClick:d},__("Try it out","full-site-editing")),(0,r.createElement)(o.Button,{variant:"primary",href:wpcomGlobalStyles.upgradeUrl,target:"_top",onClick:()=>(0,s.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}},172:(t,e,n)=>{"use strict";n.d(e,{Z:()=>g});var r=n(307),s=n(115),o=n(609),i=n(818),a=n(736),c=n(773),l=n(210),u=n(807);n(131);const __=a.__,d=function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(0,s.jN)(t,{context:e?"site-editor":"post-editor",blog_id:wpcomGlobalStyles.wpcomBlogId})};function f(){const{globalStylesInUse:t}=(0,l.Y)();return(0,r.useEffect)((()=>{t&&d("calypso_global_styles_gating_notice_view_canvas_show")}),[t]),t?(0,r.createElement)(o.Notice,{status:"warning",isDismissible:!1,className:"wpcom-global-styles-notice"},(0,r.createInterpolateElement)(__("Your site includes customized styles that are only visible to visitors after <a>upgrading to the Premium plan or higher</a>.","full-site-editing"),{a:(0,r.createElement)(o.ExternalLink,{href:wpcomGlobalStyles.upgradeUrl,target:"_blank",onClick:()=>d("calypso_global_styles_gating_notice_view_canvas_upgrade_click")})})):null}function p(){const{canvas:t}=(0,c.$)();return(0,r.useEffect)((()=>{if("view"!==t)return;const e=document.querySelector(".edit-site-save-hub");if(!e)return;const n=e.parentNode,s=document.createElement("div");s.classList.add("wpcom-global-styles-notice-container"),n.insertBefore(s,e),(0,r.render)((0,r.createElement)(f,null),s)}),[t]),null}function h(){const t="wpcom-global-styles/gating-notice",{globalStylesInUse:e,globalStylesId:n}=(0,l.Y)(),{canvas:s}=(0,c.$)(),{isSiteEditor:o,isPostEditor:a}=(0,i.useSelect)((t=>({isSiteEditor:!!t("core/edit-site")&&"edit"===s,isPostEditor:!t("core/edit-site")&&!!t("core/editor").getCurrentPostId()})),[s]),{previewPostWithoutCustomStyles:f,canPreviewPost:p}=(0,u.u)(),{createWarningNotice:h,removeNotice:g}=(0,i.useDispatch)("core/notices"),{editEntityRecord:m}=(0,i.useDispatch)("core"),v=(0,r.useCallback)((()=>{window.open(wpcomGlobalStyles.upgradeUrl,"_blank").focus(),d("calypso_global_styles_gating_notice_upgrade_click",o)}),[o]),y=(0,r.useCallback)((()=>{f(),d("calypso_global_styles_gating_notice_preview_click",o)}),[o,f]),w=(0,r.useCallback)((()=>{n&&(m("root","globalStyles",n,{styles:{},settings:{}}),d("calypso_global_styles_gating_notice_reset_click",o))}),[m,n,o]),_=(0,r.useCallback)((()=>{window.open("https://wordpress.com/support/using-styles/#reset-all-styles","_blank").focus(),d("calypso_global_styles_gating_notice_reset_support_click",o)}),[o]),b=(0,r.useCallback)((()=>{const e=[{label:__("Upgrade now","full-site-editing"),onClick:v,variant:"primary",noDefaultClasses:!0,className:"wpcom-global-styles-action-has-icon wpcom-global-styles-action-is-external"}];a&&p&&e.push({label:__("Preview without custom styles","full-site-editing"),onClick:y,variant:"secondary",noDefaultClasses:!0,className:"wpcom-global-styles-action-has-icon wpcom-global-styles-action-is-external"}),e.push({label:__("Remove custom styles","full-site-editing"),onClick:o?w:_,variant:o?"secondary":"link",noDefaultClasses:!0,className:o?"":"wpcom-global-styles-action-has-icon wpcom-global-styles-action-is-external wpcom-global-styles-action-is-support"}),h(__("Your site includes customized styles that are only visible to visitors after upgrading to the Premium plan or higher.","full-site-editing"),{id:t,actions:e}),d("calypso_global_styles_gating_notice_show",o)}),[p,h,a,o,_,y,w,v]);return(0,r.useEffect)((()=>{if(o||a)return e?b():g(t),()=>g(t)}),[e,o,a,g,b]),null}function g(){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p,null),(0,r.createElement)(h,null))}},915:(t,e,n)=>{"object"==typeof window&&window.wpcomGlobalStyles?.assetsUrl&&(n.p=window.wpcomGlobalStyles.assetsUrl)},366:(t,e,n)=>{"use strict";var r=n(818);const s={isModalVisible:!0};(0,r.registerStore)("automattic/wpcom-global-styles",{reducer:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;return"DISMISS_MODAL"===(arguments.length>1?arguments[1]:void 0).type?{...t,isModalVisible:!1}:t},actions:{dismissModal:()=>({type:"DISMISS_MODAL"})},selectors:{isModalVisible:(t,e,n)=>t.isModalVisible&&("edit-site/global-styles"===e||"/wp_global_styles"===n)},persist:!0})},773:(t,e,n)=>{"use strict";n.d(e,{$:()=>o});var r=n(818),s=n(307);function o(){const[t,e]=(0,s.useState)(),[n,o]=(0,s.useState)(),i=(0,r.useSelect)((t=>!!t("core/edit-site")),[]);return(0,s.useEffect)((()=>{if(!i)return;const t=(0,r.subscribe)((()=>{setTimeout((()=>{const t=new URLSearchParams(window.location.search),n=t.get("canvas")??"view";e(n),o("view"===n?t.get("path"):void 0)}),0)}),"core/edit-site");return()=>t()}),[i]),{canvas:t,viewCanvasPath:n}}},210:(t,e,n)=>{"use strict";n.d(e,{Y:()=>s});var r=n(818);function s(){return(0,r.useSelect)((t=>{const{getEditedEntityRecord:e,__experimentalGetCurrentGlobalStylesId:n}=t("core"),r=n?n():null,s=e("root","globalStyles",r),o={styles:s?.styles??{},settings:s?.settings??{}};return{globalStylesInUse:!(!Object.keys(o.styles).length&&!Object.keys(o.settings).length),globalStylesId:r}}),[])}},807:(t,e,n)=>{"use strict";n.d(e,{u:()=>c});var r=n(307),s=n(609),o=n(818),i=n(736),a=n(483);const __=i.__;function c(){const{currentPostLink:t,isAutosaveable:e,isDraft:n,isPostEditor:i,isLocked:c,isSaveable:l,previewLink:u}=(0,o.useSelect)((t=>{const{getCurrentPostId:e,getCurrentPostAttribute:n,getEditedPostPreviewLink:r,isEditedPostAutosaveable:s,isEditedPostSaveable:o,isPostLocked:i,getEditedPostAttribute:a}=t("core/editor");return{currentPostLink:n("link"),isAutosaveable:s(),isDraft:-1!==["draft","auto-draft"].indexOf(a("status")),isLocked:i(),isPostEditor:!t("core/edit-site")&&!!e(),isSaveable:o(),previewLink:r()}})),d=(0,r.useRef)(null),{autosave:f,savePost:p}=(0,o.useDispatch)("core/editor"),h=(0,r.useCallback)((()=>{i&&(d.current&&!d.current.closed||(d.current=window.open("","_blank")),d.current.focus(),e&&!c?(n?p({isPreview:!0}):f({isPreview:!0}),function(t){let e=(0,r.renderToString)((0,r.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},(0,r.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},(0,r.createElement)(s.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,r.createElement)(s.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),(0,r.createElement)("p",null,__("Generating preview…","full-site-editing"))));e+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',t.write(e),t.title=__("Generating preview…","full-site-editing"),t.close()}(d.current.document)):d.current&&!d.current.closed&&(d.current.location=(0,a.addQueryArgs)(u||t,{"hide-global-styles":""})))}),[f,t,e,n,c,i,u,p]);return(0,r.useEffect)((()=>{i&&d.current&&u&&!d.current.closed&&(d.current.location=(0,a.addQueryArgs)(u,{"hide-global-styles":!0}))}),[i,u]),{previewPostWithoutCustomStyles:h,canPreviewPost:l}}},115:(t,e,n)=>{"use strict";n.d(e,{jN:()=>r.jN});n(694),n(209),n(377);var r=n(792);n(722)},377:(t,e,n)=>{"use strict";let r=null;"undefined"!=typeof window&&window.addEventListener("popstate",(function(){r=null}))},792:(t,e,n)=>{"use strict";n.d(e,{jN:()=>d});var r=n(699),s=n(898),o=(n(421),n(377),n(209),n(358));n(694);const i=["a8c_cookie_banner_ok","a8c_ccpa_optout","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,c=Promise.resolve();function l(t){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(t))}"undefined"!=typeof document&&(c=(0,s.ve)("//stats.wp.com/w.js?63"));const u=new r.EventEmitter;function d(t,e){if(e=e||{},(0,o.Z)('Record event "%s" called with props %o',t,e),t.startsWith("calypso_")||t.startsWith("jetpack_")||i.includes(t)){if(a){const t=a(e);e={...e,...t}}e=Object.fromEntries(Object.entries(e).filter((t=>{let[,e]=t;return void 0!==e}))),(0,o.Z)('Recording event "%s" with actual props %o',t,e),l(["recordEvent",t,e]),u.emit("record-event",t,e)}else(0,o.Z)('- Event name must be prefixed by "calypso_", "jetpack_", or added to `EVENT_NAME_EXCEPTIONS`')}},722:(t,e,n)=>{"use strict";n(792)},209:(t,e,n)=>{"use strict";n(4)},358:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(49);const s=n.n(r)()("calypso:analytics")},694:(t,e,n)=>{"use strict";n(358)},4:(t,e,n)=>{"use strict";n(32)},340:(t,e,n)=>{"use strict";n.d(e,{Yt:()=>d,_W:()=>u,hg:()=>a,lZ:()=>c});var r=n(49);const s=n.n(r)()("lib/load-script/callback-handler"),o=new Map;function i(){return o}function a(t){return i().has(t)}function c(t,e){const n=i();a(t)?(s(`Adding a callback for an existing script from "${t}"`),n.get(t).add(e)):(s(`Adding a callback for a new script from "${t}"`),n.set(t,new Set([e])))}function l(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=i(),r=n.get(t);if(r){s(`Executing callbacks for "${t}"`+(null===e?" with success":` with error "${e}"`)),r.forEach((t=>{"function"==typeof t&&t(e)})),n.delete(t)}}function u(){const t=this.getAttribute("src");s(`Handling successful request for "${t}"`),l(t),this.onload=null}function d(){const t=this.getAttribute("src");s(`Handling failed request for "${t}"`),l(t,new Error(`Failed to load script "${t}"`)),this.onerror=null}},606:(t,e,n)=>{"use strict";n.d(e,{C:()=>a,k:()=>c});var r=n(49),s=n.n(r),o=n(340);const i=s()("lib/load-script/dom-operations");function a(t,e){i(`Creating script element for "${t}"`);const n=document.createElement("script");return n.src=t,n.type="text/javascript",n.onload=o._W,n.onerror=o.Yt,n.async=!0,e&&Object.entries(e).forEach((t=>{let[e,r]=t;return n[e]=r})),n}function c(t){i("Attaching element to head"),document.head.appendChild(t)}},898:(t,e,n)=>{"use strict";n.d(e,{ve:()=>a});var r=n(49),s=n.n(r),o=n(340),i=n(606);s()("package/load-script");function a(t,e,n){if(!(0,o.hg)(t)&&(0,i.k)((0,i.C)(t,n)),"function"!=typeof e)return new Promise(((e,n)=>{(0,o.lZ)(t,(t=>{null===t?e():n(t)}))}));(0,o.lZ)(t,e)}},49:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,s=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(s=r))})),e.splice(s,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(n){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(n){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.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+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})(),e.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"],e.log=console.debug||console.log||(()=>{}),t.exports=n(632)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},632:(t,e,n)=>{t.exports=function(t){function e(t){let n,s,o,i=null;function a(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];if(!a.enabled)return;const o=a,i=Number(new Date),c=i-(n||i);o.diff=c,o.prev=n,o.curr=i,n=i,r[0]=e.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");let l=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,((t,n)=>{if("%%"===t)return"%";l++;const s=e.formatters[n];if("function"==typeof s){const e=r[l];t=s.call(o,e),r.splice(l,1),l--}return t})),e.formatArgs.call(o,r);(o.log||e.log).apply(o,r)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(s!==e.namespaces&&(s=e.namespaces,o=e.enabled(t)),o),set:t=>{i=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function s(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(s),...e.skips.map(s).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),s=r.length;for(n=0;n<s;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(881),e.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(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},731:(t,e,n)=>{"use strict";t.exports=n.p+"images/image-f40c6b2b12b942b650ea.svg"},196:t=>{"use strict";t.exports=window.React},609:t=>{"use strict";t.exports=window.wp.components},818:t=>{"use strict";t.exports=window.wp.data},701:t=>{"use strict";t.exports=window.wp.domReady},307:t=>{"use strict";t.exports=window.wp.element},736:t=>{"use strict";t.exports=window.wp.i18n},817:t=>{"use strict";t.exports=window.wp.plugins},483:t=>{"use strict";t.exports=window.wp.url}},e={};function n(r){var s=e[r];if(void 0!==s)return s.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var s=r.length-1;s>-1&&!t;)t=r[s--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})();var r={};(()=>{"use strict";n.r(r);var t=n(307),e=(n(915),n(701)),s=n.n(e),o=n(817),i=n(93),a=n(172);n(366);s()((()=>{(0,o.registerPlugin)("wpcom-global-styles",{render:()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(i.Z,null),(0,t.createElement)(a.Z,null))})}))})(),window.EditingToolkit=r})();1 (()=>{var t={421:(t,e)=>{"use strict";var n=decodeURIComponent,r=encodeURIComponent,s=/; */,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function i(t,e){try{return e(t)}catch(n){return t}}},881:t=>{var e=1e3,n=60*e,r=60*n,s=24*r,o=7*s,i=365.25*s;function a(t,e,n,r){var s=e>=1.5*n;return Math.round(t/n)+" "+r+(s?"s":"")}t.exports=function(t,l){l=l||{};var c=typeof t;if("string"===c&&t.length>0)return function(t){if((t=String(t)).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(t);if(!a)return;var l=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*i;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*s;case"hours":case"hour":case"hrs":case"hr":case"h":return l*r;case"minutes":case"minute":case"mins":case"min":case"m":return l*n;case"seconds":case"second":case"secs":case"sec":case"s":return l*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(t);if("number"===c&&isFinite(t))return l.long?function(t){var o=Math.abs(t);if(o>=s)return a(t,o,s,"day");if(o>=r)return a(t,o,r,"hour");if(o>=n)return a(t,o,n,"minute");if(o>=e)return a(t,o,e,"second");return t+" ms"}(t):function(t){var o=Math.abs(t);if(o>=s)return Math.round(t/s)+"d";if(o>=r)return Math.round(t/r)+"h";if(o>=n)return Math.round(t/n)+"m";if(o>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},699:t=>{"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(n,r){function s(n){t.removeListener(e,o),r(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",s),n([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&g(t,"error",e,n)}(t,s,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function c(t,e,n,r){var s,o,i,c;if(a(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),i=o[e]),void 0===i)i=o[e]=n,++t._eventsCount;else if("function"==typeof i?i=o[e]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(s=l(t))>0&&i.length>s&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=i.length,c=u,console&&console.warn&&console.warn(c)}return t}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 d(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},s=u.bind(r);return s.listener=n,r.wrapFn=s,s}function f(t,e,n){var r=t._events;if(void 0===r)return[];var s=r[e];return void 0===s?[]:"function"==typeof s?n?[s.listener||s]:[s]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(s):h(s,s.length)}function p(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function g(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function s(o){r.once&&t.removeEventListener(e,s),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");i=t}}),o.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},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var s="error"===t,o=this._events;if(void 0!==o)s=s&&void 0===o.error;else if(!s)return!1;if(s){var i;if(e.length>0&&(i=e[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var l=o[t];if(void 0===l)return!1;if("function"==typeof l)r(l,this,e);else{var c=l.length,u=h(l,c);for(n=0;n<c;++n)r(u[n],this,e)}return!0},o.prototype.addListener=function(t,e){return c(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return c(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,d(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,d(this,t,e)),this},o.prototype.removeListener=function(t,e){var n,r,s,o,i;if(a(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){i=n[o].listener,s=o;break}if(s<0)return this;0===s?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,s),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,i||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,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[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var s,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(s=o[r])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},o.prototype.listeners=function(t){return f(this,t,!0)},o.prototype.rawListeners=function(t){return f(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},495:(t,e,n)=>{"use strict";var r=n(212),s=n(561);function o(){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}e.BlockHash=o,o.prototype.update=function(t,e){if(t=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var s=0;s<t.length;s+=this._delta32)this._update(t,s,s+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),s(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,n=e-(t+this.padLength)%e,r=new Array(n+this.padLength);r[0]=128;for(var s=1;s<n;s++)r[s]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[s++]=0;r[s++]=0,r[s++]=0,r[s++]=0,r[s++]=0,r[s++]=t>>>24&255,r[s++]=t>>>16&255,r[s++]=t>>>8&255,r[s++]=255&t}else for(r[s++]=255&t,r[s++]=t>>>8&255,r[s++]=t>>>16&255,r[s++]=t>>>24&255,r[s++]=0,r[s++]=0,r[s++]=0,r[s++]=0,o=8;o<this.padLength;o++)r[s++]=0;return r}},32:(t,e,n)=>{"use strict";var r=n(212),s=n(495),o=n(713),i=n(561),a=r.sum32,l=r.sum32_4,c=r.sum32_5,u=o.ch32,d=o.maj32,f=o.s0_256,p=o.s1_256,h=o.g0_256,g=o.g1_256,m=s.BlockHash,v=[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 y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}r.inherits(y,m),t.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=l(g(n[r-2]),n[r-7],h(n[r-15]),n[r-16]);var s=this.h[0],o=this.h[1],m=this.h[2],v=this.h[3],y=this.h[4],w=this.h[5],_=this.h[6],b=this.h[7];for(i(this.k.length===n.length),r=0;r<n.length;r++){var C=c(b,p(y),u(y,w,_),this.k[r],n[r]),k=a(f(s),d(s,o,m));b=_,_=w,w=y,y=a(v,C),v=m,m=o,o=s,s=a(C,k)}this.h[0]=a(this.h[0],s),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],m),this.h[3]=a(this.h[3],v),this.h[4]=a(this.h[4],y),this.h[5]=a(this.h[5],w),this.h[6]=a(this.h[6],_),this.h[7]=a(this.h[7],b)},y.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},713:(t,e,n)=>{"use strict";var r=n(212).rotr32;function s(t,e,n){return t&e^~t&n}function o(t,e,n){return t&e^t&n^e&n}function i(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?s(e,n,r):1===t||3===t?i(e,n,r):2===t?o(e,n,r):void 0},e.ch32=s,e.maj32=o,e.p32=i,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},212:(t,e,n)=>{"use strict";var r=n(561),s=n(285);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function i(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function l(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=s,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),s=0;s<t.length;s+=2)n.push(parseInt(t[s]+t[s+1],16))}else for(var r=0,s=0;s<t.length;s++){var i=t.charCodeAt(s);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):o(t,s)?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++s)),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(s=0;s<t.length;s++)n[s]=0|t[s];return n},e.toHex=function(t){for(var e="",n=0;n<t.length;n++)e+=a(t[n].toString(16));return e},e.htonl=i,e.toHex32=function(t,e){for(var n="",r=0;r<t.length;r++){var s=t[r];"little"===e&&(s=i(s)),n+=l(s.toString(16))}return n},e.zero2=a,e.zero8=l,e.join32=function(t,e,n,s){var o=n-e;r(o%4==0);for(var i=new Array(o/4),a=0,l=e;a<i.length;a++,l+=4){var c;c="big"===s?t[l]<<24|t[l+1]<<16|t[l+2]<<8|t[l+3]:t[l+3]<<24|t[l+2]<<16|t[l+1]<<8|t[l],i[a]=c>>>0}return i},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,s=0;r<t.length;r++,s+=4){var o=t[r];"big"===e?(n[s]=o>>>24,n[s+1]=o>>>16&255,n[s+2]=o>>>8&255,n[s+3]=255&o):(n[s+3]=o>>>24,n[s+2]=o>>>16&255,n[s+1]=o>>>8&255,n[s]=255&o)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,s){return t+e+n+r+s>>>0},e.sum64=function(t,e,n,r){var s=t[e],o=r+t[e+1]>>>0,i=(o<r?1:0)+n+s;t[e]=i>>>0,t[e+1]=o},e.sum64_hi=function(t,e,n,r){return(e+r>>>0<e?1:0)+t+n>>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,s,o,i,a){var l=0,c=e;return l+=(c=c+r>>>0)<e?1:0,l+=(c=c+o>>>0)<o?1:0,t+n+s+i+(l+=(c=c+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,n,r,s,o,i,a){return e+r+o+a>>>0},e.sum64_5_hi=function(t,e,n,r,s,o,i,a,l,c){var u=0,d=e;return u+=(d=d+r>>>0)<e?1:0,u+=(d=d+o>>>0)<o?1:0,u+=(d=d+a>>>0)<a?1:0,t+n+s+i+l+(u+=(d=d+c>>>0)<c?1:0)>>>0},e.sum64_5_lo=function(t,e,n,r,s,o,i,a,l,c){return e+r+o+a+c>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},285:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},612:()=>{},131:()=>{},561:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},93:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(307),s=n(115),o=n(609),i=n(818),a=n(736),l=(n(196),n(731)),c=n(773);n(612);const __=a.__,u=()=>{const t=(0,i.useSelect)((t=>!!t("core/edit-site")),[]),{viewCanvasPath:e}=(0,c.$)(),n=(0,i.useSelect)((n=>{if(!t)return!1;const r=n("core/interface").getActiveComplementaryArea("core/edit-site");return n("automattic/wpcom-global-styles").isModalVisible(r,e)}),[e,t]),{dismissModal:a}=(0,i.useDispatch)("automattic/wpcom-global-styles"),{set:u}=(0,i.useDispatch)("core/preferences");(0,r.useEffect)((()=>{t&&u("core/edit-site","welcomeGuideStyles",!1)}),[u,t]),(0,r.useEffect)((()=>{n&&(0,s.jN)("calypso_global_styles_gating_modal_show",{context:"site-editor"})}),[n]);const d=()=>{a(),(0,s.jN)("calypso_global_styles_gating_modal_dismiss",{context:"site-editor"})};return t&&n?(0,r.createElement)(o.Modal,{className:"wpcom-global-styles-modal",onRequestClose:d,shouldCloseOnClickOutside:!1},(0,r.createElement)("div",{className:"wpcom-global-styles-modal__content"},(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)(o.Button,{variant:"secondary",onClick:d},__("Try it out","full-site-editing")),(0,r.createElement)(o.Button,{variant:"primary",href:wpcomGlobalStyles.upgradeUrl,target:"_top",onClick:()=>(0,s.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:l,alt:""})))):null}},172:(t,e,n)=>{"use strict";n.d(e,{Z:()=>m});var r=n(307),s=n(115),o=n(609),i=n(818),a=n(736),l=n(773),c=n(210),u=n(807);n(131);const __=a.__,d="1",f=function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(0,s.jN)(t,{context:e?"site-editor":"post-editor",blog_id:wpcomGlobalStyles.wpcomBlogId})};function p(){const{globalStylesInUse:t}=(0,c.Y)();if((0,r.useEffect)((()=>{t&&f("calypso_global_styles_gating_notice_view_canvas_show")}),[t]),!t)return null;let e;return e=wpcomGlobalStyles?.globalStylesInPersonalPlan===d?__("Your site includes customized styles that are only visible to visitors after <a>upgrading to the Personal plan or higher</a>.","full-site-editing"):__("Your site includes customized styles that are only visible to visitors after <a>upgrading to the Premium plan or higher</a>.","full-site-editing"),(0,r.createElement)(o.Notice,{status:"warning",isDismissible:!1,className:"wpcom-global-styles-notice"},(0,r.createInterpolateElement)(e,{a:(0,r.createElement)(o.ExternalLink,{href:wpcomGlobalStyles.upgradeUrl,target:"_blank",onClick:()=>f("calypso_global_styles_gating_notice_view_canvas_upgrade_click")})}))}function h(){const{canvas:t}=(0,l.$)();return(0,r.useEffect)((()=>{if("view"!==t)return;const e=document.querySelector(".edit-site-save-hub");if(!e)return;const n=e.parentNode,s=document.createElement("div");s.classList.add("wpcom-global-styles-notice-container"),n.insertBefore(s,e),(0,r.render)((0,r.createElement)(p,null),s)}),[t]),null}function g(){const t="wpcom-global-styles/gating-notice",{globalStylesInUse:e,globalStylesId:n}=(0,c.Y)(),{canvas:s}=(0,l.$)(),{isSiteEditor:o,isPostEditor:a}=(0,i.useSelect)((t=>({isSiteEditor:!!t("core/edit-site")&&"edit"===s,isPostEditor:!t("core/edit-site")&&!!t("core/editor").getCurrentPostId()})),[s]),{previewPostWithoutCustomStyles:p,canPreviewPost:h}=(0,u.u)(),{createWarningNotice:g,removeNotice:m}=(0,i.useDispatch)("core/notices"),{editEntityRecord:v}=(0,i.useDispatch)("core"),y=(0,r.useCallback)((()=>{window.open(wpcomGlobalStyles.upgradeUrl,"_blank").focus(),f("calypso_global_styles_gating_notice_upgrade_click",o)}),[o]),w=(0,r.useCallback)((()=>{p(),f("calypso_global_styles_gating_notice_preview_click",o)}),[o,p]),_=(0,r.useCallback)((()=>{n&&(v("root","globalStyles",n,{styles:{},settings:{}}),f("calypso_global_styles_gating_notice_reset_click",o))}),[v,n,o]),b=(0,r.useCallback)((()=>{window.open(wpcomGlobalStyles.resetGlobalStylesSupportUrl,"_blank").focus(),f("calypso_global_styles_gating_notice_reset_support_click",o)}),[o]),C=(0,r.useCallback)((()=>{const e=[{label:__("Upgrade now","full-site-editing"),onClick:y,variant:"primary",noDefaultClasses:!0,className:"wpcom-global-styles-action-has-icon wpcom-global-styles-action-is-external"}];a&&h&&e.push({label:__("Preview without custom styles","full-site-editing"),onClick:w,variant:"secondary",noDefaultClasses:!0,className:"wpcom-global-styles-action-has-icon wpcom-global-styles-action-is-external"}),e.push({label:__("Remove custom styles","full-site-editing"),onClick:o?_:b,variant:o?"secondary":"link",noDefaultClasses:!0,className:o?"":"wpcom-global-styles-action-has-icon wpcom-global-styles-action-is-external wpcom-global-styles-action-is-support"}),wpcomGlobalStyles?.globalStylesInPersonalPlan===d?g(__("Your site includes customized styles that are only visible to visitors after upgrading to the Personal plan or higher.","full-site-editing"),{id:t,actions:e}):g(__("Your site includes customized styles that are only visible to visitors after upgrading to the Premium plan or higher.","full-site-editing"),{id:t,actions:e}),f("calypso_global_styles_gating_notice_show",o)}),[h,g,a,o,b,w,_,y]);return(0,r.useEffect)((()=>{if(o||a)return e?C():m(t),()=>m(t)}),[e,o,a,m,C]),null}function m(){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(h,null),(0,r.createElement)(g,null))}},915:(t,e,n)=>{"object"==typeof window&&window.wpcomGlobalStyles?.assetsUrl&&(n.p=window.wpcomGlobalStyles.assetsUrl)},366:(t,e,n)=>{"use strict";var r=n(818);const s={isModalVisible:!0};(0,r.registerStore)("automattic/wpcom-global-styles",{reducer:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;return"DISMISS_MODAL"===(arguments.length>1?arguments[1]:void 0).type?{...t,isModalVisible:!1}:t},actions:{dismissModal:()=>({type:"DISMISS_MODAL"})},selectors:{isModalVisible:(t,e,n)=>t.isModalVisible&&("edit-site/global-styles"===e||"/wp_global_styles"===n)},persist:!0})},773:(t,e,n)=>{"use strict";n.d(e,{$:()=>o});var r=n(818),s=n(307);function o(){const[t,e]=(0,s.useState)(),[n,o]=(0,s.useState)(),i=(0,r.useSelect)((t=>!!t("core/edit-site")),[]);return(0,s.useEffect)((()=>{if(!i)return;const t=(0,r.subscribe)((()=>{setTimeout((()=>{const t=new URLSearchParams(window.location.search),n=t.get("canvas")??"view";e(n),o("view"===n?t.get("path"):void 0)}),0)}),"core/edit-site");return()=>t()}),[i]),{canvas:t,viewCanvasPath:n}}},210:(t,e,n)=>{"use strict";n.d(e,{Y:()=>s});var r=n(818);function s(){return(0,r.useSelect)((t=>{const{getEditedEntityRecord:e,__experimentalGetCurrentGlobalStylesId:n}=t("core"),r=n?n():null,s=e("root","globalStyles",r),o={styles:s?.styles??{},settings:s?.settings??{}};return{globalStylesInUse:!(!Object.keys(o.styles).length&&!Object.keys(o.settings).length),globalStylesId:r}}),[])}},807:(t,e,n)=>{"use strict";n.d(e,{u:()=>l});var r=n(307),s=n(609),o=n(818),i=n(736),a=n(483);const __=i.__;function l(){const{currentPostLink:t,isAutosaveable:e,isDraft:n,isPostEditor:i,isLocked:l,isSaveable:c,previewLink:u}=(0,o.useSelect)((t=>{const{getCurrentPostId:e,getCurrentPostAttribute:n,getEditedPostPreviewLink:r,isEditedPostAutosaveable:s,isEditedPostSaveable:o,isPostLocked:i,getEditedPostAttribute:a}=t("core/editor");return{currentPostLink:n("link"),isAutosaveable:s(),isDraft:-1!==["draft","auto-draft"].indexOf(a("status")),isLocked:i(),isPostEditor:!t("core/edit-site")&&!!e(),isSaveable:o(),previewLink:r()}})),d=(0,r.useRef)(null),{autosave:f,savePost:p}=(0,o.useDispatch)("core/editor"),h=(0,r.useCallback)((()=>{i&&(d.current&&!d.current.closed||(d.current=window.open("","_blank")),d.current.focus(),e&&!l?(n?p({isPreview:!0}):f({isPreview:!0}),function(t){let e=(0,r.renderToString)((0,r.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},(0,r.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},(0,r.createElement)(s.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,r.createElement)(s.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),(0,r.createElement)("p",null,__("Generating preview…","full-site-editing"))));e+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',t.write(e),t.title=__("Generating preview…","full-site-editing"),t.close()}(d.current.document)):d.current&&!d.current.closed&&(d.current.location=(0,a.addQueryArgs)(u||t,{"hide-global-styles":""})))}),[f,t,e,n,l,i,u,p]);return(0,r.useEffect)((()=>{i&&d.current&&u&&!d.current.closed&&(d.current.location=(0,a.addQueryArgs)(u,{"hide-global-styles":!0}))}),[i,u]),{previewPostWithoutCustomStyles:h,canPreviewPost:c}}},115:(t,e,n)=>{"use strict";n.d(e,{jN:()=>r.jN});n(694),n(209),n(377);var r=n(792);n(722)},377:(t,e,n)=>{"use strict";let r=null;"undefined"!=typeof window&&window.addEventListener("popstate",(function(){r=null}))},792:(t,e,n)=>{"use strict";n.d(e,{jN:()=>d});var r=n(699),s=n(898),o=(n(421),n(377),n(209),n(358));n(694);const i=["a8c_cookie_banner_ok","a8c_ccpa_optout","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 c(t){"undefined"!=typeof window&&(window._tkq=window._tkq||[],window._tkq.push(t))}"undefined"!=typeof document&&(l=(0,s.ve)("//stats.wp.com/w.js?63"));const u=new r.EventEmitter;function d(t,e){if(e=e||{},(0,o.Z)('Record event "%s" called with props %o',t,e),t.startsWith("calypso_")||t.startsWith("jetpack_")||i.includes(t)){if(a){const t=a(e);e={...e,...t}}e=Object.fromEntries(Object.entries(e).filter((t=>{let[,e]=t;return void 0!==e}))),(0,o.Z)('Recording event "%s" with actual props %o',t,e),c(["recordEvent",t,e]),u.emit("record-event",t,e)}else(0,o.Z)('- Event name must be prefixed by "calypso_", "jetpack_", or added to `EVENT_NAME_EXCEPTIONS`')}},722:(t,e,n)=>{"use strict";n(792)},209:(t,e,n)=>{"use strict";n(4)},358:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(49);const s=n.n(r)()("calypso:analytics")},694:(t,e,n)=>{"use strict";n(358)},4:(t,e,n)=>{"use strict";n(32)},340:(t,e,n)=>{"use strict";n.d(e,{Yt:()=>d,_W:()=>u,hg:()=>a,lZ:()=>l});var r=n(49);const s=n.n(r)()("lib/load-script/callback-handler"),o=new Map;function i(){return o}function a(t){return i().has(t)}function l(t,e){const n=i();a(t)?(s(`Adding a callback for an existing script from "${t}"`),n.get(t).add(e)):(s(`Adding a callback for a new script from "${t}"`),n.set(t,new Set([e])))}function c(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=i(),r=n.get(t);if(r){s(`Executing callbacks for "${t}"`+(null===e?" with success":` with error "${e}"`)),r.forEach((t=>{"function"==typeof t&&t(e)})),n.delete(t)}}function u(){const t=this.getAttribute("src");s(`Handling successful request for "${t}"`),c(t),this.onload=null}function d(){const t=this.getAttribute("src");s(`Handling failed request for "${t}"`),c(t,new Error(`Failed to load script "${t}"`)),this.onerror=null}},606:(t,e,n)=>{"use strict";n.d(e,{C:()=>a,k:()=>l});var r=n(49),s=n.n(r),o=n(340);const i=s()("lib/load-script/dom-operations");function a(t,e){i(`Creating script element for "${t}"`);const n=document.createElement("script");return n.src=t,n.type="text/javascript",n.onload=o._W,n.onerror=o.Yt,n.async=!0,e&&Object.entries(e).forEach((t=>{let[e,r]=t;return n[e]=r})),n}function l(t){i("Attaching element to head"),document.head.appendChild(t)}},898:(t,e,n)=>{"use strict";n.d(e,{ve:()=>a});var r=n(49),s=n.n(r),o=n(340),i=n(606);s()("package/load-script");function a(t,e,n){if(!(0,o.hg)(t)&&(0,i.k)((0,i.C)(t,n)),"function"!=typeof e)return new Promise(((e,n)=>{(0,o.lZ)(t,(t=>{null===t?e():n(t)}))}));(0,o.lZ)(t,e)}},49:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,s=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(s=r))})),e.splice(s,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(n){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(n){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.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+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})(),e.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"],e.log=console.debug||console.log||(()=>{}),t.exports=n(632)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},632:(t,e,n)=>{t.exports=function(t){function e(t){let n,s,o,i=null;function a(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];if(!a.enabled)return;const o=a,i=Number(new Date),l=i-(n||i);o.diff=l,o.prev=n,o.curr=i,n=i,r[0]=e.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");let c=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,((t,n)=>{if("%%"===t)return"%";c++;const s=e.formatters[n];if("function"==typeof s){const e=r[c];t=s.call(o,e),r.splice(c,1),c--}return t})),e.formatArgs.call(o,r);(o.log||e.log).apply(o,r)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(s!==e.namespaces&&(s=e.namespaces,o=e.enabled(t)),o),set:t=>{i=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function s(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(s),...e.skips.map(s).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),s=r.length;for(n=0;n<s;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(881),e.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(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},731:(t,e,n)=>{"use strict";t.exports=n.p+"images/image-f40c6b2b12b942b650ea.svg"},196:t=>{"use strict";t.exports=window.React},609:t=>{"use strict";t.exports=window.wp.components},818:t=>{"use strict";t.exports=window.wp.data},701:t=>{"use strict";t.exports=window.wp.domReady},307:t=>{"use strict";t.exports=window.wp.element},736:t=>{"use strict";t.exports=window.wp.i18n},817:t=>{"use strict";t.exports=window.wp.plugins},483:t=>{"use strict";t.exports=window.wp.url}},e={};function n(r){var s=e[r];if(void 0!==s)return s.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var s=r.length-1;s>-1&&!t;)t=r[s--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})();var r={};(()=>{"use strict";n.r(r);var t=n(307),e=(n(915),n(701)),s=n.n(e),o=n(817),i=n(93),a=n(172);n(366);s()((()=>{(0,o.registerPlugin)("wpcom-global-styles",{render:()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(i.Z,null),(0,t.createElement)(a.Z,null))})}))})(),window.EditingToolkit=r})(); 2 2 //# sourceMappingURL=wpcom-global-styles.min.js.map -
full-site-editing/trunk/wpcom-global-styles/index.php
r2933813 r2934358 162 162 ); 163 163 wp_set_script_translations( 'wpcom-global-styles-editor', 'full-site-editing' ); 164 $plan = wpcom_site_has_global_styles_in_personal_plan() ? 'personal-bundle' : 'value_bundle'; 164 $is_global_styles_in_personal_plan = wpcom_site_has_global_styles_in_personal_plan(); 165 $plan = $is_global_styles_in_personal_plan ? 'personal-bundle' : 'value_bundle'; 166 167 $reset_global_styles_support_url = 'https://wordpress.com/support/using-styles/#reset-all-styles'; 168 if ( class_exists( 'WPCom_Languages' ) ) { 169 $reset_global_styles_support_url = WPCom_Languages::localize_url( $reset_global_styles_support_url ); 170 } 165 171 wp_localize_script( 166 172 'wpcom-global-styles-editor', 167 173 'wpcomGlobalStyles', 168 174 array( 169 'assetsUrl' => plugins_url( 'dist/', __FILE__ ), 170 'upgradeUrl' => "$calypso_domain/plans/$site_slug?plan=$plan&feature=style-customization", 171 'wpcomBlogId' => wpcom_global_styles_get_wpcom_current_blog_id(), 175 'assetsUrl' => plugins_url( 'dist/', __FILE__ ), 176 'upgradeUrl' => "$calypso_domain/plans/$site_slug?plan=$plan&feature=style-customization", 177 'wpcomBlogId' => wpcom_global_styles_get_wpcom_current_blog_id(), 178 'globalStylesInPersonalPlan' => $is_global_styles_in_personal_plan, 179 'resetGlobalStylesSupportUrl' => $reset_global_styles_support_url, 172 180 ) 173 181 ); -
full-site-editing/trunk/wpcom-global-styles/notices.js
r2929627 r2934358 10 10 import './notice.scss'; 11 11 12 const GLOBAL_STYLES_TREATMENT_GROUP = '1'; 13 12 14 const trackEvent = ( eventName, isSiteEditor = true ) => 13 15 recordTracksEvent( eventName, { … … 29 31 } 30 32 33 let upgradeTranslation; 34 if ( wpcomGlobalStyles?.globalStylesInPersonalPlan === GLOBAL_STYLES_TREATMENT_GROUP ) { 35 upgradeTranslation = __( 36 'Your site includes customized styles that are only visible to visitors after <a>upgrading to the Personal plan or higher</a>.', 37 'full-site-editing' 38 ); 39 } else { 40 upgradeTranslation = __( 41 'Your site includes customized styles that are only visible to visitors after <a>upgrading to the Premium plan or higher</a>.', 42 'full-site-editing' 43 ); 44 } 45 31 46 return ( 32 47 <Notice status="warning" isDismissible={ false } className="wpcom-global-styles-notice"> 33 { createInterpolateElement( 34 __( 35 'Your site includes customized styles that are only visible to visitors after <a>upgrading to the Premium plan or higher</a>.', 36 'full-site-editing' 48 { createInterpolateElement( upgradeTranslation, { 49 a: ( 50 <ExternalLink 51 href={ wpcomGlobalStyles.upgradeUrl } 52 target="_blank" 53 onClick={ () => 54 trackEvent( 'calypso_global_styles_gating_notice_view_canvas_upgrade_click' ) 55 } 56 /> 37 57 ), 38 { 39 a: ( 40 <ExternalLink 41 href={ wpcomGlobalStyles.upgradeUrl } 42 target="_blank" 43 onClick={ () => 44 trackEvent( 'calypso_global_styles_gating_notice_view_canvas_upgrade_click' ) 45 } 46 /> 47 ), 48 } 49 ) } 58 } ) } 50 59 </Notice> 51 60 ); … … 118 127 119 128 const openResetGlobalStylesSupport = useCallback( () => { 120 window.open( 'https://wordpress.com/support/using-styles/#reset-all-styles', '_blank' ).focus();129 window.open( wpcomGlobalStyles.resetGlobalStylesSupportUrl, '_blank' ).focus(); 121 130 trackEvent( 'calypso_global_styles_gating_notice_reset_support_click', isSiteEditor ); 122 131 }, [ isSiteEditor ] ); … … 153 162 } ); 154 163 155 createWarningNotice( 156 __( 157 'Your site includes customized styles that are only visible to visitors after upgrading to the Premium plan or higher.', 158 'full-site-editing' 159 ), 160 { 161 id: NOTICE_ID, 162 actions: actions, 163 } 164 ); 164 if ( wpcomGlobalStyles?.globalStylesInPersonalPlan === GLOBAL_STYLES_TREATMENT_GROUP ) { 165 createWarningNotice( 166 __( 167 'Your site includes customized styles that are only visible to visitors after upgrading to the Personal plan or higher.', 168 'full-site-editing' 169 ), 170 { 171 id: NOTICE_ID, 172 actions: actions, 173 } 174 ); 175 } else { 176 createWarningNotice( 177 __( 178 'Your site includes customized styles that are only visible to visitors after upgrading to the Premium plan or higher.', 179 'full-site-editing' 180 ), 181 { 182 id: NOTICE_ID, 183 actions: actions, 184 } 185 ); 186 } 165 187 166 188 trackEvent( 'calypso_global_styles_gating_notice_show', isSiteEditor );
Note: See TracChangeset
for help on using the changeset viewer.